X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=libdocument%2Fev-document-find.h;h=dcc3438ed282e136d044dc69a41fcb02c23bd1de;hb=38c1b9aab8bfb41de6dc07df26fd6743a63ea015;hp=f365df13479b8a21723583b03dea0dde99048372;hpb=13a06349251874bd35d2f03c3fc93217cee749a2;p=evince.git diff --git a/libdocument/ev-document-find.h b/libdocument/ev-document-find.h index f365df13..dcc3438e 100644 --- a/libdocument/ev-document-find.h +++ b/libdocument/ev-document-find.h @@ -14,85 +14,52 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * $Id$ */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_FIND_H #define EV_DOCUMENT_FIND_H #include #include -#include -#include "ev-document.h" /* For EvRectangle */ +#include "ev-document.h" G_BEGIN_DECLS #define EV_TYPE_DOCUMENT_FIND (ev_document_find_get_type ()) #define EV_DOCUMENT_FIND(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EV_TYPE_DOCUMENT_FIND, EvDocumentFind)) -#define EV_DOCUMENT_FIND_IFACE(k) (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_DOCUMENT_FIND, EvDocumentFindIface)) +#define EV_DOCUMENT_FIND_IFACE(k) (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_DOCUMENT_FIND, EvDocumentFindInterface)) #define EV_IS_DOCUMENT_FIND(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EV_TYPE_DOCUMENT_FIND)) #define EV_IS_DOCUMENT_FIND_IFACE(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_DOCUMENT_FIND)) -#define EV_DOCUMENT_FIND_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_DOCUMENT_FIND, EvDocumentFindIface)) +#define EV_DOCUMENT_FIND_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_DOCUMENT_FIND, EvDocumentFindInterface)) -typedef struct _EvDocumentFind EvDocumentFind; -typedef struct _EvDocumentFindIface EvDocumentFindIface; +typedef struct _EvDocumentFind EvDocumentFind; +typedef struct _EvDocumentFindInterface EvDocumentFindInterface; -struct _EvDocumentFindIface +struct _EvDocumentFindInterface { GTypeInterface base_iface; /* Methods */ - - void (* begin) (EvDocumentFind *document_find, - int page, - const char *search_string, - gboolean case_sensitive); - void (* cancel) (EvDocumentFind *document_find); - int (* page_has_results) (EvDocumentFind *document_find, - int page); - int (* get_n_results) (EvDocumentFind *document_find, - int page); - gboolean (* get_result) (EvDocumentFind *document_find, - int page, - int n_result, - EvRectangle *rectangle); - double (* get_progress) (EvDocumentFind *document_find); - - /* Signals */ - - void (* find_changed) (EvDocumentFind *document_find, - int page); + GList *(* find_text) (EvDocumentFind *document_find, + EvPage *page, + const gchar *text, + gboolean case_sensitive); }; -GType ev_document_find_get_type (void); -void ev_document_find_begin (EvDocumentFind *document_find, - int page, - const char *search_string, - gboolean case_sensitive); -void ev_document_find_cancel (EvDocumentFind *document_find); -int ev_document_find_page_has_results (EvDocumentFind *document_find, - int page); -int ev_document_find_get_n_results (EvDocumentFind *document_find, - int page); -gboolean ev_document_find_get_result (EvDocumentFind *document_find, - int page, - int n_result, - EvRectangle *rectangle); -double ev_document_find_get_progress (EvDocumentFind *document_find); -void ev_document_find_changed (EvDocumentFind *document_find, - int page); - -/* How this interface works: - * - * begin() begins a new search, canceling any previous search. - * - * cancel() cancels a search if any, otherwise does nothing. - * - */ +GType ev_document_find_get_type (void) G_GNUC_CONST; +GList *ev_document_find_find_text (EvDocumentFind *document_find, + EvPage *page, + const gchar *text, + gboolean case_sensitive); G_END_DECLS -#endif +#endif /* EV_DOCUMENT_FIND_H */