From 4d4d74c8cd1a77a46cbe0816cf6150f8b4980947 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 18 Mar 2014 22:32:52 +0000 Subject: move page search gui callbacks to their own operations table --- content/content.c | 11 ++++++----- content/content.h | 5 +++-- content/content_protected.h | 6 ++---- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'content') diff --git a/content/content.c b/content/content.c index 93b6b8f5a..87dcfa226 100644 --- a/content/content.c +++ b/content/content.c @@ -838,15 +838,15 @@ 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, +void content_search(struct hlcache_handle *h, void *context, 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); + if (c->handler->search != NULL) { + c->handler->search(c, context, flags, string); + } } @@ -855,8 +855,9 @@ 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) + if (c->handler->search_clear != NULL) { c->handler->search_clear(c); + } } diff --git a/content/content.h b/content/content.h index 91a6ae9df..a2d07926c 100644 --- a/content/content.h +++ b/content/content.h @@ -266,10 +266,11 @@ 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, + +void content_search(struct hlcache_handle *h, void *context, 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 57ce35775..f5448c803 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -73,10 +73,8 @@ 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)(struct content *c, void *context, 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); -- cgit v1.2.3