summaryrefslogtreecommitdiff
path: root/riscos/gui.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-01-11 14:20:30 +0000
committerVincent Sanders <vince@kyllikki.org>2014-01-11 14:20:30 +0000
commitd3c392c3d3b516f05fbf71020b2f6774ce20ce8c (patch)
treebad0d50f6d2d7bfc52774745ce10e69ce0ff5bff /riscos/gui.c
parenta856439afb743c7fa16f51108862b99a1f56c82a (diff)
downloadnetsurf-d3c392c3d3b516f05fbf71020b2f6774ce20ce8c.tar.gz
netsurf-d3c392c3d3b516f05fbf71020b2f6774ce20ce8c.tar.bz2
Initial conversion of netsurf gui to callback vtable
Diffstat (limited to 'riscos/gui.c')
-rw-r--r--riscos/gui.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/riscos/gui.c b/riscos/gui.c
index ae5ea383e..5a6668bfd 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -837,6 +837,12 @@ static bool nslog_stream_configure(FILE *fptr)
return true;
}
+static struct gui_table riscos_gui_table = {
+ .poll = &gui_poll,
+ .quit = &gui_quit,
+};
+
+
/** Normal entry point from OS */
int main(int argc, char** argv)
{
@@ -891,7 +897,7 @@ int main(int argc, char** argv)
}
/* common initialisation */
- ret = netsurf_init(path);
+ ret = netsurf_init(path, &riscos_gui_table);
if (ret != NSERROR_OK) {
die("NetSurf failed to initialise");
}
@@ -919,7 +925,7 @@ int main(int argc, char** argv)
* Close down the gui (RISC OS).
*/
-void gui_quit(void)
+static void gui_quit(void)
{
urldb_save_cookies(nsoption_charp(cookie_jar));
urldb_save(nsoption_charp(url_save));
@@ -1024,7 +1030,7 @@ void ro_gui_cleanup(void)
* \param active return as soon as possible
*/
-void gui_poll(bool active)
+static void gui_poll(bool active)
{
wimp_event_no event;
wimp_block block;