NeoMutt
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
curses2.h
Go to the documentation of this file.
1
23#ifndef MUTT_COLOR_CURSES2_H
24#define MUTT_COLOR_CURSES2_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_CURSES2_H */
void curses_color_free(struct CursesColor **ptr)
Free a CursesColor.
Definition: curses.c:121
struct CursesColor * curses_colors_find(int fg, int bg)
Find a Curses colour by foreground/background.
Definition: curses.c:57
struct CursesColor * curses_color_new(int fg, int bg)
Create a new CursesColor.
Definition: curses.c:151
void curses_colors_init(void)
Initialise the Curses colours.
Definition: curses.c:44
int NumCursesColors
Number of ncurses colours left to allocate.
Definition: curses.c:39
struct CursesColorList CursesColors
List of all Curses colours.
Definition: curses.c:38
Convenience wrapper for the library headers.
#define TAILQ_HEAD(name, type)
Definition: queue.h:623
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