NeoMutt  2025-12-11-694-ga89709
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mutt_curses.h
Go to the documentation of this file.
1
22
23#ifndef MUTT_GUI_MUTT_CURSES_H
24#define MUTT_GUI_MUTT_CURSES_H
25
26#include "color/lib.h"
27
28#ifdef HAVE_NCURSESW_NCURSES_H
29#include <ncursesw/ncurses.h>
30#elif defined(HAVE_NCURSES_NCURSES_H)
31#include <ncurses/ncurses.h>
32#elif defined(HAVE_NCURSES_H)
33#include <ncurses.h>
34#else
35#include <curses.h>
36#endif
37
38#if (((NCURSES_VERSION_MAJOR > 6) || \
39 ((NCURSES_VERSION_MAJOR == 6) && (NCURSES_VERSION_MINOR >= 1))) && \
40 defined(NCURSES_EXT_COLORS))
41#define NEOMUTT_DIRECT_COLORS
42#endif
43
44// ncurses defined A_ITALIC in such a way, that we can't use #if on it.
45#ifdef A_ITALIC
46#define A_ITALIC_DEFINED
47#else
48#define A_ITALIC 0
49#endif
50
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
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 coloured objects.
Definition color.h:35
void mutt_resize_screen(void)
Update NeoMutt's opinion about the window size.
Definition resize.c:76
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:65