86 if (!has_color && !cc)
90 if ((has_color && !cc) || (!has_color && cc))
93 if ((cc->
fg ==
fg) && (cc->
bg ==
bg))
struct AttrColor * attr_color_new(void)
Create a new AttrColor.
bool attr_color_is_set(const struct AttrColor *ac)
Is the object coloured?
Color and attribute parsing.
void curses_color_free(struct CursesColor **ptr)
Free a CursesColor.
struct CursesColor * curses_color_new(int fg, int bg)
Create a new CursesColor.
void merged_colors_dump(void)
Dump all the Merged colours to the log.
static struct AttrColor * merged_colors_find(int fg, int bg, int attrs)
Find a Merged colour.
void merged_colors_cleanup(void)
Free the list of Merged colours.
void merged_colors_init(void)
Initialise the Merged colours.
const struct AttrColor * merged_color_overlay(const struct AttrColor *base, const struct AttrColor *over)
Combine two colours.
struct AttrColorList MergedColors
Array of user colours.
Convenience wrapper for the library headers.
#define TAILQ_FOREACH(var, head, field)
#define TAILQ_FOREACH_SAFE(var, head, field, tvar)
#define TAILQ_INSERT_TAIL(head, elm, field)
#define TAILQ_REMOVE(head, elm, field)
A curses colour and its attributes.
int attrs
Text attributes, e.g. A_BOLD.
struct CursesColor * curses_color
Underlying Curses colour.
Colour in the ncurses palette.
uint32_t fg
Foreground colour.
uint32_t bg
Background colour.