summaryrefslogtreecommitdiff
path: root/desktop/netsurf.c
blob: f8161c975819340a0ef4fc07410ce53a53d84324 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
 * $Id: netsurf.c,v 1.6 2003/02/09 12:58:15 bursa Exp $
 */

#include "netsurf/desktop/netsurf.h"
#include "netsurf/desktop/browser.h"
#include "netsurf/desktop/gui.h"
#include "netsurf/content/cache.h"
#include "netsurf/content/fetch.h"
#include "netsurf/utils/log.h"
#include <stdlib.h>

int netsurf_quit = 0;
gui_window* netsurf_gui_windows = NULL;


void netsurf_poll(void)
{
  gui_poll();
  fetch_poll();
}


void netsurf_init(int argc, char** argv)
{
  stdout = stderr;
  gui_init(argc, argv);
  fetch_init();
  cache_init();
}


void netsurf_exit(void)
{
  cache_quit();
  fetch_quit();
}


int main(int argc, char** argv)
{
  netsurf_init(argc, argv);

  while (netsurf_quit == 0)
    netsurf_poll();

  LOG(("Netsurf quit!"));
  netsurf_exit();

  return 0;
}