summaryrefslogtreecommitdiff
path: root/desktop/gui_factory.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2014-01-13 14:51:27 +0000
committerVincent Sanders <vince@netsurf-browser.org>2014-01-13 14:51:27 +0000
commite82d83f1847ebc369a5f48a18217a8f5fecf3824 (patch)
tree2319e225f0c1cb9fec95d184e84d71b0eed93858 /desktop/gui_factory.c
parentd70e371cd99d35859b0514884163447fa793738a (diff)
downloadnetsurf-e82d83f1847ebc369a5f48a18217a8f5fecf3824.tar.gz
netsurf-e82d83f1847ebc369a5f48a18217a8f5fecf3824.tar.bz2
move four more optional window operations to table
Diffstat (limited to 'desktop/gui_factory.c')
-rw-r--r--desktop/gui_factory.c38
1 files changed, 35 insertions, 3 deletions
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;
}