26#include <libwapcaplet/libwapcaplet.h>
75#define SPECULATE_SMALL 4096
78#define IMAGE_CACHE_CLEAN_TIME (10 * 1000)
81#define HL_CACHE_CLEAN_TIME (2 * IMAGE_CACHE_CLEAN_TIME)
86#define MINIMUM_MEMORY_CACHE_SIZE (2 * 1024 * 1024)
89#define LLCACHE_STORE_MIN_LIFETIME (60 * 30)
92#define LLCACHE_STORE_MIN_BANDWIDTH (128 * 1024)
95#define LLCACHE_STORE_MAX_BANDWIDTH (1024 * 1024)
98#define LLCACHE_STORE_TIME_QUANTUM (100)
102 NSLOG(netsurf, WARNING,
"[%3"PRIu32
"] %.*s", str->refcnt,
103 (
int)lwc_string_length(str), lwc_string_data(str));
132 signal(SIGPIPE, SIG_IGN);
150 "Setting minimum memory cache size %"PRIsizet,
200 setlocale(LC_ALL,
"");
236 NSLOG(netsurf, INFO,
"Closing GUI");
239 NSLOG(netsurf, INFO,
"Finalising page-info module");
242 NSLOG(netsurf, INFO,
"Finalising JavaScript");
245 NSLOG(netsurf, INFO,
"Finalising Web Search");
248 NSLOG(netsurf, INFO,
"Finalising high-level cache");
251 NSLOG(netsurf, INFO,
"Closing fetches");
262 NSLOG(netsurf, INFO,
"Closing utf8");
265 NSLOG(netsurf, INFO,
"Destroying URLdb");
268 NSLOG(netsurf, INFO,
"Destroying System colours");
271 NSLOG(netsurf, INFO,
"Destroying Messages");
275 if (dom_namespace_finalise() != DOM_NO_ERR) {
276 NSLOG(netsurf, WARNING,
"Unable to finalise DOM namespace strings");
278 NSLOG(netsurf, INFO,
"Remaining lwc strings:");
281 NSLOG(netsurf, INFO,
"Exited successfully");
Browser window private structure.
Browser window creation and manipulation interface.
void fetcher_quit(void)
Clean up for quit.
nserror fetcher_init(void)
Initialise all registered fetchers.
nserror image_init(void)
Initialise image content handlers.
Initialisation/finalisation of image handlers.
void content_factory_fini(void)
Clean up after the content factory.
nserror corestrings_fini(void)
free resources of core string tables.
nserror corestrings_init(void)
Initialise the core string tables.
Useful interned string pointers (interface).
nserror nscss_init(void)
Initialise the CSS content handler.
nserror search_web_finalise(void)
Finalise the web search operations freeing all resources.
nserror
Enumeration of error codes.
Interface for fetchers factory.
struct netsurf_table * guit
The global interface table.
Interface to core interface table.
nserror hlcache_initialise(const struct hlcache_parameters *hlcache_parameters)
Initialise the high-level cache, preparing the llcache also.
void hlcache_finalise(void)
Finalise the high-level cache, destroying any remaining contents.
void hlcache_stop(void)
Stop the high-level cache periodic functionality so that the exit sequence can run.
High-level resource cache interface.
nserror html_init(void)
initialise content handler
Interface to text/html content handler.
nserror image_cache_fini(void)
nserror image_cache_init(const struct image_cache_parameters *image_cache_parameters)
Initialise the image cache.
The image content handler intermediate image cache.
Interface to platform-specific miscellaneous browser operation table.
Netsurf additional integer type formatting macros.
#define PRIsizet
c99 standard printf formatting for size_t type
Interface to javascript engine functions.
void js_finalise(void)
finalise javascript interpreter
void js_initialise(void)
Initialise javascript interpreter.
#define NSLOG(catname, level, logmsg, args...)
void messages_destroy(void)
Free memory used by the standard Messages hash.
Localised message support (interface).
MIME type sniffer interface.
#define LLCACHE_STORE_MIN_BANDWIDTH
default minimum bandwidth for backing store writeout.
void netsurf_exit(void)
Clean up components used by gui NetSurf.
#define MINIMUM_MEMORY_CACHE_SIZE
ensure there is a minimal amount of memory for source objetcs and decoded bitmaps.
#define HL_CACHE_CLEAN_TIME
default time between content cache cleans.
static void netsurf_lwc_iterator(lwc_string *str, void *pw)
#define IMAGE_CACHE_CLEAN_TIME
the time between image cache clean runs in ms.
#define LLCACHE_STORE_MAX_BANDWIDTH
default maximum bandwidth for backing store writeout.
nserror netsurf_init(const char *store_path)
Initialise netsurf core.
#define SPECULATE_SMALL
speculative pre-conversion small image size
#define LLCACHE_STORE_MIN_LIFETIME
default minimum object time before object is pushed to backing store.
#define LLCACHE_STORE_TIME_QUANTUM
default time quantum with which to calculate bandwidth (ms)
NetSurf core interface registration, construction and destruction.
nserror nscolour_update(void)
Update the nscolour table from the current nsoptions.
NetSurf UI colours (interface).
nserror page_info_fini(void)
Finalise the page_info module.
nserror page_info_init(void)
Initialise the page_info module.
Pave info viewer window interface.
core web search facilities interface.
Interface to utility string handling.
void(* quit)(void)
called to allow the gui to cleanup.
unsigned int bg_clean_time
How frequently the background cache clean process is run (ms)
struct llcache_parameters llcache
unsigned int bg_clean_time
How frequently the background cache clean process is run (ms)
size_t limit
The target upper bound for the image cache size.
size_t hysteresis
The hysteresis allowed round the target size.
struct llcache_store_parameters store
size_t limit
The target upper bound for the RAM cache size.
uint32_t fetch_attempts
The number of fetches to attempt when timing out.
size_t hysteresis
The hysteresis around the target size.
size_t limit
The backing store upper bound target size.
const char * path
The path to the backing store.
struct gui_misc_table * misc
Browser table.
nserror ns_system_colour_init(void)
Initialise the system colours.
void ns_system_colour_finalize(void)
release any resources associated with the system colours.
Interface to system colour values.
nserror textplain_init(void)
Initialise the text content handler.
Interface to content handler for plain text.
void urldb_destroy(void)
Destroy urldb.
Unified URL information database internal interface.
void free_user_agent_string(void)
Free any memory allocated for the user_agent_string.
Option reading and saving interface.
#define nsoption_charp(OPTION)
Get the value of a string option.
#define nsoption_int(OPTION)
Get the value of an integer option.
#define nsoption_uint(OPTION)
Get the value of an unsigned integer option.
nserror utf8_finalise(void)
Finalise the UTF-8 library.
UTF-8 manipulation functions (interface).