summaryrefslogtreecommitdiff
path: root/desktop/gui_factory.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-01-12 22:55:26 +0000
committerVincent Sanders <vince@kyllikki.org>2014-01-12 22:55:26 +0000
commit4b49b4ac775a1e3ca0c59f390f3f2427e31bce2b (patch)
tree311a26dd1e0d387172cfd28d83a6e92b6d2538f4 /desktop/gui_factory.c
parentb7736bae2f37675be55b1c89d33b03e8603b2946 (diff)
downloadnetsurf-4b49b4ac775a1e3ca0c59f390f3f2427e31bce2b.tar.gz
netsurf-4b49b4ac775a1e3ca0c59f390f3f2427e31bce2b.tar.bz2
move more optional window operations into table including removing unused hide_pointer operation altogether
Diffstat (limited to 'desktop/gui_factory.c')
-rw-r--r--desktop/gui_factory.c48
1 files changed, 36 insertions, 12 deletions
diff --git a/desktop/gui_factory.c b/desktop/gui_factory.c
index 3ced1901f..73fb016e4 100644
--- a/desktop/gui_factory.c
+++ b/desktop/gui_factory.c
@@ -9,6 +9,11 @@ static void gui_default_quit(void)
{
}
+static void gui_default_set_search_ico(hlcache_handle *ico)
+{
+}
+
+
static void gui_default_window_set_title(struct gui_window *g, const char *title)
{
}
@@ -25,31 +30,41 @@ static void gui_default_window_stop_throbber(struct gui_window *g)
{
}
-static bool
-gui_default_window_drag_start(struct gui_window *g,
- gui_drag_type type,
- const struct rect *rect)
+static bool gui_default_window_drag_start(struct gui_window *g,
+ gui_drag_type type,
+ const struct rect *rect)
{
return true;
}
-static void
-gui_default_window_save_link(struct gui_window *g,
- const char *url,
- const char *title)
+static void gui_default_window_save_link(struct gui_window *g,
+ const char *url,
+ const char *title)
{
}
-static void
-gui_default_window_set_icon(struct gui_window *g, hlcache_handle *icon)
+static void gui_default_window_set_icon(struct gui_window *g,
+ hlcache_handle *icon)
{
}
-static void
-gui_default_set_search_ico(hlcache_handle *ico)
+static void gui_default_window_scroll_visible(struct gui_window *g,
+ int x0, int y0,
+ int x1, int y1)
{
+ gui_window_set_scroll(g, x0, y0);
}
+static void gui_default_window_new_content(struct gui_window *g)
+{
+}
+
+static bool gui_default_window_scroll_start(struct gui_window *g)
+{
+ return true;
+}
+
+
/** verify window table is valid */
static nserror verify_window_register(struct gui_window_table *gwt)
{
@@ -88,6 +103,15 @@ static nserror verify_window_register(struct gui_window_table *gwt)
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;
+ }
+ if (gwt->new_content == NULL) {
+ gwt->new_content = gui_default_window_new_content;
+ }
+ if (gwt->scroll_start == NULL) {
+ gwt->scroll_start = gui_default_window_scroll_start;
+ }
return NSERROR_OK;
}