diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-05-07 14:41:40 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-05-07 14:41:40 +0100 |
commit | 3afd9c97310d58c0c6588d18887244328590731e (patch) | |
tree | 133917633f801613e8742d8b313faee3c4f47e71 /desktop/search.h | |
parent | 0647d69a8b8663fcc09af118dde6b256624fe232 (diff) | |
download | netsurf-3afd9c97310d58c0c6588d18887244328590731e.tar.gz netsurf-3afd9c97310d58c0c6588d18887244328590731e.tar.bz2 |
Remove search context from browser window, simplify search interface for front ends.
Added content interface for search.
Removed bw->cur_search search context. Desktop layer now does nothing
except pass search requests from front end onto the bw's current_content
via the content interface.
Search API reduced to a pair of functions at each level:
{desktop|content|html|textplain}_search
and
{desktop|content|html|textplain}_search_clear
Updated front ends to use simplified search API. Only tested GTK and RO builds.
These confine the search stuff to render/. However search still uses struct
selection. The handling for which is still spread over desktop/ and render/.
Also the render/search code itself still fiddles inside html and textplain
privates.
Diffstat (limited to 'desktop/search.h')
-rw-r--r-- | desktop/search.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/desktop/search.h b/desktop/search.h index e178138de..8440ce982 100644 --- a/desktop/search.h +++ b/desktop/search.h @@ -22,10 +22,14 @@ #include <ctype.h> #include <string.h> +struct browser_window; + typedef enum { - SEARCH_FLAG_CASE_SENSITIVE = (1 << 0), - SEARCH_FLAG_FORWARDS = (1 << 1), - SEARCH_FLAG_SHOWALL = (1 << 2) + SEARCH_FLAG_NONE = 0, + SEARCH_FLAG_CASE_SENSITIVE = (1 << 0), + SEARCH_FLAG_FORWARDS = (1 << 1), + SEARCH_FLAG_BACKWARDS = (1 << 2), + SEARCH_FLAG_SHOWALL = (1 << 3) } search_flags_t; /** @@ -74,13 +78,9 @@ struct gui_search_callbacks { }; -bool browser_window_search_create_context(struct browser_window *bw, - struct gui_search_callbacks *gui_callbacks, void *gui_p); -void browser_window_search_destroy_context(struct browser_window *bw); -bool browser_window_search_verify_new(struct browser_window *bw, - struct gui_search_callbacks *gui_callbacks, void *gui_p); -void browser_window_search_step(struct browser_window *bw, +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_show_all(bool all, struct browser_window *bw); +void browser_window_search_clear(struct browser_window *bw); #endif |