X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Fev-document-find.c;h=1be43b98d22caf9ceb3dbb6777f391976c58f181;hb=d89b1cb89ef2d589befbe7a7f0c9732ff72ecc7b;hp=78c07c90095ca38044b37e048a3cf5cc80ac0c22;hpb=99c9d3fafb8944bedbad648b8ba8f2c9a5c7ac29;p=evince.git diff --git a/backend/ev-document-find.c b/backend/ev-document-find.c index 78c07c90..1be43b98 100644 --- a/backend/ev-document-find.c +++ b/backend/ev-document-find.c @@ -53,16 +53,14 @@ ev_document_find_base_init (gpointer g_class) static gboolean initialized = FALSE; if (!initialized) { - g_signal_new ("found", + g_signal_new ("find_changed", EV_TYPE_DOCUMENT_FIND, G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (EvDocumentFindIface, found), + G_STRUCT_OFFSET (EvDocumentFindIface, find_changed), NULL, NULL, - _ev_backend_marshal_VOID__POINTER_INT_DOUBLE, - G_TYPE_NONE, 3, - G_TYPE_POINTER, - G_TYPE_INT, - G_TYPE_DOUBLE); + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); initialized = TRUE; } @@ -70,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) { @@ -77,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 @@ -85,18 +84,43 @@ ev_document_find_cancel (EvDocumentFind *document_find) { EvDocumentFindIface *iface = EV_DOCUMENT_FIND_GET_IFACE (document_find); iface->cancel (document_find); +} + +int +ev_document_find_page_has_results (EvDocumentFind *document_find, + int page) +{ + EvDocumentFindIface *iface = EV_DOCUMENT_FIND_GET_IFACE (document_find); + return iface->page_has_results (document_find, page); +} - ev_document_find_found (document_find, NULL, 0, 1.0); +int +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, page); +} + +gboolean +ev_document_find_get_result (EvDocumentFind *document_find, + int page, + int n_result, + EvRectangle *rectangle) +{ + EvDocumentFindIface *iface = EV_DOCUMENT_FIND_GET_IFACE (document_find); + return iface->get_result (document_find, page, n_result, rectangle); +} + +double +ev_document_find_get_progress (EvDocumentFind *document_find) +{ + EvDocumentFindIface *iface = EV_DOCUMENT_FIND_GET_IFACE (document_find); + return iface->get_progress (document_find); } void -ev_document_find_found (EvDocumentFind *document_find, - const EvFindResult *results, - int n_results, - double percent_complete) +ev_document_find_changed (EvDocumentFind *document_find, int page) { - g_signal_emit_by_name (document_find, - "found", - results, n_results, percent_complete); + g_signal_emit_by_name (document_find, "find_changed", page); } -