diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/content.c | 22 | ||||
-rw-r--r-- | content/content.h | 5 | ||||
-rw-r--r-- | content/content_protected.h | 5 |
3 files changed, 32 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c index 06c974815..9bf4312ef 100644 --- a/content/content.c +++ b/content/content.c @@ -832,6 +832,28 @@ bool content_drop_file_at_point(struct hlcache_handle *h, } +void content_search(struct hlcache_handle *h, + struct gui_search_callbacks *gui_callbacks, void *gui_data, + search_flags_t flags, const char *string) +{ + struct content *c = hlcache_handle_get_content(h); + assert(c != 0); + + if (c->handler->search != NULL) + c->handler->search(c, gui_callbacks, gui_data, flags, string); +} + + +void content_search_clear(struct hlcache_handle *h) +{ + struct content *c = hlcache_handle_get_content(h); + assert(c != 0); + + if (c->handler->search_clear != NULL) + c->handler->search_clear(c); +} + + void content_debug_dump(struct hlcache_handle *h, FILE *f) { struct content *c = hlcache_handle_get_content(h); diff --git a/content/content.h b/content/content.h index 3f93d603b..3e5588815 100644 --- a/content/content.h +++ b/content/content.h @@ -38,6 +38,7 @@ #include "utils/types.h" #include "content/content_factory.h" #include "content/content_type.h" +#include "desktop/search.h" #include "desktop/mouse.h" #include "desktop/plot_style.h" @@ -254,6 +255,10 @@ bool content_scroll_at_point(struct hlcache_handle *h, int x, int y, int scrx, int scry); bool content_drop_file_at_point(struct hlcache_handle *h, int x, int y, char *file); +void content_search(struct hlcache_handle *h, + struct gui_search_callbacks *gui_callbacks, void *gui_data, + search_flags_t flags, const char *string); +void content_search_clear(struct hlcache_handle *h); void content_debug_dump(struct hlcache_handle *h, FILE *f); struct content_rfc5988_link *content_find_rfc5988_link(struct hlcache_handle *c, lwc_string *rel); diff --git a/content/content_protected.h b/content/content_protected.h index 8efe763aa..57ce35775 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -73,6 +73,11 @@ struct content_handler { int scrx, int scry); bool (*drop_file_at_point)(struct content *c, int x, int y, char *file); + void (*search)(struct content *c, + struct gui_search_callbacks *gui_callbacks, + void *gui_data, search_flags_t flags, + const char *string); + void (*search_clear)(struct content *c); void (*debug_dump)(struct content *c, FILE *f); nserror (*clone)(const struct content *old, struct content **newc); bool (*matches_quirks)(const struct content *c, bool quirks); |