NetSurf
Enumerations | Functions | Variables
nscolour.h File Reference

NetSurf UI colours (interface). More...

#include "netsurf/types.h"
Include dependency graph for nscolour.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  nscolour {
  NSCOLOUR_WIN_ODD_BG , NSCOLOUR_WIN_ODD_BG_HOVER , NSCOLOUR_WIN_ODD_FG , NSCOLOUR_WIN_ODD_FG_SUBTLE ,
  NSCOLOUR_WIN_ODD_FG_FADED , NSCOLOUR_WIN_ODD_FG_GOOD , NSCOLOUR_WIN_ODD_FG_BAD , NSCOLOUR_WIN_ODD_BORDER ,
  NSCOLOUR_WIN_EVEN_BG , NSCOLOUR_WIN_EVEN_BG_HOVER , NSCOLOUR_WIN_EVEN_FG , NSCOLOUR_WIN_EVEN_FG_SUBTLE ,
  NSCOLOUR_WIN_EVEN_FG_FADED , NSCOLOUR_WIN_EVEN_FG_GOOD , NSCOLOUR_WIN_EVEN_FG_BAD , NSCOLOUR_WIN_EVEN_BORDER ,
  NSCOLOUR_TEXT_INPUT_BG , NSCOLOUR_TEXT_INPUT_FG , NSCOLOUR_TEXT_INPUT_FG_SUBTLE , NSCOLOUR_SEL_BG ,
  NSCOLOUR_SEL_FG , NSCOLOUR_SEL_FG_SUBTLE , NSCOLOUR_SCROLL_WELL , NSCOLOUR_BUTTON_BG ,
  NSCOLOUR_BUTTON_FG , NSCOLOUR__COUNT
}
 NetSurf UI colour key. More...
 

Functions

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 []
 NetSurf UI colour table. More...
 

Detailed Description

NetSurf UI colours (interface).

Interface to acquire common colours used throughout NetSurf's interface.

Definition in file nscolour.h.

Enumeration Type Documentation

◆ nscolour

enum nscolour

NetSurf UI colour key.

Enumerator
NSCOLOUR_WIN_ODD_BG 
NSCOLOUR_WIN_ODD_BG_HOVER 
NSCOLOUR_WIN_ODD_FG 
NSCOLOUR_WIN_ODD_FG_SUBTLE 
NSCOLOUR_WIN_ODD_FG_FADED 
NSCOLOUR_WIN_ODD_FG_GOOD 
NSCOLOUR_WIN_ODD_FG_BAD 
NSCOLOUR_WIN_ODD_BORDER 
NSCOLOUR_WIN_EVEN_BG 
NSCOLOUR_WIN_EVEN_BG_HOVER 
NSCOLOUR_WIN_EVEN_FG 
NSCOLOUR_WIN_EVEN_FG_SUBTLE 
NSCOLOUR_WIN_EVEN_FG_FADED 
NSCOLOUR_WIN_EVEN_FG_GOOD 
NSCOLOUR_WIN_EVEN_FG_BAD 
NSCOLOUR_WIN_EVEN_BORDER 
NSCOLOUR_TEXT_INPUT_BG 
NSCOLOUR_TEXT_INPUT_FG 
NSCOLOUR_TEXT_INPUT_FG_SUBTLE 
NSCOLOUR_SEL_BG 
NSCOLOUR_SEL_FG 
NSCOLOUR_SEL_FG_SUBTLE 
NSCOLOUR_SCROLL_WELL 
NSCOLOUR_BUTTON_BG 
NSCOLOUR_BUTTON_FG 
NSCOLOUR__COUNT 

Definition at line 33 of file nscolour.h.

Function Documentation

◆ nscolour_get_stylesheet()

nserror nscolour_get_stylesheet ( const char **  stylesheet_out)

Get a pointer to a stylesheet for nscolours.

Returns
NSERROR_OK on success, or appropriate error otherwise.

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().

Here is the caller graph for this function:

◆ nscolour_update()

nserror nscolour_update ( void  )

Update the nscolour table from the current nsoptions.

Returns
NSERROR_OK on success, or appropriate error otherwise.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ nscolours

colour nscolours[]
extern