From 5e6728daa9b09a76f2537f7c848123639165cd70 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Tue, 05 Apr 2005 00:40:58 +0000 Subject: Make searching work again. 2005-04-04 Kristian Høgsberg Make searching work again. * backend/ev-document.c: * backend/ev-document.h: * backend/ev-document-find.c: * backend/ev-document-find.h: Change EvDocumentIface so we no longer store the current page or zoom level in the document. The consequence is that all calls that operate on the current page now instead take the page number as an extra argument, and all coordinates are now doubles in document coordinate system. * pdf/ev-poppler.cc: * pixbuf/pixbuf-document.c: * ps/ps-document.c: Update backends accordingly. --- (limited to 'backend/ev-document-find.h') diff --git a/backend/ev-document-find.h b/backend/ev-document-find.h index 49c3672..f365df1 100644 --- a/backend/ev-document-find.h +++ b/backend/ev-document-find.h @@ -26,6 +26,8 @@ #include #include +#include "ev-document.h" /* For EvRectangle */ + G_BEGIN_DECLS #define EV_TYPE_DOCUMENT_FIND (ev_document_find_get_type ()) @@ -45,15 +47,18 @@ struct _EvDocumentFindIface /* 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 (* get_n_results) (EvDocumentFind *document_find, + int page); gboolean (* get_result) (EvDocumentFind *document_find, + int page, int n_result, - GdkRectangle *rectangle); + EvRectangle *rectangle); double (* get_progress) (EvDocumentFind *document_find); /* Signals */ @@ -64,15 +69,18 @@ struct _EvDocumentFindIface 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 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, - GdkRectangle *rectangle); + EvRectangle *rectangle); double ev_document_find_get_progress (EvDocumentFind *document_find); void ev_document_find_changed (EvDocumentFind *document_find, int page); -- cgit v0.9.1