diff options
Diffstat (limited to 'frontends/atari/gui.c')
-rw-r--r-- | frontends/atari/gui.c | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/frontends/atari/gui.c b/frontends/atari/gui.c index 64e83fc8f..e55271c10 100644 --- a/frontends/atari/gui.c +++ b/frontends/atari/gui.c @@ -1040,6 +1040,45 @@ static void gui_init(int argc, char** argv) toolbar_init(); } + +/** + * process miscellaneous window events + * + * \param gw The window receiving the event. + * \param event The event code. + * \return NSERROR_OK when processed ok + */ +static nserror +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_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; + + default: + break; + } + return NSERROR_OK; +} + + static struct gui_window_table atari_window_table = { .create = gui_window_create, .destroy = gui_window_destroy, @@ -1047,7 +1086,7 @@ static struct gui_window_table atari_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 = gui_window_event, .set_title = gui_window_set_title, .set_url = gui_window_set_url, @@ -1055,10 +1094,6 @@ static struct gui_window_table atari_window_table = { .set_status = atari_window_set_status, .set_pointer = gui_window_set_pointer, .place_caret = gui_window_place_caret, - .remove_caret = gui_window_remove_caret, - .new_content = gui_window_new_content, - .start_throbber = gui_window_start_throbber, - .stop_throbber = gui_window_stop_throbber, }; static struct gui_clipboard_table atari_clipboard_table = { |