summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPranav Kant <pranavk@libreoffice.org>2015-12-09 10:33:05 +0530
committerDavid Tardon <dtardon@redhat.com>2015-12-09 13:18:43 +0100
commite7cdd6803485bbe4cfe27f5f466b427823318334 (patch)
tree725febba59e250e357dd10e9ed7148c73645c1af /include
parent0a28049853ce84aa8ef4f871065970c1220ae855 (diff)
tdf#96318: Add searching API
Clients should now use these APIs to search for text in the widget, rather than executing UNO commands directly on the widget. This allows searching for text in the widget in view-only mode too. Change-Id: I013b6f96e69a634ec33367394d39c0f645a4994d Reviewed-on: https://gerrit.libreoffice.org/20488 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 0f64cf72ff3b930e306e937bb18f4cbe55a8026a)
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitGtk.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h
index 8b6092c56ef2..b2f17f14b6cb 100644
--- a/include/LibreOfficeKit/LibreOfficeKitGtk.h
+++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h
@@ -195,6 +195,44 @@ void lok_doc_view_post_command (LOKDocView*
const gchar* pArguments,
gboolean bNotifyWhenFinished);
+
+/**
+ * lok_doc_view_find_next:
+ * @pDocView: The #LOKDocView instance
+ * @pText: text to search for
+ * @bHighlightAll: Whether all the matches should be highlighted or not
+ *
+ * Highlights the next matching text in the view. `search-not-found` signal will
+ * be emitted when no search is found
+ */
+void lok_doc_view_find_next (LOKDocView* pDocView,
+ const gchar* pText,
+ gboolean bHighlightAll);
+
+/**
+ * lok_doc_view_find_prev:
+ * @pDocView: The #LOKDocView instance
+ * @pText: text to search for
+ * @bHighlightAll: Whether all the matches should be highlighted or not
+ *
+ * Highlights the previous matching text in the view. `search-not-found` signal
+ * will be emitted when no search is found
+ */
+void lok_doc_view_find_prev (LOKDocView* pDocView,
+ const gchar* pText,
+ gboolean bHighlightAll);
+
+/**
+ * lok_doc_view_highlight_all:
+ * @pDocView: The #LOKDocView instance
+ * @pText: text to search for
+ *
+ * Highlights all matching texts in the view. `search-not-found` signal
+ * will be emitted when no search is found
+ */
+void lok_doc_view_highlight_all (LOKDocView* pDocView,
+ const gchar* pText);
+
/**
* lok_doc_view_pixel_to_twip:
* @pDocView: The #LOKDocView instance