From e82d83f1847ebc369a5f48a18217a8f5fecf3824 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 13 Jan 2014 14:51:27 +0000 Subject: move four more optional window operations to table --- desktop/gui_factory.c | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) (limited to 'desktop/gui_factory.c') diff --git a/desktop/gui_factory.c b/desktop/gui_factory.c index 62ec8c565..e03e7dae0 100644 --- a/desktop/gui_factory.c +++ b/desktop/gui_factory.c @@ -59,11 +59,31 @@ static void gui_default_window_new_content(struct gui_window *g) { } + static bool gui_default_window_scroll_start(struct gui_window *g) { return true; } +static void gui_default_window_set_pointer(struct gui_window *g, + gui_pointer_shape shape) +{ +} + +static void gui_default_window_set_status(struct gui_window *g, + const char *text) +{ +} + +static void gui_default_window_place_caret(struct gui_window *g, + int x, int y, int height, + const struct rect *clip) +{ +} + +static void gui_default_window_remove_caret(struct gui_window *g) +{ +} /** verify window table is valid */ static nserror verify_window_register(struct gui_window_table *gwt) @@ -107,6 +127,21 @@ static nserror verify_window_register(struct gui_window_table *gwt) if (gwt->set_url == NULL) { gwt->set_url = gui_default_window_set_url; } + if (gwt->set_icon == NULL) { + gwt->set_icon = gui_default_window_set_icon; + } + if (gwt->set_status == NULL) { + gwt->set_status = gui_default_window_set_status; + } + if (gwt->set_pointer == NULL) { + gwt->set_pointer = gui_default_window_set_pointer; + } + if (gwt->place_caret == NULL) { + gwt->place_caret = gui_default_window_place_caret; + } + if (gwt->remove_caret == NULL) { + gwt->remove_caret = gui_default_window_remove_caret; + } if (gwt->start_throbber == NULL) { gwt->start_throbber = gui_default_window_start_throbber; } @@ -119,9 +154,6 @@ static nserror verify_window_register(struct gui_window_table *gwt) if (gwt->save_link == NULL) { gwt->save_link = gui_default_window_save_link; } - if (gwt->set_icon == NULL) { - gwt->set_icon = gui_default_window_set_icon; - } if (gwt->scroll_visible == NULL) { gwt->scroll_visible = gui_default_window_scroll_visible; } -- cgit v1.2.3