summaryrefslogtreecommitdiff
path: root/monkey
diff options
context:
space:
mode:
Diffstat (limited to 'monkey')
-rw-r--r--monkey/browser.c4
-rw-r--r--monkey/browser.h6
-rw-r--r--monkey/download.c4
-rw-r--r--monkey/main.c11
4 files changed, 13 insertions, 12 deletions
diff --git a/monkey/browser.c b/monkey/browser.c
index 97bd0be8b..85e25d9ea 100644
--- a/monkey/browser.c
+++ b/monkey/browser.c
@@ -503,7 +503,7 @@ monkey_window_handle_command(int argc, char **argv)
}
-static struct gui_window_table gui_window_table = {
+static struct gui_window_table window_table = {
.create = gui_window_create,
.destroy = gui_window_destroy,
.redraw = gui_window_redraw_window,
@@ -529,4 +529,4 @@ static struct gui_window_table gui_window_table = {
.stop_throbber = gui_window_stop_throbber,
};
-struct gui_window_table *monkey_gui_window_table = &gui_window_table;
+struct gui_window_table *monkey_window_table = &window_table;
diff --git a/monkey/browser.h b/monkey/browser.h
index 6c74a412c..959c6a1e6 100644
--- a/monkey/browser.h
+++ b/monkey/browser.h
@@ -22,6 +22,9 @@
#include "desktop/browser.h"
#include "content/hlcache.h"
+extern struct gui_window_table *monkey_window_table;
+extern struct gui_download_table *monkey_download_table;
+
struct gui_window {
struct gui_window *r_next;
struct gui_window *r_prev;
@@ -36,9 +39,6 @@ struct gui_window {
};
-extern struct gui_window_table *monkey_gui_window_table;
-extern struct gui_download_table *monkey_gui_download_table;
-
struct gui_window *monkey_find_window_by_num(uint32_t win_num);
struct gui_window *monkey_find_window_by_content(hlcache_handle *content);
void monkey_window_process_reformats(void);
diff --git a/monkey/download.c b/monkey/download.c
index 46d54dc0c..d2e3b4b24 100644
--- a/monkey/download.c
+++ b/monkey/download.c
@@ -78,11 +78,11 @@ gui_download_window_done(struct gui_download_window *dw)
free(dw);
}
-static struct gui_download_table gui_download_table = {
+static struct gui_download_table download_table = {
.create = gui_download_window_create,
.data = gui_download_window_data,
.error = gui_download_window_error,
.done = gui_download_window_done,
};
-struct gui_download_table *monkey_gui_download_table = &gui_download_table;
+struct gui_download_table *monkey_download_table = &download_table;
diff --git a/monkey/main.c b/monkey/main.c
index 419543e29..22aaf1e06 100644
--- a/monkey/main.c
+++ b/monkey/main.c
@@ -114,7 +114,7 @@ static bool nslog_stream_configure(FILE *fptr)
return true;
}
-static struct gui_table monkey_gui_table = {
+static struct gui_browser_table monkey_browser_table = {
.poll = monkey_poll,
.quit = monkey_quit,
.get_resource_url = gui_get_resource_url,
@@ -129,6 +129,11 @@ main(int argc, char **argv)
char *options;
char buf[PATH_MAX];
nserror ret;
+ struct gui_table monkey_gui_table = {
+ .browser = &monkey_browser_table,
+ .window = monkey_window_table,
+ .download = monkey_download_table,
+ };
/* Unbuffer stdin/out/err */
setbuf(stdin, NULL);
@@ -155,10 +160,6 @@ main(int argc, char **argv)
/* common initialisation */
messages = filepath_find(respaths, "Messages");
-
- monkey_gui_table.window = monkey_gui_window_table;
- monkey_gui_table.download = monkey_gui_download_table;
-
ret = netsurf_init(messages, &monkey_gui_table);
free(messages);
if (ret != NSERROR_OK) {