NeoMutt  2025-01-09-117-gace867
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
curs_lib.c
Go to the documentation of this file.
1
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_thread.h"
61#include "mutt_window.h"
62#include "opcodes.h"
63#include "protos.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 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 (OptNoCurses)
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_NO_FLAGS);
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_NO_FLAGS)
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 };
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];
323 mbstate_t mbstate = { 0 };
324 size_t n1, n2;
325
326 if (((n1 = wcrtomb(buf, wc, &mbstate)) == ICONV_ILLEGAL_SEQ) ||
327 ((n2 = wcrtomb(buf + n1, 0, &mbstate)) == ICONV_ILLEGAL_SEQ))
328 {
329 return -1; /* ERR */
330 }
331 else
332 {
333 return mutt_window_addstr(win, buf);
334 }
335}
336
343void mutt_paddstr(struct MuttWindow *win, int n, const char *s)
344{
345 wchar_t wc = 0;
346 size_t k;
347 size_t len = mutt_str_len(s);
348 mbstate_t mbstate = { 0 };
349
350 for (; len && (k = mbrtowc(&wc, s, len, &mbstate)); s += k, len -= k)
351 {
352 if ((k == ICONV_ILLEGAL_SEQ) || (k == ICONV_BUF_TOO_SMALL))
353 {
354 if (k == ICONV_ILLEGAL_SEQ)
355 memset(&mbstate, 0, sizeof(mbstate));
356 k = (k == ICONV_ILLEGAL_SEQ) ? 1 : len;
357 wc = ReplacementChar;
358 }
359 if (!IsWPrint(wc))
360 wc = '?';
361 const int w = wcwidth(wc);
362 if (w >= 0)
363 {
364 if (w > n)
365 break;
366 mutt_addwch(win, wc);
367 n -= w;
368 }
369 }
370 while (n-- > 0)
371 mutt_window_addch(win, ' ');
372}
373
385size_t mutt_wstr_trunc(const char *src, size_t maxlen, size_t maxwid, size_t *width)
386{
387 wchar_t wc = 0;
388 size_t n, w = 0, l = 0, cl;
389 int cw;
390 mbstate_t mbstate = { 0 };
391
392 if (!src)
393 goto out;
394
395 n = mutt_str_len(src);
396
397 for (w = 0; n && (cl = mbrtowc(&wc, src, n, &mbstate)); src += cl, n -= cl)
398 {
399 if (cl == ICONV_ILLEGAL_SEQ)
400 {
401 memset(&mbstate, 0, sizeof(mbstate));
402 cl = 1;
403 wc = ReplacementChar;
404 }
405 else if (cl == ICONV_BUF_TOO_SMALL)
406 {
407 cl = n;
408 wc = ReplacementChar;
409 }
410
411 cw = wcwidth(wc);
412 /* hack because MUTT_TREE symbols aren't turned into characters
413 * until rendered by print_enriched_string() */
414 if ((cw < 0) && (src[0] == MUTT_SPECIAL_INDEX))
415 {
416 cl = 2; /* skip the index coloring sequence */
417 cw = 0;
418 }
419 else if ((cw < 0) && (cl == 1) && (src[0] != '\0') && (src[0] < MUTT_TREE_MAX))
420 {
421 cw = 1;
422 }
423 else if (cw < 0)
424 {
425 cw = 0; /* unprintable wchar */
426 }
427 if (wc == '\n')
428 break;
429 if (((cl + l) > maxlen) || ((cw + w) > maxwid))
430 break;
431 l += cl;
432 w += cw;
433 }
434out:
435 if (width)
436 *width = w;
437 return l;
438}
439
445size_t mutt_strwidth(const char *s)
446{
447 if (!s)
448 return 0;
449 return mutt_strnwidth(s, mutt_str_len(s));
450}
451
458size_t mutt_strnwidth(const char *s, size_t n)
459{
460 if (!s)
461 return 0;
462
463 wchar_t wc = 0;
464 int w;
465 size_t k;
466 mbstate_t mbstate = { 0 };
467
468 for (w = 0; n && (k = mbrtowc(&wc, s, n, &mbstate)); s += k, n -= k)
469 {
470 if (*s == MUTT_SPECIAL_INDEX)
471 {
472 s += 2; /* skip the index coloring sequence */
473 k = 0;
474 continue;
475 }
476
477 if ((k == ICONV_ILLEGAL_SEQ) || (k == ICONV_BUF_TOO_SMALL))
478 {
479 if (k == ICONV_ILLEGAL_SEQ)
480 memset(&mbstate, 0, sizeof(mbstate));
481 k = (k == ICONV_ILLEGAL_SEQ) ? 1 : n;
482 wc = ReplacementChar;
483 }
484 if (!IsWPrint(wc))
485 wc = '?';
486 w += wcwidth(wc);
487 }
488 return w;
489}
490
501void mw_what_key(void)
502{
503 struct MuttWindow *win = msgwin_new(true);
504 if (!win)
505 return;
506
507 struct Buffer *key = buf_pool_get();
508 struct Buffer *prompt = buf_pool_get();
509 struct Buffer *text = buf_pool_get();
510
511 km_keyname(AbortKey, key);
512
513 buf_printf(prompt, _("Enter keys (%s to abort): "), buf_string(key));
515
517 struct MuttWindow *old_focus = window_set_focus(win);
518 window_redraw(win);
519
520 const struct AttrColor *ac_normal = simple_color_get(MT_COLOR_NORMAL);
521 const struct AttrColor *ac_prompt = simple_color_get(MT_COLOR_PROMPT);
522
523 // ---------------------------------------------------------------------------
524 // Event Loop
525 timeout(1000); // 1 second
526 while (true)
527 {
528 int ch = getch();
529 if (ch == AbortKey)
530 break;
531
532 if (ch == KEY_RESIZE)
533 {
534 timeout(0);
535 while ((ch = getch()) == KEY_RESIZE)
536 {
537 // do nothing
538 }
539 }
540
541 if (ch == ERR)
542 {
543 if (!isatty(STDIN_FILENO)) // terminal was lost
544 mutt_exit(1);
545
546 if (SigWinch)
547 {
548 SigWinch = false;
550 window_redraw(NULL);
551 }
552 else
553 {
555 }
556
557 continue;
558 }
559
561
562 buf_reset(key);
563 km_keyname(ch, key);
564
565 buf_printf(text, _("Char = %s, Octal = %o, Decimal = %d\n"), buf_string(key), ch, ch);
566
567 msgwin_add_text(win, buf_string(text), ac_normal);
568 msgwin_add_text(win, buf_string(prompt), ac_prompt);
569 msgwin_add_text(win, NULL, NULL);
570 window_redraw(NULL);
571 }
572 // ---------------------------------------------------------------------------
573
574 buf_pool_release(&key);
575 buf_pool_release(&prompt);
576 buf_pool_release(&text);
577
578 win = msgcont_pop_window();
579 window_set_focus(old_focus);
580 mutt_window_free(&win);
581}
582
592char *mutt_str_expand_tabs(char *str, size_t *len, int tabwidth)
593{
594 if (!str || !len || (tabwidth < 1))
595 return NULL;
596
597 // calculate how much space we need
598 size_t required_len = 0;
599 for (int i = 0; (i < *len) && (str[i] != '\0'); i++)
600 {
601 if (str[i] == '\t')
602 required_len += tabwidth; // cheat, just assume full tab width
603 else
604 required_len++;
605 }
606
607 // resize the string if there isn't enough space
608 while (required_len > *len)
609 {
610 *len += 256;
611 MUTT_MEM_REALLOC(&str, *len, char);
612 }
613
614 // expand tabs
615 for (int i = 0; i < *len; i++)
616 {
617 if (str[i] == '\t')
618 {
619 int num_cells = mutt_strnwidth(str, i);
620 int indent = abs((num_cells % tabwidth) - tabwidth);
621 memmove(str + i + indent, str + i + 1, *len - (i + indent) - indent);
622 memset(str + i, ' ', indent);
623 }
624 }
625
626 return str;
627}
#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:160
Select a Mailbox from a list.
#define MUTT_SEL_MAILBOX
Select a mailbox.
Definition: lib.h:58
#define MUTT_SEL_FOLDER
Select a local directory.
Definition: lib.h:60
#define MUTT_SEL_MULTI
Multi-selection is enabled.
Definition: lib.h:59
#define MUTT_SEL_NO_FLAGS
No flags are set.
Definition: lib.h:57
uint8_t SelectFileFlags
Flags for mutt_select_file(), e.g. MUTT_SEL_MAILBOX.
Definition: lib.h:56
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:95
@ MT_COLOR_NORMAL
Plain text.
Definition: color.h:55
@ MT_COLOR_PROMPT
Question/user input.
Definition: color.h:58
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:458
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:385
void mutt_paddstr(struct MuttWindow *win, int n, const char *s)
Display a string on screen, padded if necessary.
Definition: curs_lib.c:343
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: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_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:69
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
Definition: curs_lib.c:445
char * mutt_str_expand_tabs(char *str, size_t *len, int tabwidth)
Convert tabs to spaces in a string.
Definition: curs_lib.c:592
GUI miscellaneous curses (window drawing) routines.
void mutt_flushinp(void)
Empty all the keyboard buffers.
Definition: get.c:58
struct KeyEvent mutt_getch(GetChFlags flags)
Read a character from the input buffer.
Definition: get.c:210
void mutt_unget_op(int op)
Return an operation to the input buffer.
Definition: get.c:126
void mutt_unget_ch(int ch)
Return a keystroke to the input buffer.
Definition: get.c:115
Edit a string.
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:1349
struct KeyEventArray MacroEvents
These are used for macros and exec/push commands.
Definition: get.c:49
bool OptKeepQuiet
(pseudo) shut up the message and refresh functions while we are executing an external program
Definition: globals.c:60
bool OptNoCurses
(pseudo) when sending in batch mode
Definition: globals.c:66
bool OptForceRefresh
(pseudo) refresh even during macros
Definition: globals.c:59
void dlg_browser(struct Buffer *file, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles)
Let the user select a file -.
Definition: dlg_browser.c:853
void mw_what_key(void)
Display the value of a key -.
Definition: curs_lib.c:501
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:273
#define mutt_error(...)
Definition: logging2.h:93
Read/write command history from/to a file.
HistoryClass
Type to differentiate different histories.
Definition: lib.h:52
@ HC_FILE
Files.
Definition: lib.h:56
@ HC_MAILBOX
Mailboxes.
Definition: lib.h:59
keycode_t AbortKey
code of key to abort prompts, normally Ctrl-G
Definition: lib.c:121
void km_keyname(int c, struct Buffer *buf)
Get the human name for a key.
Definition: lib.c:465
Manage keymappings.
#define GETCH_NO_FLAGS
No flags are set.
Definition: lib.h:52
#define IsWPrint(wc)
Definition: mbyte.h:41
#define FREE(x)
Definition: memory.h:55
#define MUTT_MEM_REALLOC(pptr, n, type)
Definition: memory.h:43
const struct AttrColor * merged_color_overlay(const struct AttrColor *base, const struct AttrColor *over)
Combine two colours.
Definition: merged.c:107
void msgcont_push_window(struct MuttWindow *win)
Add a window to the Container Stack.
Definition: msgcont.c:93
struct MuttWindow * msgcont_pop_window(void)
Remove the last Window from the Container Stack.
Definition: msgcont.c:57
Message Window.
struct MuttWindow * msgwin_new(bool interactive)
Create the Message Window.
Definition: msgwin.c:371
void msgwin_clear_text(struct MuttWindow *win)
Clear the text in the Message Window.
Definition: msgwin.c:519
void msgwin_add_text(struct MuttWindow *win, const char *text, const struct AttrColor *ac_color)
Add text to the Message Window.
Definition: msgwin.c:419
void msgwin_set_text(struct MuttWindow *win, const char *text, enum ColorId color)
Set the text for the Message Window.
Definition: msgwin.c:484
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:98
#define ICONV_ILLEGAL_SEQ
Error value for iconv() - Illegal sequence.
Definition: charset.h:96
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:804
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
Definition: string.c:497
Many unsorted constants and some structs.
#define MUTT_COMP_CLEAR
Clear input if printable character is pressed.
Definition: mutt.h:57
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)
Definition: mutt_logging.c:74
NeoMutt Logging.
Create/manipulate threading in emails.
@ MUTT_TREE_MAX
Definition: mutt_thread.h:70
@ MUTT_SPECIAL_INDEX
Colour indicator.
Definition: mutt_thread.h:72
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
Definition: mutt_window.c:599
void mutt_window_free(struct MuttWindow **ptr)
Free a Window and its children.
Definition: mutt_window.c:205
struct MuttWindow * window_set_focus(struct MuttWindow *win)
Set the Window focus.
Definition: mutt_window.c:649
int mutt_window_addstr(struct MuttWindow *win, const char *str)
Write a string to a Window.
Definition: mutt_window.c:381
int mutt_window_addch(struct MuttWindow *win, int ch)
Write one character to a Window.
Definition: mutt_window.c:353
Window management.
@ 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:36
#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:82
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Definition: pool.c:96
Prototypes for many functions.
int mutt_system(const char *cmd)
Run an external command.
Definition: system.c:52
@ 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:327
volatile sig_atomic_t SigWinch
true after SIGWINCH is received
Definition: signal.c:70
volatile sig_atomic_t SigInt
true after SIGINT is received
Definition: signal.c:69
int endwin(void)
A curses colour and its attributes.
Definition: attr.h:66
String manipulation buffer.
Definition: buffer.h:36
Input for the file completion function.
Definition: curs_lib.h:40
char *** files
List of files selected.
Definition: curs_lib.h:43
struct Mailbox * mailbox
Mailbox.
Definition: curs_lib.h:42
bool multiple
Allow multiple selections.
Definition: curs_lib.h:41
int * numfiles
Number of files selected.
Definition: curs_lib.h:44
An event such as a keypress.
Definition: lib.h:81
int op
Function opcode, e.g. OP_HELP.
Definition: lib.h:83
int ch
Raw key pressed.
Definition: lib.h:82
A mailbox.
Definition: mailbox.h:79
Container for Accounts, Notifications.
Definition: neomutt.h:43
struct Notify * notify_timeout
Timeout notifications handler.
Definition: neomutt.h:46
struct Notify * notify_resize
Window resize notifications handler.
Definition: neomutt.h:45
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:47