diff options
author | Steve Fryatt <stevef@netsurf-browser.org> | 2013-09-08 11:55:21 +0100 |
---|---|---|
committer | Steve Fryatt <stevef@netsurf-browser.org> | 2013-09-08 11:55:21 +0100 |
commit | a00e0f91c7ccb27108cc396ca8afa3207935de4c (patch) | |
tree | dfe47712132b8f26f46fe319f3222b44c5e2e060 /riscos/wimp_event.c | |
parent | e87596ad1f7755c50f7a00edc85e66908ad1ba10 (diff) | |
download | netsurf-a00e0f91c7ccb27108cc396ca8afa3207935de4c.tar.gz netsurf-a00e0f91c7ccb27108cc396ca8afa3207935de4c.tar.bz2 |
Move all mouse tracking into ro_mouse module.
Add Pointer Entering Window events to wimp_event module and add handlers to all modules requiring mouse tracking.
Updated: Treeview, URL Complete, History and GUI Window.
Delete all handling for Pointer Entering/Leaving from ro_gui.
Diffstat (limited to 'riscos/wimp_event.c')
-rw-r--r-- | riscos/wimp_event.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/riscos/wimp_event.c b/riscos/wimp_event.c index 7dea8ed12..e87962039 100644 --- a/riscos/wimp_event.c +++ b/riscos/wimp_event.c @@ -96,6 +96,7 @@ struct event_window { void (*close_window)(wimp_w w); void (*redraw_window)(wimp_draw *redraw); void (*scroll_window)(wimp_scroll *scroll); + void (*entering_window)(wimp_entering *entering); bool (*menu_prepare)(wimp_w w, wimp_i i, wimp_menu *m, wimp_pointer *p); bool (*menu_selection)(wimp_w w, wimp_i i, wimp_menu *m, @@ -1134,6 +1135,24 @@ bool ro_gui_wimp_event_scroll_window(wimp_scroll *scroll) /** + * Handle any pointer entering window requests + * + * \param entering the pointer entering window request + */ +bool ro_gui_wimp_event_pointer_entering_window(wimp_entering *entering) +{ + struct event_window *window; + + window = ro_gui_wimp_event_find_window(entering->w); + if ((window) && (window->entering_window)) { + window->entering_window(entering); + return true; + } + return false; +} + + +/** * Process a Menu click in a window, by checking for a registered window * menu and opening it if one is found. * @@ -1491,6 +1510,22 @@ bool ro_gui_wimp_event_register_scroll_window(wimp_w w, } /** + * Register a function to be called for all pointer entering window requests. + */ + +bool ro_gui_wimp_event_register_pointer_entering_window(wimp_w w, + void (*callback)(wimp_entering *entering)) +{ + struct event_window *window; + + window = ro_gui_wimp_event_get_window(w); + if (!window) + return false; + window->entering_window = callback; + return true; +} + +/** * Register a function to be called before a menu is (re-)opened. * * \param *w The window for which events should be returned. @@ -1788,3 +1823,4 @@ void ro_gui_wimp_event_register_submenu(wimp_w w) ro_gui_wimp_event_close_window(ro_gui_wimp_event_submenu); ro_gui_wimp_event_submenu = w; } + |