From 95e0a24fac2abc4cddaa91bf44304ebc3d776b17 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 13 May 2020 18:03:22 +0100 Subject: use content messages to inform frontend of text search changes --- content/content.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'content/content.h') diff --git a/content/content.h b/content/content.h index f68af538b..edf9ed2cc 100644 --- a/content/content.h +++ b/content/content.h @@ -242,6 +242,50 @@ union content_msg_data { struct { struct form_control *gadget; } gadget_click; + + /** + * CONTENT_MSG_TEXTSEARCH - Free text search action + */ + struct { + /** + * The type of text search operation + */ + enum { + /** + * Free text search find operation has started or finished + */ + CONTENT_TEXTSEARCH_FIND, + /** + * Free text search match state has changed + */ + CONTENT_TEXTSEARCH_MATCH, + /** + * Free text search back available state changed + */ + CONTENT_TEXTSEARCH_BACK, + /** + * Free text search forward available state changed + */ + CONTENT_TEXTSEARCH_FORWARD, + /** + * add a search query string to the recent searches + */ + CONTENT_TEXTSEARCH_RECENT + } type; + /** + * context passed to browser_window_search() + */ + void *ctx; + /** + * state for operation + */ + bool state; + /** + * search string + */ + const char *string; + } textsearch; + }; -- cgit v1.2.3