From 811106028fd050cdee11fbc8732ba39f2de5e12a Mon Sep 17 00:00:00 2001 From: Phil Mellor Date: Wed, 11 Sep 2002 14:24:02 +0000 Subject: [project @ 2002-09-11 14:24:02 by monkeyson] RISC OS Wimp GUI. svn path=/import/netsurf/; revision=33 --- desktop/netsurf.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 desktop/netsurf.c (limited to 'desktop/netsurf.c') diff --git a/desktop/netsurf.c b/desktop/netsurf.c new file mode 100644 index 000000000..cc53acc05 --- /dev/null +++ b/desktop/netsurf.c @@ -0,0 +1,50 @@ +/** + * $Id: netsurf.c,v 1.1 2002/09/11 14:24:02 monkeyson Exp $ + */ + +#include "netsurf/desktop/netsurf.h" +#include "netsurf/desktop/fetch.h" +#include "netsurf/desktop/browser.h" +#include "netsurf/desktop/gui.h" +#include + +int netsurf_quit = 0; +gui_window* netsurf_gui_windows = NULL; +struct fetch* netsurf_fetches = NULL; + + +void netsurf_poll(void) +{ + gui_poll(); + netsurf_fetches = fetch_poll(netsurf_fetches); +} + + +void netsurf_init(int argc, char** argv) +{ + gui_init(argc, argv); +} + + +int main(int argc, char** argv) +{ + netsurf_init(argc, argv); + + while (netsurf_quit == 0) + netsurf_poll(); + + return 0; +} + + +void Log(char* func, char* msg) +{ +#ifdef NETSURF_DUMP + FILE* logfile = NULL; + logfile = fopen("logfile","a"); + if (logfile == NULL) + die("can't open logfile"); + fprintf(logfile, "%s: %s\n", func, msg); + fclose(logfile); +#endif +} -- cgit v1.2.3