NeoMutt  2022-04-29-215-gc12b98
Teaching an old dog new tricks
DOXYGEN
curses2.h
Go to the documentation of this file.
1
23#ifndef MUTT_COLOR_CURSES_H
24#define MUTT_COLOR_CURSES_H
25
26#include "config.h"
27#include <stdint.h>
28#include "mutt/lib.h"
29
38{
39 /* TrueColor uses 24bit. Use fixed-width integer type to make sure it fits.
40 * Use the upper 8 bits to store flags. */
41 uint32_t fg;
42 uint32_t bg;
43 short index;
44 short ref_count;
46};
47TAILQ_HEAD(CursesColorList, CursesColor);
48
49#ifdef USE_DEBUG_COLOR
50extern struct CursesColorList CursesColors;
51extern int NumCursesColors;
52#endif
53
54void curses_color_free(struct CursesColor **ptr);
55struct CursesColor *curses_color_new (int fg, int bg);
56
57void curses_colors_init(void);
58struct CursesColor *curses_colors_find (int fg, int bg);
59
60#endif /* MUTT_COLOR_CURSES_H */
void curses_color_free(struct CursesColor **ptr)
Free a CursesColor.
Definition: curses.c:116
struct CursesColor * curses_colors_find(int fg, int bg)
Find a Curses colour by foreground/background.
Definition: curses.c:55
struct CursesColor * curses_color_new(int fg, int bg)
Create a new CursesColor.
Definition: curses.c:148
TAILQ_HEAD(CursesColorList, CursesColor)
void curses_colors_init(void)
Initialise the Curses colours.
Definition: curses.c:42
int NumCursesColors
Definition: curses.c:37
struct CursesColorList CursesColors
List of all Curses colours.
Definition: curses.c:36
Convenience wrapper for the library headers.
Colour in the ncurses palette.
Definition: curses2.h:38
TAILQ_ENTRY(CursesColor) entries
Linked list.
short index
Index number.
Definition: curses2.h:43
uint32_t fg
Foreground colour.
Definition: curses2.h:41
uint32_t bg
Background colour.
Definition: curses2.h:42
short ref_count
Number of users.
Definition: curses2.h:44