NeoMutt  2023-11-03-107-g582dc1
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mutt_curses.h
Go to the documentation of this file.
1
24#ifndef MUTT_GUI_MUTT_CURSES_H
25#define MUTT_GUI_MUTT_CURSES_H
26
27#include "config.h"
28#include "color/lib.h"
29
30#ifdef HAVE_NCURSESW_NCURSES_H
31#include <ncursesw/ncurses.h>
32#elif defined(HAVE_NCURSES_NCURSES_H)
33#include <ncurses/ncurses.h>
34#elif defined(HAVE_NCURSES_H)
35#include <ncurses.h>
36#else
37#include <curses.h>
38#endif
39
40#if (((NCURSES_VERSION_MAJOR > 6) || \
41 ((NCURSES_VERSION_MAJOR == 6) && (NCURSES_VERSION_MINOR >= 1))) && \
42 defined(NCURSES_EXT_COLORS))
43#define NEOMUTT_DIRECT_COLORS
44#endif
45
46#define ctrl(ch) ((ch) - '@')
47
48#ifdef KEY_ENTER
49#define key_is_return(ch) (((ch) == '\r') || ((ch) == '\n') || ((ch) == KEY_ENTER))
50#else
51#define key_is_return(ch) (((ch) == '\r') || ((ch) == '\n'))
52#endif
53
58{
62};
63
64void mutt_curses_set_color(const struct AttrColor *ac);
65const struct AttrColor *mutt_curses_set_color_by_id(enum ColorId cid);
68void mutt_resize_screen(void);
69
70#endif /* MUTT_GUI_MUTT_CURSES_H */
Color and attribute parsing.
ColorId
List of all colored objects.
Definition: color.h:39
void mutt_resize_screen(void)
Update NeoMutt's opinion about the window size.
Definition: resize.c:74
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:65
enum MuttCursorState mutt_curses_set_cursor(enum MuttCursorState state)
Set the cursor state.
Definition: mutt_curses.c:96
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:81
MuttCursorState
Cursor states for mutt_curses_set_cursor()
Definition: mutt_curses.h:58
@ MUTT_CURSOR_INVISIBLE
Hide the cursor.
Definition: mutt_curses.h:59
@ MUTT_CURSOR_VISIBLE
Display a normal cursor.
Definition: mutt_curses.h:60
@ MUTT_CURSOR_VERY_VISIBLE
Display a very visible cursor.
Definition: mutt_curses.h:61
void mutt_curses_set_color(const struct AttrColor *ac)
Set the colour and attributes for text.
Definition: mutt_curses.c:40
A curses colour and its attributes.
Definition: attr.h:66