diff options
Diffstat (limited to 'frontends/riscos/window.c')
-rw-r--r-- | frontends/riscos/window.c | 57 |
1 files changed, 48 insertions, 9 deletions
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c index e2238ac5b..96346f800 100644 --- a/frontends/riscos/window.c +++ b/frontends/riscos/window.c @@ -4135,6 +4135,53 @@ ro_gui_window_import_text(struct gui_window *g, const char *filename) /** + * process miscellaneous window events + * + * \param gw The window receiving the event. + * \param event The event code. + * \return NSERROR_OK when processed ok + */ +static nserror +ro_gui_window_event(struct gui_window *gw, enum gui_window_event event) +{ + switch (event) { + case GW_EVENT_UPDATE_EXTENT: + gui_window_update_extent(gw); + break; + + case GW_EVENT_REMOVE_CARET: + gui_window_remove_caret(gw); + break; + + case GW_EVENT_SCROLL_START: + gui_window_scroll_start(gw); + break; + + case GW_EVENT_NEW_CONTENT: + gui_window_new_content(gw); + break; + + case GW_EVENT_START_THROBBER: + gui_window_start_throbber(gw); + break; + + case GW_EVENT_STOP_THROBBER: + gui_window_stop_throbber(gw); + break; + + case GW_EVENT_START_SELECTION: + /* from textselection */ + gui_start_selection(gw); + break; + + default: + break; + } + return NSERROR_OK; +} + + +/** * RISC OS browser window operation table */ static struct gui_window_table window_table = { @@ -4144,7 +4191,7 @@ static struct gui_window_table window_table = { .get_scroll = gui_window_get_scroll, .set_scroll = gui_window_set_scroll, .get_dimensions = gui_window_get_dimensions, - .update_extent = gui_window_update_extent, + .event = ro_gui_window_event, .set_title = gui_window_set_title, .set_url = ro_gui_window_set_url, @@ -4152,21 +4199,13 @@ static struct gui_window_table window_table = { .set_status = riscos_window_set_status, .set_pointer = gui_window_set_pointer, .place_caret = gui_window_place_caret, - .remove_caret = gui_window_remove_caret, .save_link = gui_window_save_link, .drag_start = gui_window_drag_start, - .scroll_start = gui_window_scroll_start, - .new_content = gui_window_new_content, - .start_throbber = gui_window_start_throbber, - .stop_throbber = gui_window_stop_throbber, .create_form_select_menu = gui_window_create_form_select_menu, /* from save */ .drag_save_object = gui_drag_save_object, .drag_save_selection =gui_drag_save_selection, - - /* from textselection */ - .start_selection = gui_start_selection, }; struct gui_window_table *riscos_window_table = &window_table; |