diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-08-20 00:16:52 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-08-20 00:16:52 +0100 |
commit | 4dc4d8b318c9bee25ca9b2982495b2906cc76287 (patch) | |
tree | ce55d6902a33a0e00c388a65a450e05d19dd4d2c /desktop/selection.c | |
parent | c0e27bd0da9c6804c788473b891bff6c0c98af66 (diff) | |
download | netsurf-4dc4d8b318c9bee25ca9b2982495b2906cc76287.tar.gz netsurf-4dc4d8b318c9bee25ca9b2982495b2906cc76287.tar.bz2 |
add miscellaneous event to browser window callback table
extend the browser window callback table with a miscallaneous event
entry. This is used to replace all browser window callbacks which
take no parameters.
This reduces the API surface from seven separate calls to a single
call with an enumeration which may be readily extended.
The initial implementation in the frontends simply calls the original
implementations to reduce scope for errors.
Diffstat (limited to 'desktop/selection.c')
-rw-r--r-- | desktop/selection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop/selection.c b/desktop/selection.c index 10aa4c7dd..c8edda7b1 100644 --- a/desktop/selection.c +++ b/desktop/selection.c @@ -307,7 +307,7 @@ bool selection_click(struct selection *s, browser_mouse_state mouse, s->drag_state = DRAG_END; - guit->window->start_selection(top->window); + guit->window->event(top->window, GW_EVENT_START_SELECTION); } else if (mouse & BROWSER_MOUSE_DRAG_2) { @@ -326,7 +326,7 @@ bool selection_click(struct selection *s, browser_mouse_state mouse, s->drag_state = DRAG_START; } - guit->window->start_selection(top->window); + guit->window->event(top->window, GW_EVENT_START_SELECTION); } else if (mouse & BROWSER_MOUSE_CLICK_2) { |