NeoMutt  2023-05-17-33-gce4425
Teaching an old dog new tricks
DOXYGEN
attr.h
Go to the documentation of this file.
1
23#ifndef MUTT_COLOR_ATTR_H
24#define MUTT_COLOR_ATTR_H
25
26#include "config.h"
27#include <stdbool.h>
28#include <stdint.h>
29#include "mutt/lib.h"
30
35{
37 int attrs;
38 short ref_count;
40};
41TAILQ_HEAD(AttrColorList, AttrColor);
42
43void attr_color_clear (struct AttrColor *ac);
44struct AttrColor attr_color_copy (const struct AttrColor *ac);
45void attr_color_free (struct AttrColor **ptr);
46bool attr_color_is_set(struct AttrColor *ac);
47bool attr_color_match (struct AttrColor *ac1, struct AttrColor *ac2);
48struct AttrColor *attr_color_new (void);
49
50void attr_color_list_clear(struct AttrColorList *acl);
51struct AttrColor *attr_color_list_find (struct AttrColorList *acl, uint32_t fg, uint32_t bg, int attrs);
52
53#endif /* MUTT_COLOR_ATTR_H */
void attr_color_clear(struct AttrColor *ac)
Free the contents of an AttrColor.
Definition: attr.c:44
struct AttrColor * attr_color_list_find(struct AttrColorList *acl, uint32_t fg, uint32_t bg, int attrs)
Find an AttrColor in a list.
Definition: attr.c:119
bool attr_color_is_set(struct AttrColor *ac)
Is the object coloured?
Definition: attr.c:160
bool attr_color_match(struct AttrColor *ac1, struct AttrColor *ac2)
Do the colours match?
Definition: attr.c:174
struct AttrColor attr_color_copy(const struct AttrColor *ac)
Copy a colour.
Definition: attr.c:146
struct AttrColor * attr_color_new(void)
Create a new AttrColor.
Definition: attr.c:80
void attr_color_free(struct AttrColor **ptr)
Free an AttrColor.
Definition: attr.c:59
TAILQ_HEAD(AttrColorList, AttrColor)
void attr_color_list_clear(struct AttrColorList *acl)
Free the contents of an AttrColorList.
Definition: attr.c:97
Convenience wrapper for the library headers.
A curses colour and its attributes.
Definition: attr.h:35
TAILQ_ENTRY(AttrColor) entries
Linked list.
short ref_count
Number of users.
Definition: attr.h:38
int attrs
Text attributes, e.g. A_BOLD.
Definition: attr.h:37
struct CursesColor * curses_color
Underlying Curses colour.
Definition: attr.h:36
Colour in the ncurses palette.
Definition: curses2.h:38