NeoMutt  2025-12-11-769-g906513
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 "key/module_data.h"
57#include "msgcont.h"
58#include "msgwin.h"
59#include "mutt_curses.h"
60#include "mutt_logging.h"
61#include "mutt_window.h"
62#include "opcodes.h"
63#include "thread.h"
64
69void mutt_beep(bool force)
70{
71 const bool c_beep = cs_subset_bool(NeoMutt->sub, "beep");
72 if (force || c_beep)
73 beep();
74}
75
79void mutt_refresh(void)
80{
81 /* don't refresh when we are waiting for a child. */
82 if (OptKeepQuiet)
83 return;
84
85 /* don't refresh in the middle of macros unless necessary */
87 if (!ARRAY_EMPTY(&key_mod_data->macro_events) && !OptForceRefresh)
88 return;
89
90 /* else */
91 refresh();
92}
93
103{
104 // Forcibly switch to the alternate screen.
105 // Using encryption can leave ncurses confused about which mode it's in.
106 fputs("\033[?1049h", stdout);
107 fflush(stdout);
108 keypad(stdscr, true);
109 clearok(stdscr, true);
110 window_redraw(NULL);
111}
112
118void mutt_edit_file(const char *editor, const char *file)
119{
120 struct Buffer *cmd = buf_pool_get();
121
122 mutt_endwin();
123 buf_file_expand_fmt_quote(cmd, editor, file);
124 if (mutt_system(buf_string(cmd)) != 0)
125 {
126 mutt_error(_("Error running \"%s\""), buf_string(cmd));
127 }
128 /* the terminal may have been resized while the editor owned it */
130
131 buf_pool_release(&cmd);
132}
133
140{
142 if (query_yesorno(_("Exit NeoMutt without saving?"), MUTT_YES) == MUTT_YES)
143 {
144 mutt_exit(0); /* This call never returns */
145 }
147 SigInt = false;
148}
149
153void mutt_endwin(void)
154{
155 if (!OptGui)
156 return;
157
158 int e = errno;
159
160 /* at least in some situations (screen + xterm under SuSE11/12) endwin()
161 * doesn't properly flush the screen without an explicit call. */
162 mutt_refresh();
163 endwin();
164 SigWinch = true;
165
166 errno = e;
167}
168
175int mutt_any_key_to_continue(const char *s)
176{
177 struct termios term = { 0 };
178 struct termios old = { 0 };
179
180 int fd = open("/dev/tty", O_RDONLY);
181 if (fd < 0)
182 return EOF;
183
184 tcgetattr(fd, &old); // Save the current tty settings
185
186 term = old;
187 term.c_lflag &= ~(ICANON | ECHO); // Canonical (not line-buffered), don't echo the characters
188 term.c_cc[VMIN] = 1; // Wait for at least one character
189 term.c_cc[VTIME] = 255; // Wait for 25.5s
190 tcsetattr(fd, TCSANOW, &term);
191
192 if (s)
193 fputs(s, stdout);
194 else
195 fputs(_("Press any key to continue..."), stdout);
196 fflush(stdout);
197
198 char ch = '\0';
199 // Wait for a character. This might timeout, so loop.
200 while (read(fd, &ch, 1) == 0)
201 ; // do nothing
202
203 // Change the tty settings to be non-blocking
204 term.c_cc[VMIN] = 0; // Returning with zero characters is acceptable
205 term.c_cc[VTIME] = 0; // Don't wait
206 tcsetattr(fd, TCSANOW, &term);
207
208 char buf[64] = { 0 };
209 while (read(fd, buf, sizeof(buf)) > 0)
210 ; // Mop up any remaining chars
211
212 tcsetattr(fd, TCSANOW, &old); // Restore the previous tty settings
213 close(fd);
214
215 fputs("\r\n", stdout);
217 return (ch >= 0) ? ch : EOF;
218}
219
238int mw_enter_fname(const char *prompt, struct Buffer *fname, bool mailbox,
239 struct Mailbox *m, bool multiple, char ***files,
240 int *numfiles, SelectFileFlags flags)
241{
242 struct MuttWindow *win = msgwin_new(true);
243 if (!win)
244 return -1;
245
246 int rc = -1;
247
248 struct Buffer *text = buf_pool_get();
249 const struct AttrColor *ac_normal = simple_color_get(MT_COLOR_NORMAL);
250 const struct AttrColor *ac_prompt = merged_color_overlay(ac_normal,
252
253 msgwin_add_text(win, prompt, ac_prompt);
254 msgwin_add_text(win, _(" ('?' for list): "), ac_prompt);
255 if (!buf_is_empty(fname))
256 msgwin_add_text(win, buf_string(fname), ac_normal);
257
259 struct MuttWindow *old_focus = window_set_focus(win);
260
261 struct KeyEvent event = { 0, OP_NULL };
262 do
263 {
264 window_redraw(NULL);
265 event = mutt_getch(GETCH_NO_FLAGS);
266 } while ((event.op == OP_TIMEOUT) || (event.op == OP_REPAINT));
267
268 mutt_refresh();
269 win = msgcont_pop_window();
270 window_set_focus(old_focus);
271 mutt_window_free(&win);
272
273 if (event.ch < 0)
274 goto done;
275
276 if (event.ch == '?')
277 {
278 buf_reset(fname);
279
280 if (flags == MUTT_SEL_NO_FLAGS)
281 flags = MUTT_SEL_FOLDER;
282 if (multiple)
283 flags |= MUTT_SEL_MULTI;
284 if (mailbox)
285 flags |= MUTT_SEL_MAILBOX;
286 dlg_browser(fname, flags, m, files, numfiles);
287 }
288 else
289 {
290 char *pc = NULL;
291 mutt_str_asprintf(&pc, "%s: ", prompt);
292 if (event.op == OP_NULL)
293 mutt_unget_ch(event.ch);
294 else
295 mutt_unget_op(event.op);
296
297 buf_alloc(fname, 1024);
298 struct FileCompletionData cdata = { multiple, m, files, numfiles, NULL };
299 enum HistoryClass hclass = mailbox ? HC_MAILBOX : HC_FILE;
300 if (mw_get_field(pc, fname, MUTT_COMP_CLEAR, hclass, &CompleteMailboxOps, &cdata) != 0)
301 {
302 buf_reset(fname);
303 }
304 FREE(&pc);
305 }
306
307 rc = 0;
308
309done:
310 buf_pool_release(&text);
311 return rc;
312}
313
321int mutt_addwch(struct MuttWindow *win, wchar_t wc)
322{
323 char buf[MB_LEN_MAX * 2];
324 mbstate_t mbstate = { 0 };
325 size_t n1, 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, w = 0, l = 0, cl;
390 int cw;
391 mbstate_t mbstate = { 0 };
392
393 if (!src)
394 goto out;
395
396 n = mutt_str_len(src);
397
398 for (w = 0; n && (cl = mbrtowc(&wc, src, n, &mbstate)); src += cl, n -= cl)
399 {
400 if (cl == ICONV_ILLEGAL_SEQ)
401 {
402 memset(&mbstate, 0, sizeof(mbstate));
403 cl = 1;
404 wc = ReplacementChar;
405 }
406 else if (cl == ICONV_BUF_TOO_SMALL)
407 {
408 cl = n;
409 wc = ReplacementChar;
410 }
411
412 cw = wcwidth(wc);
413 /* hack because MUTT_TREE symbols aren't turned into characters
414 * until rendered by print_enriched_string() */
415 if ((cw < 0) && (src[0] == MUTT_SPECIAL_INDEX))
416 {
417 cl = 2; /* skip the index coloring sequence */
418 cw = 0;
419 }
420 else if ((cw < 0) && (cl == 1) && (src[0] != '\0') && (src[0] < MUTT_TREE_MAX))
421 {
422 cw = 1;
423 }
424 else if (cw < 0)
425 {
426 cw = 0; /* unprintable wchar */
427 }
428 if (wc == '\n')
429 break;
430 if (((cl + l) > maxlen) || ((cw + w) > maxwid))
431 break;
432 l += cl;
433 w += cw;
434 }
435out:
436 if (width)
437 *width = w;
438 return l;
439}
440
446size_t mutt_strwidth(const char *s)
447{
448 if (!s)
449 return 0;
450 return mutt_strnwidth(s, mutt_str_len(s));
451}
452
459size_t mutt_strnwidth(const char *s, size_t n)
460{
461 if (!s)
462 return 0;
463
464 wchar_t wc = 0;
465 int w;
466 size_t k;
467 mbstate_t mbstate = { 0 };
468
469 for (w = 0; n && (k = mbrtowc(&wc, s, n, &mbstate)); s += k, n -= k)
470 {
471 if (*s == MUTT_SPECIAL_INDEX)
472 {
473 if (n < 2)
474 break;
475 s += 2; /* skip the index coloring sequence */
476 n -= 2;
477 k = 0;
478 continue;
479 }
480
481 if ((k == ICONV_ILLEGAL_SEQ) || (k == ICONV_BUF_TOO_SMALL))
482 {
483 if (k == ICONV_ILLEGAL_SEQ)
484 memset(&mbstate, 0, sizeof(mbstate));
485 k = (k == ICONV_ILLEGAL_SEQ) ? 1 : n;
486 wc = ReplacementChar;
487 }
488 if (!IsWPrint(wc))
489 wc = '?';
490 w += wcwidth(wc);
491 }
492 return w;
493}
494
505void mw_what_key(void)
506{
507 struct MuttWindow *win = msgwin_new(true);
508 if (!win)
509 return;
510
512 struct Buffer *key = buf_pool_get();
513 struct Buffer *prompt = buf_pool_get();
514 struct Buffer *text = buf_pool_get();
515
516 keymap_get_name(key_mod_data->abort_key, key);
517
518 buf_printf(prompt, _("Enter keys (%s to abort): "), buf_string(key));
520
522 struct MuttWindow *old_focus = window_set_focus(win);
523 window_redraw(win);
524
525 const struct AttrColor *ac_normal = simple_color_get(MT_COLOR_NORMAL);
526 const struct AttrColor *ac_prompt = simple_color_get(MT_COLOR_PROMPT);
527
528 // ---------------------------------------------------------------------------
529 // Event Loop
530 timeout(1000); // 1 second
531 while (true)
532 {
533 int ch = getch();
534 if (ch == key_mod_data->abort_key)
535 break;
536
537 if (ch == KEY_RESIZE)
538 {
539 timeout(0);
540 while ((ch = getch()) == KEY_RESIZE)
541 {
542 // do nothing
543 }
544 }
545
546 if (ch == ERR)
547 {
548 if (!isatty(STDIN_FILENO)) // terminal was lost
549 mutt_exit(1);
550
551 if (SigWinch)
552 {
553 SigWinch = false;
555 window_redraw(NULL);
556 }
557 else
558 {
560 }
561
562 continue;
563 }
564
566
567 buf_reset(key);
568 keymap_get_name(ch, key);
569
570 buf_printf(text, _("Char = %s, Octal = %o, Decimal = %d\n"), buf_string(key), ch, ch);
571
572 msgwin_add_text(win, buf_string(text), ac_normal);
573 msgwin_add_text(win, buf_string(prompt), ac_prompt);
574 msgwin_add_text(win, NULL, NULL);
575 window_redraw(NULL);
576 }
577 // ---------------------------------------------------------------------------
578
579 buf_pool_release(&key);
580 buf_pool_release(&prompt);
581 buf_pool_release(&text);
582
583 win = msgcont_pop_window();
584 window_set_focus(old_focus);
585 mutt_window_free(&win);
586}
587
597char *mutt_str_expand_tabs(char *str, size_t *len, int tabwidth)
598{
599 if (!str || !len || (tabwidth < 1))
600 return NULL;
601
602 // calculate how much space we need
603 size_t required_len = 0;
604 for (int i = 0; (i < *len) && (str[i] != '\0'); i++)
605 {
606 if (str[i] == '\t')
607 required_len += tabwidth; // cheat, just assume full tab width
608 else
609 required_len++;
610 }
611
612 // resize the string if there isn't enough space
613 while (required_len > *len)
614 {
615 *len += 256;
616 MUTT_MEM_REALLOC(&str, *len, char);
617 }
618
619 // expand tabs
620 for (int i = 0; str[i] != '\0'; i++)
621 {
622 if (str[i] == '\t')
623 {
624 int num_cells = mutt_strnwidth(str, i);
625 int indent = abs((num_cells % tabwidth) - tabwidth);
626 memmove(str + i + indent, str + i + 1, *len - (i + indent) - indent);
627 memset(str + i, ' ', indent);
628 }
629 }
630
631 return str;
632}
#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.
#define MUTT_SEL_MAILBOX
Select a mailbox.
Definition lib.h:56
#define MUTT_SEL_FOLDER
Select a local directory.
Definition lib.h:58
#define MUTT_SEL_MULTI
Multi-selection is enabled.
Definition lib.h:57
#define MUTT_SEL_NO_FLAGS
No flags are set.
Definition lib.h:55
uint8_t SelectFileFlags
Flags for mutt_select_file(), e.g. MUTT_SEL_MAILBOX.
Definition lib.h:54
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition buffer.c:161
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
Definition buffer.c:76
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
Definition buffer.c:291
void buf_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
Definition buffer.c:337
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:97
@ 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:118
size_t mutt_strnwidth(const char *s, size_t n)
Measure a string's width in screen cells.
Definition curs_lib.c:459
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:79
int mutt_addwch(struct MuttWindow *win, wchar_t wc)
Addwch would be provided by an up-to-date curses library.
Definition curs_lib.c:321
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
Definition curs_lib.c:175
void mutt_need_hard_redraw(void)
Force a hard refresh.
Definition curs_lib.c:102
void mutt_query_exit(void)
Ask the user if they want to leave NeoMutt.
Definition curs_lib.c:139
void mutt_endwin(void)
Shutdown curses.
Definition curs_lib.c:153
void mutt_beep(bool force)
Irritate the user.
Definition curs_lib.c:69
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
Definition curs_lib.c:446
char * mutt_str_expand_tabs(char *str, size_t *len, int tabwidth)
Convert tabs to spaces in a string.
Definition curs_lib.c:597
GUI miscellaneous curses (window drawing) routines.
Edit a string.
#define MUTT_COMP_CLEAR
Clear input if printable character is pressed.
Definition wdata.h:43
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:1351
void mutt_flushinp(void)
MacroEvents moved to KeyModuleData UngetKeyEvents moved to KeyModuleData.
Definition get.c:60
struct KeyEvent mutt_getch(GetChFlags flags)
Read a character from the input buffer.
Definition get.c:201
void mutt_unget_op(int op)
Return an operation to the input buffer.
Definition get.c:130
void mutt_unget_ch(int ch)
Return a keystroke to the input buffer.
Definition get.c:118
#define GETCH_NO_FLAGS
No flags are set.
Definition get.h:34
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:505
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:238
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:467
#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:54
@ HC_FILE
Files.
Definition lib.h:58
@ HC_MAILBOX
Mailboxes.
Definition lib.h:61
void keymap_get_name(int c, struct Buffer *buf)
Get the human name for a key.
Definition keymap.c:195
Manage keymappings.
Key private Module data.
#define IsWPrint(wc)
Definition mbyte.h:40
#define FREE(x)
Free memory and set the pointer to NULL.
Definition memory.h:68
#define MUTT_MEM_REALLOC(pptr, n, type)
Definition memory.h:55
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:73
void msgcont_push_window(struct MuttWindow *win)
Add a window to the Container Stack.
Definition msgcont.c:105
struct MuttWindow * msgcont_pop_window(void)
Remove the last Window from the Container Stack.
Definition msgcont.c:60
Message Window.
struct MuttWindow * msgwin_new(bool interactive)
Create the Message Window.
Definition msgwin.c:372
void msgwin_clear_text(struct MuttWindow *win)
Clear the text in the Message Window.
Definition msgwin.c:522
void msgwin_add_text(struct MuttWindow *win, const char *text, const struct AttrColor *ac_color)
Add text to the Message Window.
Definition msgwin.c:422
void msgwin_set_text(struct MuttWindow *win, const char *text, enum ColorId color)
Set the text for the Message Window.
Definition msgwin.c:487
Message Window.
wchar_t ReplacementChar
When a Unicode character can't be displayed, use this instead.
Definition charset.c:61
#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:808
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:665
@ NT_TIMEOUT
Timeout has occurred.
Definition notify_type.h:56
@ NT_RESIZE
Window has been resized.
Definition notify_type.h:52
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:50
int op
Function opcode, e.g. OP_HELP.
Definition get.h:52
int ch
Raw key pressed.
Definition get.h:51
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:78
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