From 3c7538a9f906e38e78be0300049f9e49839d7fd7 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 12 May 2020 21:09:41 +0100 Subject: hoist common text search out of content handlers --- content/content_protected.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'content/content_protected.h') diff --git a/content/content_protected.h b/content/content_protected.h index 314a0a9a3..26f43807c 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -87,9 +87,6 @@ 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, void *context, search_flags_t flags, - const char *string); - void (*search_clear)(struct content *c); nserror (*debug_dump)(struct content *c, FILE *f, enum content_debug op); nserror (*debug)(struct content *c, enum content_debug op); nserror (*clone)(const struct content *old, struct content **newc); @@ -237,6 +234,14 @@ struct content { * HTTP status code, 0 if not HTTP. */ long http_code; + + /** + * Free text search state + */ + struct { + char *string; + struct textsearch_context *context; + } textsearch; }; extern const char * const content_type_name[]; -- cgit v1.2.3