]> www.fi.muni.cz Git - evince.git/blobdiff - backend/ev-document-find.c
Added missing files.
[evince.git] / backend / ev-document-find.c
index 78c07c90095ca38044b37e048a3cf5cc80ac0c22..1be43b98d22caf9ceb3dbb6777f391976c58f181 100644 (file)
@@ -53,16 +53,14 @@ ev_document_find_base_init (gpointer g_class)
        static gboolean initialized = FALSE;
 
        if (!initialized) {
        static gboolean initialized = FALSE;
 
        if (!initialized) {
-               g_signal_new ("found",
+               g_signal_new ("find_changed",
                              EV_TYPE_DOCUMENT_FIND,
                              G_SIGNAL_RUN_LAST,
                              EV_TYPE_DOCUMENT_FIND,
                              G_SIGNAL_RUN_LAST,
-                             G_STRUCT_OFFSET (EvDocumentFindIface, found),
+                             G_STRUCT_OFFSET (EvDocumentFindIface, find_changed),
                              NULL, NULL,
                              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;
        }
 
                initialized = TRUE;
        }
@@ -70,6 +68,7 @@ ev_document_find_base_init (gpointer g_class)
 
 void
 ev_document_find_begin (EvDocumentFind   *document_find,
 
 void
 ev_document_find_begin (EvDocumentFind   *document_find,
+                       int               page,
                         const char       *search_string,
                         gboolean          case_sensitive)
 {
                         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);
         
 
         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
 }
 
 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);
 {
        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
 }
 
 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);
 }
 }
-