NeoMutt  2025-12-11-694-ga89709
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
attr.h
Go to the documentation of this file.
1
22
23#ifndef MUTT_COLOR_ATTR_H
24#define MUTT_COLOR_ATTR_H
25
26#include <stdbool.h>
27#include "mutt/lib.h"
28#include "curses2.h"
29
39
50
60
73TAILQ_HEAD(AttrColorList, AttrColor);
74
75void attr_color_clear (struct AttrColor *ac);
76struct AttrColor attr_color_copy (const struct AttrColor *ac);
77void attr_color_free (struct AttrColor **ptr);
78bool attr_color_is_set(const struct AttrColor *ac);
79bool attr_color_match (struct AttrColor *ac1, struct AttrColor *ac2);
80struct AttrColor *attr_color_new (void);
81
82void attr_color_list_clear(struct AttrColorList *acl);
83struct AttrColor *attr_color_list_find (struct AttrColorList *acl, color_t fg, color_t bg, int attrs);
84
85void attr_color_overwrite(struct AttrColor *ac_old, const struct AttrColor *ac_new);
86
87#endif /* MUTT_COLOR_ATTR_H */
struct AttrColor attr_color_copy(const struct AttrColor *ac)
Copy a colour.
Definition attr.c:165
struct AttrColor * attr_color_list_find(struct AttrColorList *acl, color_t fg, color_t bg, int attrs)
Find an AttrColor in a list.
Definition attr.c:138
void attr_color_clear(struct AttrColor *ac)
Free the contents of an AttrColor.
Definition attr.c:47
ColorPrefix
Constants for colour prefixes of named colours.
Definition attr.h:44
@ COLOR_PREFIX_NONE
no prefix
Definition attr.h:45
@ COLOR_PREFIX_ALERT
"alert" colour prefix
Definition attr.h:46
@ COLOR_PREFIX_LIGHT
"light" colour prefix
Definition attr.h:48
@ COLOR_PREFIX_BRIGHT
"bright" colour prefix
Definition attr.h:47
ColorType
Type of Colour.
Definition attr.h:34
@ CT_SIMPLE
Simple colour, e.g. "Red".
Definition attr.h:35
@ CT_PALETTE
Palette colour, e.g. "color207".
Definition attr.h:36
@ CT_RGB
True colour, e.g. "#11AAFF".
Definition attr.h:37
void attr_color_overwrite(struct AttrColor *ac_old, const struct AttrColor *ac_new)
Update an AttrColor in-place.
Definition attr.c:394
bool attr_color_match(struct AttrColor *ac1, struct AttrColor *ac2)
Do the colours match?
Definition attr.c:192
struct AttrColor * attr_color_new(void)
Create a new AttrColor.
Definition attr.c:89
void attr_color_free(struct AttrColor **ptr)
Free an AttrColor.
Definition attr.c:68
void attr_color_list_clear(struct AttrColorList *acl)
Free the contents of an AttrColorList.
Definition attr.c:116
bool attr_color_is_set(const struct AttrColor *ac)
Is the object coloured?
Definition attr.c:178
Curses Colour.
int32_t color_t
Type for 24-bit colour value.
Definition curses2.h:30
Convenience wrapper for the library headers.
#define TAILQ_HEAD(name, type)
Definition queue.h:680
A curses colour and its attributes.
Definition attr.h:65
struct ColorElement bg
Background colour.
Definition attr.h:67
struct ColorElement fg
Foreground colour.
Definition attr.h:66
TAILQ_ENTRY(AttrColor) entries
Linked list.
short ref_count
Number of users.
Definition attr.h:70
int attrs
Text attributes, e.g. A_BOLD.
Definition attr.h:68
struct CursesColor * curses_color
Underlying Curses colour.
Definition attr.h:69
One element of a Colour.
Definition attr.h:55
enum ColorType type
Type of Colour.
Definition attr.h:57
color_t color
Colour.
Definition attr.h:56
enum ColorPrefix prefix
Optional Colour Modifier.
Definition attr.h:58
Colour in the ncurses palette.
Definition curses2.h:40