summaryrefslogtreecommitdiff
path: root/desktop/netsurf.c
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/netsurf.c')
-rw-r--r--desktop/netsurf.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/desktop/netsurf.c b/desktop/netsurf.c
index 36b0b589a..10dc7ba68 100644
--- a/desktop/netsurf.c
+++ b/desktop/netsurf.c
@@ -41,6 +41,7 @@
#include "desktop/browser.h"
#include "desktop/system_colour.h"
#include "desktop/gui.h"
+#include "desktop/gui_factory.h"
#include "utils/nsoption.h"
#include "desktop/searchweb.h"
@@ -116,7 +117,7 @@ static nserror netsurf_llcache_query_handler(const llcache_query *query,
* Initialise components used by gui NetSurf.
*/
-nserror netsurf_init(const char *messages)
+nserror netsurf_init(const char *messages, struct gui_table *gt)
{
nserror error;
struct utsname utsname;
@@ -150,6 +151,11 @@ nserror netsurf_init(const char *messages)
utsname.nodename, utsname.release,
utsname.version, utsname.machine));
+ /* register the gui handlers */
+ error = gui_factory_register(gt);
+ if (error != NSERROR_OK)
+ return error;
+
messages_load(messages);
/* corestrings init */
@@ -228,7 +234,7 @@ nserror netsurf_init(const char *messages)
int netsurf_main_loop(void)
{
while (!netsurf_quit) {
- gui_poll(fetch_active);
+ guit->poll(fetch_active);
hlcache_poll();
}
@@ -244,7 +250,7 @@ void netsurf_exit(void)
hlcache_stop();
LOG(("Closing GUI"));
- gui_quit();
+ guit->quit();
LOG(("Finalising JavaScript"));
js_finalise();