NeoMutt  2024-02-01-35-geee02f
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mutt_curses.h
Go to the documentation of this file.
1
23#ifndef MUTT_GUI_MUTT_CURSES_H
24#define MUTT_GUI_MUTT_CURSES_H
25
26#include "config.h"
27#include "color/lib.h"
28
29#ifdef HAVE_NCURSESW_NCURSES_H
30#include <ncursesw/ncurses.h>
31#elif defined(HAVE_NCURSES_NCURSES_H)
32#include <ncurses/ncurses.h>
33#elif defined(HAVE_NCURSES_H)
34#include <ncurses.h>
35#else
36#include <curses.h>
37#endif
38
39#if (((NCURSES_VERSION_MAJOR > 6) || \
40 ((NCURSES_VERSION_MAJOR == 6) && (NCURSES_VERSION_MINOR >= 1))) && \
41 defined(NCURSES_EXT_COLORS))
42#define NEOMUTT_DIRECT_COLORS
43#endif
44
45// ncurses defined A_ITALIC in such a way, that we can't use #if on it.
46#ifdef A_ITALIC
47#define A_ITALIC_DEFINED
48#else
49#define A_ITALIC 0
50#endif
51
52#define ctrl(ch) ((ch) - '@')
53
54#ifdef KEY_ENTER
55#define key_is_return(ch) (((ch) == '\r') || ((ch) == '\n') || ((ch) == KEY_ENTER))
56#else
57#define key_is_return(ch) (((ch) == '\r') || ((ch) == '\n'))
58#endif
59
64{
68};
69
70void mutt_curses_set_color(const struct AttrColor *ac);
71const struct AttrColor *mutt_curses_set_color_by_id(enum ColorId cid);
74void mutt_resize_screen(void);
75
76#endif /* MUTT_GUI_MUTT_CURSES_H */
Color and attribute parsing.
ColorId
List of all colored objects.
Definition: color.h:40
void mutt_resize_screen(void)
Update NeoMutt's opinion about the window size.
Definition: resize.c:75
const struct AttrColor * mutt_curses_set_normal_backed_color_by_id(enum ColorId cid)
Set the colour and attributes by the colour id.
Definition: mutt_curses.c:63
enum MuttCursorState mutt_curses_set_cursor(enum MuttCursorState state)
Set the cursor state.
Definition: mutt_curses.c:94
const struct AttrColor * mutt_curses_set_color_by_id(enum ColorId cid)
Set the colour and attributes by the colour id.
Definition: mutt_curses.c:79
MuttCursorState
Cursor states for mutt_curses_set_cursor()
Definition: mutt_curses.h:64
@ MUTT_CURSOR_INVISIBLE
Hide the cursor.
Definition: mutt_curses.h:65
@ MUTT_CURSOR_VISIBLE
Display a normal cursor.
Definition: mutt_curses.h:66
@ MUTT_CURSOR_VERY_VISIBLE
Display a very visible cursor.
Definition: mutt_curses.h:67
void mutt_curses_set_color(const struct AttrColor *ac)
Set the colour and attributes for text.
Definition: mutt_curses.c:38
A curses colour and its attributes.
Definition: attr.h:66