summaryrefslogtreecommitdiff
path: root/render/search.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-05-07 14:41:40 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-05-07 14:41:40 +0100
commit3afd9c97310d58c0c6588d18887244328590731e (patch)
tree133917633f801613e8742d8b313faee3c4f47e71 /render/search.h
parent0647d69a8b8663fcc09af118dde6b256624fe232 (diff)
downloadnetsurf-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 'render/search.h')
-rw-r--r--render/search.h25
1 files changed, 6 insertions, 19 deletions
diff --git a/render/search.h b/render/search.h
index 70da31bca..43c93b3ab 100644
--- a/render/search.h
+++ b/render/search.h
@@ -27,30 +27,17 @@
struct search_context;
/**
- * Called when a search context is destroyed
- * \param context search context being invalidated
- * \param p pointer for client data
- */
-typedef void (*search_invalidate_callback)(struct search_context *context,
- void *p);
-
-struct search_callbacks {
- struct gui_search_callbacks *gui;
- void *gui_p; /* private gui owned data */
- search_invalidate_callback invalidate;
- void *p; /* private client data */
-};
-
-/**
* create a search_context
*
- * \param h the hlcache_handle the search_context is connected to
+ * \param c the content the search_context is connected to
+ * \param type the content type of c
* \param callbacks the callbacks to modify appearance according to results
- * \param p the pointer to send to the callbacks
+ * \param p the pointer to send to the callbacks
* \return true for success
*/
-struct search_context * search_create_context(struct hlcache_handle *h,
- struct search_callbacks callbacks);
+struct search_context * search_create_context(struct content *c,
+ content_type type, struct gui_search_callbacks *callbacks,
+ void *gui_data);
/**
* Ends the search process, invalidating all state