summaryrefslogtreecommitdiff
path: root/beos
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-01-12 17:07:34 +0000
committerVincent Sanders <vince@kyllikki.org>2014-01-12 17:07:34 +0000
commitb7736bae2f37675be55b1c89d33b03e8603b2946 (patch)
tree31d4c9aa165b71ff33d181b0d2b4982812963100 /beos
parent56bb9582b16dfd45bbd1665adaf87c6c5986aed3 (diff)
downloadnetsurf-b7736bae2f37675be55b1c89d33b03e8603b2946.tar.gz
netsurf-b7736bae2f37675be55b1c89d33b03e8603b2946.tar.bz2
split gui operations into core and window and move more operations into tables
Diffstat (limited to 'beos')
-rw-r--r--beos/gui.cpp17
-rw-r--r--beos/scaffolding.cpp9
-rw-r--r--beos/scaffolding.h2
-rw-r--r--beos/window.cpp22
-rw-r--r--beos/window.h9
5 files changed, 21 insertions, 38 deletions
diff --git a/beos/gui.cpp b/beos/gui.cpp
index c5e2fe482..42a681c30 100644
--- a/beos/gui.cpp
+++ b/beos/gui.cpp
@@ -791,11 +791,6 @@ void gui_create_form_select_menu(struct browser_window *bw,
CALLED();
}
-void
-gui_window_save_link(struct gui_window *g, const char *url, const char *title)
-{
-}
-
/**
* Send the source of a content to a text editor.
*/
@@ -1089,15 +1084,6 @@ void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
static struct gui_table beos_gui_table = {
.poll = gui_poll,
.quit = gui_quit,
-
- .window_create = gui_window_create,
- .window_destroy = gui_window_destroy,
-
- .window_set_title = gui_window_set_title,
- .window_set_url = gui_window_set_url,
- .window_start_throbber = gui_window_start_throbber,
- .window_stop_throbber = gui_window_stop_throbber,
-
};
@@ -1131,6 +1117,9 @@ int main(int argc, char** argv)
/* common initialisation */
BPath messages = get_messages_path();
+
+ beos_gui_table.window = beos_gui_window_table;
+
ret = netsurf_init(messages.Path(), &beos_gui_table);
if (ret != NSERROR_OK) {
die("NetSurf failed to initialise");
diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp
index 51235b6d0..f302efcb4 100644
--- a/beos/scaffolding.cpp
+++ b/beos/scaffolding.cpp
@@ -2194,15 +2194,6 @@ void gui_window_set_icon(struct gui_window *_g, hlcache_handle *icon)
g->top_view->UnlockLooper();
}
-/**
-* set gui display of a retrieved favicon representing the search provider
-* \param ico may be NULL for local calls; then access current cache from
-* search_web_ico()
-*/
-void gui_window_set_search_ico(hlcache_handle *ico)
-{
-}
-
void nsbeos_scaffolding_popup_menu(nsbeos_scaffolding *g, BPoint where)
{
diff --git a/beos/scaffolding.h b/beos/scaffolding.h
index 210499fc7..fe726147c 100644
--- a/beos/scaffolding.h
+++ b/beos/scaffolding.h
@@ -204,6 +204,6 @@ void gui_window_set_title(struct gui_window *_g, const char *title);
void gui_window_set_url(struct gui_window *_g, const char *url);
void gui_window_start_throbber(struct gui_window* _g);
void gui_window_stop_throbber(struct gui_window* _g);
-
+void gui_window_set_icon(struct gui_window *_g, hlcache_handle *icon);
#endif /* NETSURF_BEOS_SCAFFOLDING_H */
diff --git a/beos/window.cpp b/beos/window.cpp
index e2c17d7e0..c4a3784e5 100644
--- a/beos/window.cpp
+++ b/beos/window.cpp
@@ -335,7 +335,7 @@ float nsbeos_get_scale_for_gui(struct gui_window *g)
}
/* Create a gui_window */
-struct gui_window *gui_window_create(struct browser_window *bw,
+static struct gui_window *gui_window_create(struct browser_window *bw,
struct browser_window *clone,
bool new_tab)
{
@@ -957,7 +957,7 @@ void nsbeos_window_destroy_browser(struct gui_window *g)
browser_window_destroy(g->bw);
}
-void gui_window_destroy(struct gui_window *g)
+static void gui_window_destroy(struct gui_window *g)
{
if (!g)
return;
@@ -1284,11 +1284,6 @@ bool gui_window_scroll_start(struct gui_window *g)
return true;
}
-bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- const struct rect *rect)
-{
- return true;
-}
void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
struct gui_window *g)
@@ -1384,3 +1379,16 @@ void gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
}
}
+static struct gui_window_table gui_window_table = {
+ .create = gui_window_create,
+ .destroy = gui_window_destroy,
+
+ /* from scaffold */
+ .set_icon = gui_window_set_icon,
+ .set_title = gui_window_set_title,
+ .set_url = gui_window_set_url,
+ .start_throbber = gui_window_start_throbber,
+ .stop_throbber = gui_window_stop_throbber,
+};
+
+struct gui_window_table *beos_gui_window_table = &gui_window_table;
diff --git a/beos/window.h b/beos/window.h
index 012fbe06f..4bd38de4e 100644
--- a/beos/window.h
+++ b/beos/window.h
@@ -25,6 +25,8 @@ extern "C" {
}
#include "beos/scaffolding.h"
+extern struct gui_window_table *beos_gui_window_table;
+
class NSBrowserFrameView : public BView {
public:
NSBrowserFrameView(BRect frame, struct gui_window *gui);
@@ -48,7 +50,6 @@ private:
void nsbeos_dispatch_event(BMessage *message);
-
void nsbeos_reflow_all_windows(void);
void nsbeos_window_process_reformats(void);
@@ -61,10 +62,4 @@ void nsbeos_window_destroy_browser(struct gui_window *g);
struct browser_window *nsbeos_get_browser_window(struct gui_window *g);
-
-struct gui_window *gui_window_create(struct browser_window *bw,
- struct browser_window *clone,
- bool new_tab);
-void gui_window_destroy(struct gui_window *g);
-
#endif /* NETSURF_BEOS_WINDOW_H */