NeoMutt  2025-12-11-980-ge38c27
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
curs_lib.c
Go to the documentation of this file.
1
23
32
33#include "config.h"
34#include <errno.h>
35#include <fcntl.h>
36#include <limits.h>
37#include <stdbool.h>
38#include <stdio.h>
39#include <stdlib.h>
40#include <string.h>
41#include <termios.h>
42#include <unistd.h>
43#include <wchar.h>
44#include "mutt/lib.h"
45#include "config/lib.h"
46#include "core/lib.h"
47#include "mutt.h"
48#include "curs_lib.h"
49#include "browser/lib.h"
50#include "color/lib.h"
51#include "editor/lib.h"
52#include "history/lib.h"
53#include "key/lib.h"
54#include "question/lib.h"
55#include "globals.h"
56#include "msgcont.h"
57#include "msgwin.h"
58#include "mutt_curses.h"
59#include "mutt_logging.h"
60#include "mutt_window.h"
61#include "opcodes.h"
62#include "thread.h"
63
68void mutt_beep(bool force)
69{
70 const bool c_beep = cs_subset_bool(NeoMutt->sub, "beep");
71 if (force || c_beep)
72 beep();
73}
74
78void mutt_refresh(void)
79{
80 /* don't refresh when we are waiting for a child. */
81 if (OptKeepQuiet)
82 return;
83
84 /* don't refresh in the middle of macros unless necessary */
86 if (!ARRAY_EMPTY(&mod_data->macro_events) && !OptForceRefresh)
87 return;
88
89 /* else */
90 refresh();
91}
92
102{
103 // Forcibly switch to the alternate screen.
104 // Using encryption can leave ncurses confused about which mode it's in.
105 fputs("\033[?1049h", stdout);
106 fflush(stdout);
107 keypad(stdscr, true);
108 clearok(stdscr, true);
109 window_redraw(NULL);
110}
111
117void mutt_edit_file(const char *editor, const char *file)
118{
119 struct Buffer *cmd = buf_pool_get();
120
121 mutt_endwin();
122 buf_file_expand_fmt_quote(cmd, editor, file);
123 if (mutt_system(buf_string(cmd)) != 0)
124 {
125 mutt_error(_("Error running \"%s\""), buf_string(cmd));
126 }
127 /* the terminal may have been resized while the editor owned it */
129
130 buf_pool_release(&cmd);
131}
132
139{
141 if (query_yesorno(_("Exit NeoMutt without saving?"), MUTT_YES) == MUTT_YES)
142 {
143 mutt_exit(0); /* This call never returns */
144 }
146 SigInt = false;
147}
148
152void mutt_endwin(void)
153{
154 if (!OptGui)
155 return;
156
157 int e = errno;
158
159 /* at least in some situations (screen + xterm under SuSE11/12) endwin()
160 * doesn't properly flush the screen without an explicit call. */
161 mutt_refresh();
162 endwin();
163 SigWinch = true;
164
165 errno = e;
166}
167
174int mutt_any_key_to_continue(const char *s)
175{
176 struct termios term = { 0 };
177 struct termios old = { 0 };
178
179 int fd = open("/dev/tty", O_RDONLY);
180 if (fd < 0)
181 return EOF;
182
183 tcgetattr(fd, &old); // Save the current tty settings
184
185 term = old;
186 term.c_lflag &= ~(ICANON | ECHO); // Canonical (not line-buffered), don't echo the characters
187 term.c_cc[VMIN] = 1; // Wait for at least one character
188 term.c_cc[VTIME] = 255; // Wait for 25.5s
189 tcsetattr(fd, TCSANOW, &term);
190
191 if (s)
192 fputs(s, stdout);
193 else
194 fputs(_("Press any key to continue..."), stdout);
195 fflush(stdout);
196
197 char ch = '\0';
198 // Wait for a character. This might timeout, so loop.
199 while (read(fd, &ch, 1) == 0)
200 ; // do nothing
201
202 // Change the tty settings to be non-blocking
203 term.c_cc[VMIN] = 0; // Returning with zero characters is acceptable
204 term.c_cc[VTIME] = 0; // Don't wait
205 tcsetattr(fd, TCSANOW, &term);
206
207 char buf[64] = { 0 };
208 while (read(fd, buf, sizeof(buf)) > 0)
209 ; // Mop up any remaining chars
210
211 tcsetattr(fd, TCSANOW, &old); // Restore the previous tty settings
212 close(fd);
213
214 fputs("\r\n", stdout);
216 return (ch >= 0) ? ch : EOF;
217}
218
237int mw_enter_fname(const char *prompt, struct Buffer *fname, bool mailbox,
238 struct Mailbox *m, bool multiple, char ***files,
239 int *numfiles, SelectFileFlags flags)
240{
241 struct MuttWindow *win = msgwin_new(true);
242 if (!win)
243 return -1;
244
245 int rc = -1;
246
247 struct Buffer *text = buf_pool_get();
248 const struct AttrColor *ac_normal = simple_color_get(MT_COLOR_NORMAL);
249 const struct AttrColor *ac_prompt = merged_color_overlay(ac_normal,
251
252 msgwin_add_text(win, prompt, ac_prompt);
253 msgwin_add_text(win, _(" ('?' for list): "), ac_prompt);
254 if (!buf_is_empty(fname))
255 msgwin_add_text(win, buf_string(fname), ac_normal);
256
258 struct MuttWindow *old_focus = window_set_focus(win);
259
260 struct KeyEvent event = { 0, OP_NULL };
261 do
262 {
263 window_redraw(NULL);
264 event = mutt_getch(GETCH_NONE);
265 } while ((event.op == OP_TIMEOUT) || (event.op == OP_REPAINT));
266
267 mutt_refresh();
268 win = msgcont_pop_window();
269 window_set_focus(old_focus);
270 mutt_window_free(&win);
271
272 if (event.ch < 0)
273 goto done;
274
275 if (event.ch == '?')
276 {
277 buf_reset(fname);
278
279 if (flags == MUTT_SEL_NONE)
280 flags = MUTT_SEL_FOLDER;
281 if (multiple)
282 flags |= MUTT_SEL_MULTI;
283 if (mailbox)
284 flags |= MUTT_SEL_MAILBOX;
285 dlg_browser(fname, flags, m, files, numfiles);
286 }
287 else
288 {
289 char *pc = NULL;
290 mutt_str_asprintf(&pc, "%s: ", prompt);
291 if (event.op == OP_NULL)
292 mutt_unget_ch(event.ch);
293 else
294 mutt_unget_op(event.op);
295
296 buf_alloc(fname, 1024);
297 struct FileCompletionData cdata = { multiple, m, files, numfiles, NULL };
298 enum HistoryClass hclass = mailbox ? HC_MAILBOX : HC_FILE;
299 if (mw_get_field(pc, fname, MUTT_COMP_CLEAR, hclass, &CompleteMailboxOps, &cdata) != 0)
300 {
301 buf_reset(fname);
302 }
303 FREE(&pc);
304 }
305
306 rc = 0;
307
308done:
309 buf_pool_release(&text);
310 return rc;
311}
312
320int mutt_addwch(struct MuttWindow *win, wchar_t wc)
321{
322 char buf[MB_LEN_MAX * 2] = { 0 };
323 mbstate_t mbstate = { 0 };
324 size_t n1;
325 size_t n2;
326
327 if (((n1 = wcrtomb(buf, wc, &mbstate)) == ICONV_ILLEGAL_SEQ) ||
328 ((n2 = wcrtomb(buf + n1, 0, &mbstate)) == ICONV_ILLEGAL_SEQ))
329 {
330 return -1; /* ERR */
331 }
332 else
333 {
334 return mutt_window_addstr(win, buf);
335 }
336}
337
344void mutt_paddstr(struct MuttWindow *win, int n, const char *s)
345{
346 wchar_t wc = 0;
347 size_t k;
348 size_t len = mutt_str_len(s);
349 mbstate_t mbstate = { 0 };
350
351 for (; len && (k = mbrtowc(&wc, s, len, &mbstate)); s += k, len -= k)
352 {
353 if ((k == ICONV_ILLEGAL_SEQ) || (k == ICONV_BUF_TOO_SMALL))
354 {
355 if (k == ICONV_ILLEGAL_SEQ)
356 memset(&mbstate, 0, sizeof(mbstate));
357 k = (k == ICONV_ILLEGAL_SEQ) ? 1 : len;
358 wc = ReplacementChar;
359 }
360 if (!IsWPrint(wc))
361 wc = '?';
362 const int w = wcwidth(wc);
363 if (w >= 0)
364 {
365 if (w > n)
366 break;
367 mutt_addwch(win, wc);
368 n -= w;
369 }
370 }
371 while (n-- > 0)
373}
374
386size_t mutt_wstr_trunc(const char *src, size_t maxlen, size_t maxwid, size_t *width)
387{
388 wchar_t wc = 0;
389 size_t n;
390 size_t w = 0;
391 size_t l = 0;
392 size_t cl;
393 int cw;
394 mbstate_t mbstate = { 0 };
395
396 if (!src)
397 goto out;
398
399 n = mutt_str_len(src);
400
401 for (w = 0; n && (cl = mbrtowc(&wc, src, n, &mbstate)); src += cl, n -= cl)
402 {
403 if (cl == ICONV_ILLEGAL_SEQ)
404 {
405 memset(&mbstate, 0, sizeof(mbstate));
406 cl = 1;
407 wc = ReplacementChar;
408 }
409 else if (cl == ICONV_BUF_TOO_SMALL)
410 {
411 cl = n;
412 wc = ReplacementChar;
413 }
414
415 cw = wcwidth(wc);
416 /* hack because MUTT_TREE symbols aren't turned into characters
417 * until rendered by print_enriched_string() */
418 if ((cw < 0) && (src[0] == MUTT_SPECIAL_INDEX))
419 {
420 cl = 2; /* skip the index coloring sequence */
421 cw = 0;
422 }
423 else if ((cw < 0) && (cl == 1) && (src[0] != '\0') && (src[0] < MUTT_TREE_MAX))
424 {
425 cw = 1;
426 }
427 else if (cw < 0)
428 {
429 cw = 0; /* unprintable wchar */
430 }
431 if (wc == '\n')
432 break;
433 if (((cl + l) > maxlen) || ((cw + w) > maxwid))
434 break;
435 l += cl;
436 w += cw;
437 }
438out:
439 if (width)
440 *width = w;
441 return l;
442}
443
449size_t mutt_strwidth(const char *s)
450{
451 if (!s)
452 return 0;
453 return mutt_strnwidth(s, mutt_str_len(s));
454}
455
462size_t mutt_strnwidth(const char *s, size_t n)
463{
464 if (!s)
465 return 0;
466
467 wchar_t wc = 0;
468 int w;
469 size_t k;
470 mbstate_t mbstate = { 0 };
471
472 for (w = 0; n && (k = mbrtowc(&wc, s, n, &mbstate)); s += k, n -= k)
473 {
474 if (*s == MUTT_SPECIAL_INDEX)
475 {
476 if (n < 2)
477 break;
478 s += 2; /* skip the index coloring sequence */
479 n -= 2;
480 k = 0;
481 continue;
482 }
483
484 if ((k == ICONV_ILLEGAL_SEQ) || (k == ICONV_BUF_TOO_SMALL))
485 {
486 if (k == ICONV_ILLEGAL_SEQ)
487 memset(&mbstate, 0, sizeof(mbstate));
488 k = (k == ICONV_ILLEGAL_SEQ) ? 1 : n;
489 wc = ReplacementChar;
490 }
491 if (!IsWPrint(wc))
492 wc = '?';
493 w += wcwidth(wc);
494 }
495 return w;
496}
497
508void mw_what_key(void)
509{
510 struct MuttWindow *win = msgwin_new(true);
511 if (!win)
512 return;
513
515 struct Buffer *key = buf_pool_get();
516 struct Buffer *prompt = buf_pool_get();
517 struct Buffer *text = buf_pool_get();
518
519 keymap_get_name(mod_data->abort_key, key);
520
521 buf_printf(prompt, _("Enter keys (%s to abort): "), buf_string(key));
523
525 struct MuttWindow *old_focus = window_set_focus(win);
526 window_redraw(win);
527
528 const struct AttrColor *ac_normal = simple_color_get(MT_COLOR_NORMAL);
529 const struct AttrColor *ac_prompt = simple_color_get(MT_COLOR_PROMPT);
530
531 // ---------------------------------------------------------------------------
532 // Event Loop
533 timeout(1000); // 1 second
534 while (true)
535 {
536 int ch = getch();
537 if (ch == mod_data->abort_key)
538 break;
539
540 if (ch == KEY_RESIZE)
541 {
542 timeout(0);
543 while ((ch = getch()) == KEY_RESIZE)
544 {
545 // do nothing
546 }
547 }
548
549 if (ch == ERR)
550 {
551 if (!isatty(STDIN_FILENO)) // terminal was lost
552 mutt_exit(1);
553
554 if (SigWinch)
555 {
556 SigWinch = false;
558 window_redraw(NULL);
559 }
560 else
561 {
563 }
564
565 continue;
566 }
567
568 // Clear the text without hiding the Window
570
571 buf_reset(key);
572 keymap_get_name(ch, key);
573
574 buf_printf(text, _("Char = %s, Octal = %o, Decimal = %d\n"), buf_string(key), ch, ch);
575
576 msgwin_add_text(win, buf_string(text), ac_normal);
577 msgwin_add_text(win, buf_string(prompt), ac_prompt);
578 msgwin_add_text(win, NULL, NULL);
579 window_redraw(NULL);
580 }
581 // ---------------------------------------------------------------------------
582
583 buf_pool_release(&key);
584 buf_pool_release(&prompt);
585 buf_pool_release(&text);
586
587 win = msgcont_pop_window();
588 window_set_focus(old_focus);
589 mutt_window_free(&win);
590}
591
601void mutt_str_expand_tabs(char **str, size_t *len, int tabwidth)
602{
603 if (!str || !*str || !len || (tabwidth < 1))
604 {
605 return;
606 }
607
608 char *in = *str;
609
610 // calculate how much space we need
611 size_t required_len = 0;
612 bool found_tabs = false;
613 for (int i = 0; (i < *len) && (in[i] != '\0'); i++)
614 {
615 if (in[i] == '\t')
616 {
617 found_tabs = true;
618 required_len += tabwidth; // cheat, just assume full tab width
619 }
620 else
621 {
622 required_len++;
623 }
624 }
625
626 if (!found_tabs)
627 {
628 return;
629 }
630
631 // tab expansion can fill in the whole buffer; we need to make some more room
632 // for the \0-terminator.
633 if (required_len == *len)
634 {
635 ++required_len;
636 }
637
638 // resize the string if there isn't enough space
639 if (required_len > *len)
640 {
641 *len = ROUND_UP(required_len, 256);
642 }
643 char *out = MUTT_MEM_CALLOC(*len, char);
644
645 // expand tabs
646 for (int i = 0, o = 0; in[i] != '\0'; i++)
647 {
648 if (in[i] == '\t')
649 {
650 // TODO - we could keep a running width instead of recomputing this from
651 // scratch for each encountered tab.
652 int num_cells = mutt_strnwidth(out, o);
653 int indent = abs((num_cells % tabwidth) - tabwidth);
654 memset(out + o, ' ', indent);
655 o += indent;
656 }
657 else
658 {
659 out[o] = in[i];
660 ++o;
661 }
662 }
663
664 FREE(str);
665 *str = out;
666}
#define ARRAY_EMPTY(head)
Check if an array is empty.
Definition array.h:74
const struct CompleteOps CompleteMailboxOps
Auto-Completion of Files / Mailboxes.
Definition complete.c:159
Select a Mailbox from a list.
@ MUTT_SEL_MAILBOX
Select a mailbox.
Definition lib.h:60
@ MUTT_SEL_MULTI
Multi-selection is enabled.
Definition lib.h:61
@ MUTT_SEL_FOLDER
Select a local directory.
Definition lib.h:62
@ MUTT_SEL_NONE
No flags are set.
Definition lib.h:59
uint8_t SelectFileFlags
Definition lib.h:64
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition buffer.c:168
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
Definition buffer.c:89
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
Definition buffer.c:298
void buf_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
Definition buffer.c:342
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition buffer.h:96
Color and attribute parsing.
struct AttrColor * simple_color_get(enum ColorId cid)
Get the colour of an object by its ID.
Definition simple.c:98
@ MT_COLOR_NORMAL
Plain text.
Definition color.h:53
@ MT_COLOR_PROMPT
Question/user input.
Definition color.h:56
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition helpers.c:47
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
void mutt_edit_file(const char *editor, const char *file)
Let the user edit a file.
Definition curs_lib.c:117
size_t mutt_strnwidth(const char *s, size_t n)
Measure a string's width in screen cells.
Definition curs_lib.c:462
size_t mutt_wstr_trunc(const char *src, size_t maxlen, size_t maxwid, size_t *width)
Work out how to truncate a widechar string.
Definition curs_lib.c:386
void mutt_paddstr(struct MuttWindow *win, int n, const char *s)
Display a string on screen, padded if necessary.
Definition curs_lib.c:344
void mutt_refresh(void)
Force a refresh of the screen.
Definition curs_lib.c:78
int mutt_addwch(struct MuttWindow *win, wchar_t wc)
Addwch would be provided by an up-to-date curses library.
Definition curs_lib.c:320
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
Definition curs_lib.c:174
void mutt_str_expand_tabs(char **str, size_t *len, int tabwidth)
Convert tabs to spaces in a string.
Definition curs_lib.c:601
void mutt_need_hard_redraw(void)
Force a hard refresh.
Definition curs_lib.c:101
void mutt_query_exit(void)
Ask the user if they want to leave NeoMutt.
Definition curs_lib.c:138
void mutt_endwin(void)
Shutdown curses.
Definition curs_lib.c:152
void mutt_beep(bool force)
Irritate the user.
Definition curs_lib.c:68
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
Definition curs_lib.c:449
GUI miscellaneous curses (window drawing) routines.
Edit a string.
@ MUTT_COMP_CLEAR
Clear input if printable character is pressed.
Definition wdata.h:47
void mutt_exit(int code)
Leave NeoMutt NOW.
Definition exit.c:41
void buf_file_expand_fmt_quote(struct Buffer *dest, const char *fmt, const char *src)
Replace s in a string with a filename.
Definition file.c:1352
void mutt_flushinp(void)
MacroEvents moved to KeyModuleData UngetKeyEvents moved to KeyModuleData.
Definition get.c:81
struct KeyEvent mutt_getch(GetChFlags flags)
Read a character from the input buffer.
Definition get.c:319
void mutt_unget_op(int op)
Return an operation to the input buffer.
Definition get.c:159
void mutt_unget_ch(int ch)
Return a keystroke to the input buffer.
Definition get.c:147
@ GETCH_NONE
No flags are set.
Definition get.h:38
bool OptKeepQuiet
(pseudo) shut up the message and refresh functions while we are executing an external program
Definition globals.c:49
bool OptForceRefresh
(pseudo) refresh even during macros
Definition globals.c:47
bool OptGui
(pseudo) when the gui (and curses) are started
Definition globals.c:48
Global variables.
void dlg_browser(struct Buffer *file, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles)
Let the user select a file -.
void mw_what_key(void)
Display the value of a key -.
Definition curs_lib.c:508
int mw_enter_fname(const char *prompt, struct Buffer *fname, bool mailbox, struct Mailbox *m, bool multiple, char ***files, int *numfiles, SelectFileFlags flags)
Ask the user to select a file -.
Definition curs_lib.c:237
int mw_get_field(const char *prompt, struct Buffer *buf, CompletionFlags complete, enum HistoryClass hclass, const struct CompleteOps *comp_api, void *cdata)
Ask the user for a string -.
Definition window.c:502
#define mutt_error(...)
Definition logging2.h:94
Create/manipulate threading in emails.
@ MUTT_TREE_MAX
Definition thread.h:70
@ MUTT_SPECIAL_INDEX
Colour indicator.
Definition thread.h:72
Read/write command history from/to a file.
HistoryClass
Type to differentiate different histories.
Definition lib.h:55
@ HC_FILE
Files.
Definition lib.h:59
@ HC_MAILBOX
Mailboxes.
Definition lib.h:62
void keymap_get_name(int c, struct Buffer *buf)
Get the human name for a key.
Definition keymap.c:203
Manage keymappings.
#define IsWPrint(wc)
Definition mbyte.h:40
#define FREE(x)
Free memory and set the pointer to NULL.
Definition memory.h:68
#define ROUND_UP(NUM, STEP)
Round up NUM to the nearest multiple of STEP.
Definition memory.h:46
#define MUTT_MEM_CALLOC(n, type)
Definition memory.h:52
const struct AttrColor * merged_color_overlay(const struct AttrColor *base, const struct AttrColor *over)
Combine two colours.
Definition merged.c:110
@ MODULE_ID_KEY
ModuleKey, Key mappings
Definition module_api.h:74
void msgcont_push_window(struct MuttWindow *win)
Add a window to the Container Stack.
Definition msgcont.c:150
struct MuttWindow * msgcont_pop_window(void)
Remove the last Window from the Container Stack.
Definition msgcont.c:103
Message Window.
struct MuttWindow * msgwin_new(bool interactive)
Create the Message Window.
Definition msgwin.c:381
void msgwin_add_text(struct MuttWindow *win, const char *text, const struct AttrColor *ac_color)
Add text to the Message Window.
Definition msgwin.c:431
void msgwin_set_text(struct MuttWindow *win, const char *text, enum ColorId color)
Set the text for the Message Window.
Definition msgwin.c:502
Message Window.
wchar_t ReplacementChar
When a Unicode character can't be displayed, use this instead.
Definition charset.c:62
#define ICONV_BUF_TOO_SMALL
Error value for iconv() - Buffer too small.
Definition charset.h:116
#define ICONV_ILLEGAL_SEQ
Error value for iconv() - Illegal sequence.
Definition charset.h:114
Convenience wrapper for the library headers.
#define _(a)
Definition message.h:28
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition notify.c:173
int mutt_str_asprintf(char **strp, const char *fmt,...)
Definition string.c:809
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
Definition string.c:503
Many unsorted constants and some structs.
int mutt_system(const char *cmd)
Run an external command.
Definition system.c:51
Define wrapper functions around Curses.
void mutt_resize_screen(void)
Update NeoMutt's opinion about the window size.
Definition resize.c:76
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
NeoMutt Logging.
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
void mutt_window_free(struct MuttWindow **ptr)
Free a Window and its children.
struct MuttWindow * window_set_focus(struct MuttWindow *win)
Set the Window focus.
int mutt_window_addstr(struct MuttWindow *win, const char *str)
Write a string to a Window.
int mutt_window_addch(struct MuttWindow *win, int ch)
Write one character to a Window.
Window management.
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:666
@ NT_TIMEOUT
Timeout has occurred.
Definition notify_type.h:57
@ NT_RESIZE
Window has been resized.
Definition notify_type.h:53
All user-callable functions.
#define OP_TIMEOUT
1 second with no events
Definition opcodes.h:35
#define OP_REPAINT
Repaint is needed.
Definition opcodes.h:34
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
Definition pool.c:91
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Definition pool.c:111
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
Definition quad.h:39
Ask the user a question.
enum QuadOption query_yesorno(const char *prompt, enum QuadOption def)
Ask the user a Yes/No question.
Definition question.c:329
volatile sig_atomic_t SigWinch
true after SIGWINCH is received
Definition signal.c:69
volatile sig_atomic_t SigInt
true after SIGINT is received
Definition signal.c:68
int endwin(void)
A curses colour and its attributes.
Definition attr.h:65
String manipulation buffer.
Definition buffer.h:36
Input for the file completion function.
Definition curs_lib.h:39
char *** files
List of files selected.
Definition curs_lib.h:42
struct MuttWindow * win
Current Focused Window.
Definition curs_lib.h:44
struct Mailbox * mailbox
Mailbox.
Definition curs_lib.h:41
bool multiple
Allow multiple selections.
Definition curs_lib.h:40
int * numfiles
Number of files selected.
Definition curs_lib.h:43
An event such as a keypress.
Definition get.h:75
int op
Function opcode, e.g. OP_HELP.
Definition get.h:77
int ch
Raw key pressed.
Definition get.h:76
Key private Module data.
Definition module_data.h:34
struct KeyEventArray macro_events
Macro event buffer.
Definition module_data.h:36
keycode_t abort_key
Key to abort prompts, normally Ctrl-G.
Definition module_data.h:38
A mailbox.
Definition mailbox.h:81
Container for Accounts, Notifications.
Definition neomutt.h:41
struct Notify * notify_timeout
Timeout notifications handler.
Definition neomutt.h:47
struct Notify * notify_resize
Window resize notifications handler.
Definition neomutt.h:46
struct ConfigSubset * sub
Inherited config items.
Definition neomutt.h:49