2002-09-11 18:24:02 +04:00
|
|
|
/**
|
2003-03-04 14:59:36 +03:00
|
|
|
* $Id: netsurf.c,v 1.7 2003/03/04 11:59:35 bursa Exp $
|
2002-09-11 18:24:02 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "netsurf/desktop/netsurf.h"
|
|
|
|
#include "netsurf/desktop/browser.h"
|
|
|
|
#include "netsurf/desktop/gui.h"
|
2003-02-09 15:58:15 +03:00
|
|
|
#include "netsurf/content/cache.h"
|
|
|
|
#include "netsurf/content/fetch.h"
|
|
|
|
#include "netsurf/utils/log.h"
|
2002-09-11 18:24:02 +04:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
int netsurf_quit = 0;
|
|
|
|
gui_window* netsurf_gui_windows = NULL;
|
|
|
|
|
2003-03-04 14:59:36 +03:00
|
|
|
static void netsurf_init(int argc, char** argv);
|
|
|
|
static void netsurf_exit(void);
|
|
|
|
|
2002-09-11 18:24:02 +04:00
|
|
|
|
|
|
|
void netsurf_poll(void)
|
|
|
|
{
|
|
|
|
gui_poll();
|
2003-02-09 15:58:15 +03:00
|
|
|
fetch_poll();
|
2002-09-11 18:24:02 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void netsurf_init(int argc, char** argv)
|
|
|
|
{
|
2002-10-08 13:38:29 +04:00
|
|
|
stdout = stderr;
|
2002-09-11 18:24:02 +04:00
|
|
|
gui_init(argc, argv);
|
2003-02-09 15:58:15 +03:00
|
|
|
fetch_init();
|
2002-11-03 12:39:53 +03:00
|
|
|
cache_init();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void netsurf_exit(void)
|
|
|
|
{
|
|
|
|
cache_quit();
|
2003-02-09 15:58:15 +03:00
|
|
|
fetch_quit();
|
2002-09-11 18:24:02 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
|
|
|
netsurf_init(argc, argv);
|
|
|
|
|
|
|
|
while (netsurf_quit == 0)
|
|
|
|
netsurf_poll();
|
|
|
|
|
2003-02-09 15:58:15 +03:00
|
|
|
LOG(("Netsurf quit!"));
|
2002-11-03 12:39:53 +03:00
|
|
|
netsurf_exit();
|
2002-10-15 14:41:12 +04:00
|
|
|
|
2002-09-11 18:24:02 +04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|