diff options
author | defanor <defanor@uberspace.net> | 2019-08-24 13:38:44 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2019-08-24 13:38:44 +0300 |
commit | f308e319f3170a2949624e211adf75002ee5d3f1 (patch) | |
tree | d086626c17e1a88860dcf44c3bbb5f74ce41d869 /src/browserbox.h | |
parent | 2395d5ab1e83507530fdbd675c917d0c55187e66 (diff) |
Introduce incremental text search
It is quite rough and should be refined, but as with most of the other
features, introducing it at this stage primarily to ensure that it
will not require major changes.
Diffstat (limited to 'src/browserbox.h')
-rw-r--r-- | src/browserbox.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/browserbox.h b/src/browserbox.h index 5016c67..9af6f83 100644 --- a/src/browserbox.h +++ b/src/browserbox.h @@ -89,6 +89,15 @@ struct _BuilderState typedef struct _BrowserBox BrowserBox; typedef struct _BrowserBoxClass BrowserBoxClass; +typedef enum _BTSState BTSState; +enum _BTSState { + SEARCH_INACTIVE, + SEARCH_FORWARD, + SEARCH_BACKWARD +}; + +#define MAX_SEARCH_STRING_LEN 512 + struct _BrowserBox { BlockBox parent_instance; @@ -100,6 +109,8 @@ struct _BrowserBox GList *forms; GList *history; GList *history_position; + BTSState search_state; + gchar search_string[MAX_SEARCH_STRING_LEN + 1]; GtkStack *tabs; /* GHashTable *word_cache; */ }; @@ -125,6 +136,8 @@ void document_request_sm (BrowserBox *bb, SoupMessage *sm); void document_request (BrowserBox *bb, SoupURI *uri); gboolean history_back (BrowserBox *bb); gboolean history_forward (BrowserBox *bb); +void browser_box_set_status(BrowserBox *bb, const gchar *status_str); +void browser_box_display_search_status (BrowserBox *bb); GHashTable *word_cache; |