From f4e50b45c834b644caa6a82bd044faa82f6f4860 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 12 May 2020 23:22:05 +0100 Subject: make free text search content handler agnostic --- content/content_protected.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'content/content_protected.h') diff --git a/content/content_protected.h b/content/content_protected.h index 26f43807c..667f5ba7b 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -44,6 +44,9 @@ struct content; struct redraw_context; struct rect; struct browser_window_features; +struct textsearch_context; +struct box; +struct selection; typedef struct content_handler content_handler; @@ -98,6 +101,21 @@ struct content_handler { bool (*exec)(struct content *c, const char *src, size_t srclen); bool (*saw_insecure_objects)(struct content *c); + /** + * content specific free text search find + */ + nserror (*textsearch_find)(struct content *c, struct textsearch_context *context, const char *pattern, int p_len, bool case_sens); + + /** + * get bounds of free text search match + */ + nserror (*textsearch_bounds)(struct content *c, unsigned start_idx, unsigned end_idx, struct box *start_ptr, struct box *end_ptr, struct rect *bounds_out); + + /** + * create a selection object + */ + nserror (*create_selection)(struct content *c, struct selection **sel_out); + /** * handler dependant content sensitive internal data interface. */ -- cgit v1.2.3