NetSurf
|
NetSurf UI colours (implementation). More...
#include <stdio.h>
#include <assert.h>
#include <stddef.h>
#include <stdbool.h>
#include "netsurf/inttypes.h"
#include "netsurf/plot_style.h"
#include "utils/errors.h"
#include "utils/nscolour.h"
#include "desktop/system_colour.h"
Go to the source code of this file.
Functions | |
static nserror | nscolour__get (const char *name_bg, const char *name_fg, unsigned bg_num, unsigned bg_den, colour *bg, colour *bg_hover, colour *fg, colour *fg_subtle, colour *fg_faded, colour *fg_good, colour *fg_bad, colour *border) |
Set some colours up from a couple of system colour entries. More... | |
nserror | nscolour_update (void) |
Update the nscolour table from the current nsoptions. More... | |
nserror | nscolour_get_stylesheet (const char **stylesheet_out) |
Get a pointer to a stylesheet for nscolours. More... | |
Variables | |
colour | nscolours [NSCOLOUR__COUNT] |
NetSurf UI colour table. More... | |
NetSurf UI colours (implementation).
Builds common colours used throughout NetSurf's interface.
Definition in file nscolour.c.
|
static |
Set some colours up from a couple of system colour entries.
[in] | name_bg | Name of choices string for background colour lookup. |
[in] | name_fg | Name of choices string for foreground colour lookup. |
[in] | bg_num | Numerator for background adjustment ratio. |
[in] | bg_den | Denominator for backfground adjustment ratio. |
[out] | bg | Returns the background colour. |
[out] | bg_hover | Returns the hovered background colour. |
[out] | fg | Returns the foreground colour. |
[out] | fg_subtle | Returns the subtle foreground colour. |
[out] | fg_faded | Returns the faded foreground colour. |
[out] | fg_good | Returns the good foreground colour. |
[out] | fg_bad | Returns the bad foreground colour. |
[out] | border | Returns the border colour. |
Definition at line 56 of file nscolour.c.
References colour_engorge_component(), colour_lightness, half_darken_colour, half_lighten_colour, mix_colour, ns_system_colour_char(), NSERROR_OK, PLOT_COLOUR_COMPONENT_GREEN, and PLOT_COLOUR_COMPONENT_RED.
Referenced by nscolour_update().
nserror nscolour_get_stylesheet | ( | const char ** | stylesheet_out | ) |
Get a pointer to a stylesheet for nscolours.
Definition at line 206 of file nscolour.c.
References buffer, colour_rb_swap, NSCOLOUR_WIN_EVEN_BG, NSCOLOUR_WIN_EVEN_BG_HOVER, NSCOLOUR_WIN_EVEN_BORDER, NSCOLOUR_WIN_EVEN_FG, NSCOLOUR_WIN_EVEN_FG_BAD, NSCOLOUR_WIN_EVEN_FG_FADED, NSCOLOUR_WIN_EVEN_FG_GOOD, NSCOLOUR_WIN_EVEN_FG_SUBTLE, NSCOLOUR_WIN_ODD_BG, NSCOLOUR_WIN_ODD_BG_HOVER, NSCOLOUR_WIN_ODD_FG, NSCOLOUR_WIN_ODD_FG_BAD, NSCOLOUR_WIN_ODD_FG_FADED, NSCOLOUR_WIN_ODD_FG_GOOD, NSCOLOUR_WIN_ODD_FG_SUBTLE, nscolours, NSERROR_NOSPACE, and NSERROR_OK.
Referenced by dirlist_generate_title().
nserror nscolour_update | ( | void | ) |
Update the nscolour table from the current nsoptions.
Definition at line 132 of file nscolour.c.
References blend_colour, colour_to_bw_nearest, ns_system_colour_char(), nscolour__get(), NSCOLOUR_BUTTON_BG, NSCOLOUR_BUTTON_FG, NSCOLOUR_SCROLL_WELL, NSCOLOUR_SEL_BG, NSCOLOUR_SEL_FG, NSCOLOUR_SEL_FG_SUBTLE, NSCOLOUR_TEXT_INPUT_BG, NSCOLOUR_TEXT_INPUT_FG, NSCOLOUR_TEXT_INPUT_FG_SUBTLE, NSCOLOUR_WIN_EVEN_BG, NSCOLOUR_WIN_EVEN_BG_HOVER, NSCOLOUR_WIN_EVEN_BORDER, NSCOLOUR_WIN_EVEN_FG, NSCOLOUR_WIN_EVEN_FG_BAD, NSCOLOUR_WIN_EVEN_FG_FADED, NSCOLOUR_WIN_EVEN_FG_GOOD, NSCOLOUR_WIN_EVEN_FG_SUBTLE, NSCOLOUR_WIN_ODD_BG, NSCOLOUR_WIN_ODD_BG_HOVER, NSCOLOUR_WIN_ODD_BORDER, NSCOLOUR_WIN_ODD_FG, NSCOLOUR_WIN_ODD_FG_BAD, NSCOLOUR_WIN_ODD_FG_FADED, NSCOLOUR_WIN_ODD_FG_GOOD, NSCOLOUR_WIN_ODD_FG_SUBTLE, nscolours, and NSERROR_OK.
Referenced by netsurf_init().
colour nscolours[NSCOLOUR__COUNT] |
NetSurf UI colour table.
Definition at line 38 of file nscolour.c.
Referenced by dirlist_generate_title(), local_history_init(), nscolour_get_stylesheet(), nscolour_update(), page_info_init(), scrollbar_redraw(), treeview_create(), and treeview_init_plot_styles().