summaryrefslogtreecommitdiff
path: root/desktop/search.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-03-18 22:32:52 +0000
committerVincent Sanders <vince@kyllikki.org>2014-03-18 22:32:52 +0000
commit4d4d74c8cd1a77a46cbe0816cf6150f8b4980947 (patch)
treecdc747443b58963a17b2844da25c7b2fab9deb99 /desktop/search.h
parentfec9f916b640b8ffc18b7ff9f9d04fd742b32ad1 (diff)
downloadnetsurf-4d4d74c8cd1a77a46cbe0816cf6150f8b4980947.tar.gz
netsurf-4d4d74c8cd1a77a46cbe0816cf6150f8b4980947.tar.bz2
move page search gui callbacks to their own operations table
Diffstat (limited to 'desktop/search.h')
-rw-r--r--desktop/search.h56
1 files changed, 13 insertions, 43 deletions
diff --git a/desktop/search.h b/desktop/search.h
index 8440ce982..254acde99 100644
--- a/desktop/search.h
+++ b/desktop/search.h
@@ -33,54 +33,24 @@ typedef enum {
} search_flags_t;
/**
- * Change the displayed search status.
- * \param found search pattern matched in text
- * \param p gui private data pointer provided with search callbacks
- */
-typedef void (*gui_search_status)(bool found, void *p);
-
-/**
- * display hourglass while searching
- * \param active start/stop indicator
- * \param p gui private data pointer provided with search callbacks
- */
-typedef void (*gui_search_hourglass)(bool active, void *p);
-
-/**
- * add search string to recent searches list
- * front has full liberty how to implement the bare notification;
- * core gives no guarantee of the integrity of the const char *
- * \param string search pattern
- * \param p gui private data pointer provided with search callbacks
- */
-typedef void (*gui_search_add_recent)(const char *string, void *p);
-
-/**
- * activate search forwards button in gui
- * \param active activate/inactivate
- * \param p gui private data pointer provided with search callbacks
+ * Starts or continues an existing search.
+ *
+ * \param bw The browser_window to search.
+ * \param context A context pointer passed to the callbacks.
+ * \param flags Flags controlling the search operation.
+ * \param string The string being searched for.
*/
-typedef void (*gui_search_forward_state)(bool active, void *p);
+void browser_window_search(struct browser_window *bw, void *context, search_flags_t flags, const char *string);
/**
- * activate search back button in gui
- * \param active activate/inactivate
- * \param p gui private data pointer provided with search callbacks
+ * Clear up a search.
+ *
+ * Frees any memory used by the search.
+ *
+ * \param bw The browser window to clean up the search for.
+ * \param context A context pointer passed to the callbacks.
*/
-typedef void (*gui_search_back_state)(bool active, void *p);
-
-struct gui_search_callbacks {
- gui_search_forward_state forward_state;
- gui_search_back_state back_state;
- gui_search_status status;
- gui_search_hourglass hourglass;
- gui_search_add_recent add_recent;
-};
-
-void browser_window_search(struct browser_window *bw,
- struct gui_search_callbacks *gui_callbacks, void *gui_data,
- search_flags_t flags, const char *string);
void browser_window_search_clear(struct browser_window *bw);
#endif