This page documents the functions that need to be implemented by each platform's front end.
The prototypes for these functions are usually in gui/gui.h. The implementations live in the platform code, for example gui_init() is implemented in each of amiga/gui.c, beos/beos_gui.cpp, framebuffer/gui.c, gtk/gtk_gui.c, riscos/gui.c, and windows/gui.c. Of course only one of those implementations is ever compiled into a binary of NetSurf.
Contents |
This is the standard C entry point. It should do any critical very-early initialization is required, and finish with
return netsurf_main(argc, argv);
The prototype may differ on some platforms.
General initialization of platform stuff. Prepare the gui for use, but don't yet open any windows.
It should call:
Should set default_stylesheet_url, quirks_stylesheet_url, and adblock_stylesheet_url.
(Called by netsurf_init() in desktop/netsurf.c.)
Last-step of initialization. Can open window(s) by calling browser_window_create() (e.g. depending on argv).
(Called by netsurf_init() in desktop/netsurf.c.)
Prepare for exit by doing whatever is needed by the platform.
It should call:
(Called by netsurf_exit() in desktop/netsurf.c.)
NetSurf's core will occasionally call this during long-running operations. It should yield briefly to the OS if applicable, and handle urgent gui events to keep NetSurf responsive. Then it should return quickly.
It must not call any function in the core or non-platform code.
| NetSurf Code Documentation | |
|---|---|
| Organization and Conventions | |
| Features | |
| Platform-specifics |
|
| References | |