NetSurf
|
Interface to system colour values. More...
Go to the source code of this file.
Functions | |
css_error | ns_system_colour (void *pw, lwc_string *name, css_color *color) |
css callback to obtain named system colour. More... | |
nserror | ns_system_colour_char (const char *name, colour *color) |
Obtain a system colour from a name. More... | |
nserror | ns_system_colour_init (void) |
Initialise the system colours. More... | |
void | ns_system_colour_finalize (void) |
release any resources associated with the system colours. More... | |
Interface to system colour values.
Netsurf has a list of user configurable colours with frontend specific defaults. These colours are used for the css system colours and to colour and style internally rendered widgets (e.g. cookies treeview or local file directory views.
Definition in file system_colour.h.
css_error ns_system_colour | ( | void * | pw, |
lwc_string * | name, | ||
css_color * | color | ||
) |
css callback to obtain named system colour.
[in] | pw | context unused in implementation |
[in] | name | The name of the colour being looked up |
[out] | color | The system colour associated with the name. |
Definition at line 95 of file system_colour.c.
References colour_list, colour_list_len, ns_color_to_nscss, NSOPTION_SYS_COLOUR_START, nsoptions, and nsoption_s::value.
Referenced by nscss_create_css_data(), nscss_create_inline_style(), and nscss_register_import().
Obtain a system colour from a name.
[in] | name | The name of the colour being looked up |
[out] | color | The system colour associated with the name in the netsurf colour representation. |
Definition at line 78 of file system_colour.c.
References nsoption_s::c, colour_list_len, nsoption_s::key, NSERROR_INVALID, NSERROR_OK, NSOPTION_SYS_COLOUR_START, nsoptions, SLEN, and nsoption_s::value.
Referenced by nscolour__get(), and nscolour_update().
void ns_system_colour_finalize | ( | void | ) |
release any resources associated with the system colours.
Definition at line 67 of file system_colour.c.
References colour_list, and colour_list_len.
Referenced by netsurf_exit().
nserror ns_system_colour_init | ( | void | ) |
Initialise the system colours.
Definition at line 42 of file system_colour.c.
References colour_list, colour_list_len, nsoption_s::key, nsoption_s::key_len, ns_system_colour_pw, NSERROR_INIT_FAILED, NSERROR_NOMEM, NSERROR_OK, NSOPTION_SYS_COLOUR_START, nsoptions, and SLEN.
Referenced by netsurf_init().