Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ev-document-find.c
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
2 /*
3  * Copyright (C) 2004 Red Hat, Inc.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2, or (at your option)
8  * any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  */
20 
21 #include "config.h"
22 
23 #include "ev-document-find.h"
24 
25 G_DEFINE_INTERFACE (EvDocumentFind, ev_document_find, 0)
26 
27 static void
29 {
30 }
31 
41 GList *
43  EvPage *page,
44  const gchar *text,
45  gboolean case_sensitive)
46 {
47  EvDocumentFindInterface *iface = EV_DOCUMENT_FIND_GET_IFACE (document_find);
48 
49  return iface->find_text (document_find, page, text, case_sensitive);
50 }
51 
61 GList *
63  EvPage *page,
64  const gchar *text,
65  EvFindOptions options)
66 {
67  EvDocumentFindInterface *iface = EV_DOCUMENT_FIND_GET_IFACE (document_find);
68 
69  if (iface->find_text_with_options)
70  return iface->find_text_with_options (document_find, page, text, options);
71 
72  return ev_document_find_find_text (document_find, page, text, options & EV_FIND_CASE_SENSITIVE);
73 }
74 
77 {
78  EvDocumentFindInterface *iface = EV_DOCUMENT_FIND_GET_IFACE (document_find);
79 
80  if (iface->get_supported_options)
81  return iface->get_supported_options (document_find);
82  return 0;
83 }