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.c') diff --git a/backend/ev-document-find.c b/backend/ev-document-find.c index 5c1fbe4..1be43b9 100644 --- a/backend/ev-document-find.c +++ b/backend/ev-document-find.c @@ -68,6 +68,7 @@ ev_document_find_base_init (gpointer g_class) void ev_document_find_begin (EvDocumentFind *document_find, + int page, const char *search_string, gboolean case_sensitive) { @@ -75,7 +76,7 @@ ev_document_find_begin (EvDocumentFind *document_find, g_return_if_fail (search_string != NULL); - iface->begin (document_find, search_string, case_sensitive); + iface->begin (document_find, page, search_string, case_sensitive); } void @@ -94,19 +95,21 @@ ev_document_find_page_has_results (EvDocumentFind *document_find, } int -ev_document_find_get_n_results (EvDocumentFind *document_find) +ev_document_find_get_n_results (EvDocumentFind *document_find, + int page) { EvDocumentFindIface *iface = EV_DOCUMENT_FIND_GET_IFACE (document_find); - return iface->get_n_results (document_find); + return iface->get_n_results (document_find, page); } gboolean ev_document_find_get_result (EvDocumentFind *document_find, + int page, int n_result, - GdkRectangle *rectangle) + EvRectangle *rectangle) { EvDocumentFindIface *iface = EV_DOCUMENT_FIND_GET_IFACE (document_find); - return iface->get_result (document_find, n_result, rectangle); + return iface->get_result (document_find, page, n_result, rectangle); } double -- cgit v0.9.1