NeoMutt  2020-06-26-89-g172cd3
Teaching an old dog new tricks
DOXYGEN
mutt_curses.c
Go to the documentation of this file.
1 
31 #include "config.h"
32 #include "mutt_curses.h"
33 #include "color.h"
34 #include "mutt_globals.h"
35 
40 void mutt_curses_set_attr(int attr)
41 {
42 #ifdef HAVE_BKGDSET
43  bkgdset(attr | ' ');
44 #endif
45 }
46 
56 {
57  if (!Colors)
58  return;
59 #ifdef HAVE_BKGDSET
60  if (Colors->defs[color] != 0)
61  bkgdset(Colors->defs[color] | ' ');
62  else
63  bkgdset(Colors->defs[MT_COLOR_NORMAL] | ' ');
64 #else
65  if (Colors->defs[color] != 0)
66  attrset(Colors->defs[color]);
67  else
68  attrset(Colors->defs[MT_COLOR_NORMAL]);
69 #endif
70 }
71 
77 {
78 #if (defined(USE_SLANG_CURSES) || defined(HAVE_CURS_SET))
79  static int SavedCursor = MUTT_CURSOR_VISIBLE;
80 
81  if (state == MUTT_CURSOR_RESTORE_LAST)
82  state = SavedCursor;
83  else
84  SavedCursor = state;
85 
86  if (curs_set(state) == ERR)
87  {
88  if (state == MUTT_CURSOR_VISIBLE)
89  curs_set(MUTT_CURSOR_VERY_VISIBLE);
90  }
91 #endif
92 }
MuttCursorState
Cursor states for mutt_curses_set_cursor()
Definition: mutt_curses.h:77
Define wrapper functions around Curses/Slang.
void mutt_curses_set_color(enum ColorId color)
Set the current colour for text.
Definition: mutt_curses.c:55
int * defs
Array of all fixed colours, see enum ColorId.
Definition: color.h:131
Display a very visible cursor.
Definition: mutt_curses.h:82
void mutt_curses_set_cursor(enum MuttCursorState state)
Set the cursor state.
Definition: mutt_curses.c:76
Display a normal cursor.
Definition: mutt_curses.h:81
ColorId
List of all colored objects.
Definition: color.h:58
Plain text.
Definition: color.h:77
Definition: color.h:129
Color and attribute parsing.
Restore the previous cursor state.
Definition: mutt_curses.h:79
Hundreds of global variables to back the user variables.
void mutt_curses_set_attr(int attr)
Set the attributes for text.
Definition: mutt_curses.c:40