summaryrefslogtreecommitdiff
path: root/frontends/amiga/gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/amiga/gui.c')
-rw-r--r--frontends/amiga/gui.c49
1 files changed, 43 insertions, 6 deletions
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index c2fec1b83..995ec4c4d 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -6284,6 +6284,48 @@ static char *ami_gui_get_user_dir(STRPTR current_user)
}
+/**
+ * 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_SELECTION:
+ gui_start_selection(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 amiga_window_table = {
.create = gui_window_create,
.destroy = gui_window_destroy,
@@ -6291,28 +6333,23 @@ static struct gui_window_table amiga_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_icon = gui_window_set_icon,
.set_title = gui_window_set_title,
.set_url = gui_window_set_url,
.set_status = gui_window_set_status,
.place_caret = gui_window_place_caret,
- .remove_caret = gui_window_remove_caret,
.drag_start = gui_window_drag_start,
- .new_content = gui_window_new_content,
.create_form_select_menu = gui_create_form_select_menu,
.file_gadget_open = gui_file_gadget_open,
.drag_save_object = gui_drag_save_object,
.drag_save_selection = gui_drag_save_selection,
- .start_selection = gui_start_selection,
.console_log = gui_window_console_log,
/* from theme */
.set_pointer = gui_window_set_pointer,
- .start_throbber = gui_window_start_throbber,
- .stop_throbber = gui_window_stop_throbber,
/* from download */
.save_link = gui_window_save_link,