NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
curses2.h
Go to the documentation of this file.
1
22
23
#ifndef MUTT_COLOR_CURSES2_H
24
#define MUTT_COLOR_CURSES2_H
25
26
#include <stdint.h>
27
#include "
mutt/lib.h
"
28
30
typedef
int32_t
color_t
;
31
39
struct
CursesColor
40
{
41
color_t
fg
;
42
color_t
bg
;
43
short
index
;
44
short
ref_count
;
45
TAILQ_ENTRY
(
CursesColor
) entries;
46
};
47
TAILQ_HEAD
(CursesColorList,
CursesColor
);
48
49
void
curses_color_free
(
struct
CursesColor
**ptr);
50
struct
CursesColor
*
curses_color_new
(
color_t
fg
,
color_t
bg
);
51
52
void
curses_colors_init
(
struct
CursesColorList *curses_colors,
int
*num_curses_colors);
53
struct
CursesColor
*
curses_colors_find
(
color_t
fg
,
color_t
bg
);
54
55
#endif
/* MUTT_COLOR_CURSES2_H */
curses_color_new
struct CursesColor * curses_color_new(color_t fg, color_t bg)
Create a new CursesColor.
Definition
curses.c:155
curses_colors_init
void curses_colors_init(struct CursesColorList *curses_colors, int *num_curses_colors)
Initialise the Curses colours.
Definition
curses.c:45
curses_color_free
void curses_color_free(struct CursesColor **ptr)
Free a CursesColor.
Definition
curses.c:123
color_t
int32_t color_t
Type for 24-bit colour value.
Definition
curses2.h:30
curses_colors_find
struct CursesColor * curses_colors_find(color_t fg, color_t bg)
Find a Curses colour by foreground/background.
Definition
curses.c:58
lib.h
Convenience wrapper for the library headers.
TAILQ_HEAD
#define TAILQ_HEAD(name, type)
Definition
queue.h:680
CursesColor
Colour in the ncurses palette.
Definition
curses2.h:40
CursesColor::fg
color_t fg
Foreground colour.
Definition
curses2.h:41
CursesColor::TAILQ_ENTRY
TAILQ_ENTRY(CursesColor) entries
Linked list.
CursesColor::bg
color_t bg
Background colour.
Definition
curses2.h:42
CursesColor::index
short index
Index number.
Definition
curses2.h:43
CursesColor::ref_count
short ref_count
Number of users.
Definition
curses2.h:44