NeoMutt  2020-06-26-30-g76c339
Teaching an old dog new tricks
DOXYGEN
mutt_curses.h
Go to the documentation of this file.
1 
24 #ifndef MUTT_MUTT_CURSES_H
25 #define MUTT_MUTT_CURSES_H
26 
27 #include "config.h"
28 #include "color.h"
29 
30 #ifdef USE_SLANG_CURSES
31 
32 #ifndef unix /* this symbol is not defined by the hp-ux compiler */
33 #define unix
34 #endif
35 
36 #include <slang.h> /* in addition to slcurses.h, we need slang.h for the version
37  number to test for 2.x having UTF-8 support in main.c */
38 #ifdef bool
39 #undef bool
40 #endif
41 
42 #include <slcurses.h>
43 
44 #ifdef bool
45 #undef bool
46 #define bool _Bool
47 #endif
48 
49 #define KEY_DC SL_KEY_DELETE
50 #define KEY_IC SL_KEY_IC
51 
52 #else /* USE_SLANG_CURSES */
53 
54 #ifdef HAVE_NCURSESW_NCURSES_H
55 #include <ncursesw/ncurses.h> // IWYU pragma: keep
56 #elif defined(HAVE_NCURSES_NCURSES_H)
57 #include <ncurses/ncurses.h>
58 #elif defined(HAVE_NCURSES_H)
59 #include <ncurses.h>
60 #else
61 #include <curses.h>
62 #endif
63 
64 #endif /* USE_SLANG_CURSES */
65 
66 #define ctrl(ch) ((ch) - '@')
67 
68 #ifdef KEY_ENTER
69 #define CI_is_return(ch) (((ch) == '\r') || ((ch) == '\n') || ((ch) == KEY_ENTER))
70 #else
71 #define CI_is_return(ch) (((ch) == '\r') || ((ch) == '\n'))
72 #endif
73 
78 {
83 };
84 
85 void mutt_curses_set_attr(int attr);
86 void mutt_curses_set_color(enum ColorId color);
88 void mutt_resize_screen(void);
89 
90 #endif /* MUTT_MUTT_CURSES_H */
MuttCursorState
Cursor states for mutt_curses_set_cursor()
Definition: mutt_curses.h:77
void mutt_curses_set_attr(int attr)
Set the attributes for text.
Definition: mutt_curses.c:40
void mutt_resize_screen(void)
Update NeoMutt&#39;s opinion about the window size (CURSES)
Definition: resize.c:101
void mutt_curses_set_cursor(enum MuttCursorState state)
Set the cursor state.
Definition: mutt_curses.c:76
Display a very visible cursor.
Definition: mutt_curses.h:82
Display a normal cursor.
Definition: mutt_curses.h:81
ColorId
List of all colored objects.
Definition: color.h:58
void mutt_curses_set_color(enum ColorId color)
Set the current colour for text.
Definition: mutt_curses.c:55
Color and attribute parsing.
Restore the previous cursor state.
Definition: mutt_curses.h:79
Hide the cursor.
Definition: mutt_curses.h:80