summaryrefslogtreecommitdiff
path: root/content/content_protected.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2020-05-12 23:22:05 +0100
committerVincent Sanders <vince@kyllikki.org>2020-05-12 23:22:05 +0100
commitf4e50b45c834b644caa6a82bd044faa82f6f4860 (patch)
tree0b25cc743861a1f296bd4903324cac9dbf2f5990 /content/content_protected.h
parent68b9417a6bc8344f68f8a8206d2f2781079bd713 (diff)
downloadnetsurf-f4e50b45c834b644caa6a82bd044faa82f6f4860.tar.gz
netsurf-f4e50b45c834b644caa6a82bd044faa82f6f4860.tar.bz2
make free text search content handler agnostic
Diffstat (limited to 'content/content_protected.h')
-rw-r--r--content/content_protected.h18
1 files changed, 18 insertions, 0 deletions
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.
*/