|
ELinks 0.19.1
|
#include "util/color.h"

Macros | |
| #define | TERM_COLOR_MASK 0x07 |
| #define | TERM_COLOR_FOREGROUND_16(color) |
| #define | TERM_COLOR_BACKGROUND_16(color) |
Typedefs | |
| typedef unsigned char | color_flags_T |
| typedef int | color_mode_T |
Enumerations | |
| enum | color_flags { COLOR_DECREASE_LIGHTNESS = 1 , COLOR_ENHANCE_UNDERLINE = 2 , COLOR_INCREASE_CONTRAST = 4 , COLOR_ENSURE_CONTRAST = 8 , COLOR_ENSURE_INVERTED_CONTRAST = 16 } |
| Bit flags to control how the colors are handled. More... | |
| enum | color_mode { COLOR_MODE_DUMP = -1 , COLOR_MODE_MONO = 0 , COLOR_MODE_16 = 1 , COLOR_MODES = 5 } |
| How many colors the terminal supports. More... | |
Functions | |
| void | set_term_color16 (struct screen_char *schar, color_flags_T flags, unsigned char fg, unsigned char bg) |
| color_T | get_term_color16 (unsigned int index) |
| Mixes the color pair and attributes to a terminal text color. | |
| void | get_screen_char_color (struct screen_char *schar, struct color_pair *pair, color_flags_T flags, color_mode_T color_mode) |
| void | set_term_color (struct screen_char *schar, struct color_pair *pair, color_flags_T flags, color_mode_T mode) |
| #define TERM_COLOR_BACKGROUND_16 | ( | color | ) |
| #define TERM_COLOR_FOREGROUND_16 | ( | color | ) |
| #define TERM_COLOR_MASK 0x07 |
| typedef unsigned char color_flags_T |
| typedef int color_mode_T |
| enum color_flags |
Bit flags to control how the colors are handled.
| enum color_mode |
How many colors the terminal supports.
These numbers are used in the terminal._template_.colors and document.dump.color_mode options. They should be kept stable so that configuration files are portable between ELinks versions. Any unsupported modes should be treated as COLOR_MODE_16. (Can't fall back to COLOR_MODE_88 from COLOR_MODE_256 because the palettes are incompatible.)
| Enumerator | |
|---|---|
| COLOR_MODE_DUMP | |
| COLOR_MODE_MONO | |
| COLOR_MODE_16 | |
| COLOR_MODES | |
| void get_screen_char_color | ( | struct screen_char * | schar, |
| struct color_pair * | pair, | ||
| color_flags_T | flags, | ||
| color_mode_T | color_mode ) |
| color_T get_term_color16 | ( | unsigned int | index | ) |
Mixes the color pair and attributes to a terminal text color.
If flags has masked in the COLOR_INCREASE_CONTRAST the foreground color will be adjusted.
XXX: schar may not be NULL and is modified adding stuff like boldness.
| void set_term_color | ( | struct screen_char * | schar, |
| struct color_pair * | pair, | ||
| color_flags_T | flags, | ||
| color_mode_T | mode ) |
| void set_term_color16 | ( | struct screen_char * | schar, |
| color_flags_T | flags, | ||
| unsigned char | fg, | ||
| unsigned char | bg ) |