NeoMutt
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
dlg_attach.c
Go to the documentation of this file.
1
69#include "config.h"
70#include <stdbool.h>
71#include <stdint.h>
72#include <stdio.h>
73#include "mutt/lib.h"
74#include "config/lib.h"
75#include "email/lib.h"
76#include "core/lib.h"
77#include "gui/lib.h"
78#include "key/lib.h"
79#include "menu/lib.h"
80#include "attach.h"
81#include "attachments.h"
82#include "format_flags.h"
83#include "functions.h"
84#include "hdrline.h"
85#include "hook.h"
86#include "mutt_logging.h"
87#include "muttlib.h"
88#include "mview.h"
89#include "private_data.h"
90#include "recvattach.h"
91
93static const struct Mapping AttachmentHelp[] = {
94 // clang-format off
95 { N_("Exit"), OP_EXIT },
96 { N_("Save"), OP_ATTACHMENT_SAVE },
97 { N_("Pipe"), OP_PIPE },
98 { N_("Print"), OP_ATTACHMENT_PRINT },
99 { N_("Help"), OP_HELP },
100 { NULL, 0 },
101 // clang-format on
102};
103
110{
111 if (nc->event_type != NT_CONFIG)
112 return 0;
113 if (!nc->global_data || !nc->event_data)
114 return -1;
115
116 struct EventConfig *ev_c = nc->event_data;
117
118 if (!mutt_str_equal(ev_c->name, "attach_format") && !mutt_str_equal(ev_c->name, "message_format"))
119 return 0;
120
121 struct Menu *menu = nc->global_data;
123 mutt_debug(LL_DEBUG5, "config done, request WA_RECALC, MENU_REDRAW_FULL\n");
124
125 return 0;
126}
127
151const char *attach_format_str(char *buf, size_t buflen, size_t col, int cols, char op,
152 const char *src, const char *prec, const char *if_str,
153 const char *else_str, intptr_t data, MuttFormatFlags flags)
154{
155 char fmt[128] = { 0 };
156 char charset[128] = { 0 };
157 struct AttachPtr *aptr = (struct AttachPtr *) data;
158 bool optional = (flags & MUTT_FORMAT_OPTIONAL);
159
160 switch (op)
161 {
162 case 'C':
163 if (!optional)
164 {
165 if (mutt_is_text_part(aptr->body) &&
166 mutt_body_get_charset(aptr->body, charset, sizeof(charset)))
167 {
168 mutt_format_s(buf, buflen, prec, charset);
169 }
170 else
171 {
172 mutt_format_s(buf, buflen, prec, "");
173 }
174 }
175 else if (!mutt_is_text_part(aptr->body) ||
176 !mutt_body_get_charset(aptr->body, charset, sizeof(charset)))
177 {
178 optional = false;
179 }
180 break;
181 case 'c':
182 /* XXX */
183 if (!optional)
184 {
185 snprintf(fmt, sizeof(fmt), "%%%sc", prec);
186 snprintf(buf, buflen, fmt,
187 ((aptr->body->type != TYPE_TEXT) || aptr->body->noconv) ? 'n' : 'c');
188 }
189 else if ((aptr->body->type != TYPE_TEXT) || aptr->body->noconv)
190 {
191 optional = false;
192 }
193 break;
194 case 'd':
195 {
196 const char *const c_message_format = cs_subset_string(NeoMutt->sub, "message_format");
197 if (!optional)
198 {
199 if (aptr->body->description)
200 {
201 mutt_format_s(buf, buflen, prec, aptr->body->description);
202 break;
203 }
204 if (mutt_is_message_type(aptr->body->type, aptr->body->subtype) &&
205 c_message_format && aptr->body->email)
206 {
207 char s[128] = { 0 };
208 mutt_make_string(s, sizeof(s), cols, c_message_format, NULL, -1,
209 aptr->body->email,
211 if (*s)
212 {
213 mutt_format_s(buf, buflen, prec, s);
214 break;
215 }
216 }
217 if (!aptr->body->d_filename && !aptr->body->filename)
218 {
219 mutt_format_s(buf, buflen, prec, "<no description>");
220 break;
221 }
222 }
223 else if (aptr->body->description ||
224 (mutt_is_message_type(aptr->body->type, aptr->body->subtype) &&
225 c_message_format && aptr->body->email))
226 {
227 break;
228 }
229 }
230 /* fallthrough */
231 case 'F':
232 if (!optional)
233 {
234 if (aptr->body->d_filename)
235 {
236 mutt_format_s(buf, buflen, prec, aptr->body->d_filename);
237 break;
238 }
239 }
240 else if (!aptr->body->d_filename && !aptr->body->filename)
241 {
242 optional = false;
243 break;
244 }
245 /* fallthrough */
246 case 'f':
247 if (!optional)
248 {
249 if (aptr->body->filename && (*aptr->body->filename == '/'))
250 {
251 struct Buffer *path = buf_pool_get();
252
253 buf_strcpy(path, aptr->body->filename);
254 buf_pretty_mailbox(path);
255 mutt_format_s(buf, buflen, prec, buf_string(path));
256 buf_pool_release(&path);
257 }
258 else
259 {
260 mutt_format_s(buf, buflen, prec, NONULL(aptr->body->filename));
261 }
262 }
263 else if (!aptr->body->filename)
264 {
265 optional = false;
266 }
267 break;
268 case 'D':
269 if (!optional)
270 snprintf(buf, buflen, "%c", aptr->body->deleted ? 'D' : ' ');
271 else if (!aptr->body->deleted)
272 optional = false;
273 break;
274 case 'e':
275 if (!optional)
276 mutt_format_s(buf, buflen, prec, ENCODING(aptr->body->encoding));
277 break;
278 case 'I':
279 if (optional)
280 break;
281
282 const char dispchar[] = { 'I', 'A', 'F', '-' };
283 char ch;
284
285 if (aptr->body->disposition < sizeof(dispchar))
286 {
287 ch = dispchar[aptr->body->disposition];
288 }
289 else
290 {
291 mutt_debug(LL_DEBUG1, "ERROR: invalid content-disposition %d\n",
292 aptr->body->disposition);
293 ch = '!';
294 }
295 snprintf(buf, buflen, "%c", ch);
296 break;
297 case 'm':
298 if (!optional)
299 mutt_format_s(buf, buflen, prec, TYPE(aptr->body));
300 break;
301 case 'M':
302 if (!optional)
303 mutt_format_s(buf, buflen, prec, aptr->body->subtype);
304 else if (!aptr->body->subtype)
305 optional = false;
306 break;
307 case 'n':
308 if (optional)
309 break;
310
311 snprintf(fmt, sizeof(fmt), "%%%sd", prec);
312 snprintf(buf, buflen, fmt, aptr->num + 1);
313 break;
314 case 'Q':
315 if (optional)
316 {
317 optional = aptr->body->attach_qualifies;
318 }
319 else
320 {
321 snprintf(fmt, sizeof(fmt), "%%%sc", prec);
322 mutt_format_s(buf, buflen, fmt, "Q");
323 }
324 break;
325 case 's':
326 {
327 size_t l = 0;
328 if (aptr->body->filename && (flags & MUTT_FORMAT_STAT_FILE))
329 {
330 l = mutt_file_get_size(aptr->body->filename);
331 }
332 else
333 {
334 l = aptr->body->length;
335 }
336
337 if (!optional)
338 {
339 char tmp[128] = { 0 };
340 mutt_str_pretty_size(tmp, sizeof(tmp), l);
341 mutt_format_s(buf, buflen, prec, tmp);
342 }
343 else if (l == 0)
344 {
345 optional = false;
346 }
347
348 break;
349 }
350 case 't':
351 if (!optional)
352 snprintf(buf, buflen, "%c", aptr->body->tagged ? '*' : ' ');
353 else if (!aptr->body->tagged)
354 optional = false;
355 break;
356 case 'T':
357 if (!optional)
358 mutt_format_s_tree(buf, buflen, prec, NONULL(aptr->tree));
359 else if (!aptr->tree)
360 optional = false;
361 break;
362 case 'u':
363 if (!optional)
364 snprintf(buf, buflen, "%c", aptr->body->unlink ? '-' : ' ');
365 else if (!aptr->body->unlink)
366 optional = false;
367 break;
368 case 'X':
369 if (optional)
370 {
371 optional = ((aptr->body->attach_count + aptr->body->attach_qualifies) != 0);
372 }
373 else
374 {
375 snprintf(fmt, sizeof(fmt), "%%%sd", prec);
376 snprintf(buf, buflen, fmt, aptr->body->attach_count + aptr->body->attach_qualifies);
377 }
378 break;
379 default:
380 *buf = '\0';
381 }
382
383 if (optional)
384 {
385 mutt_expando_format(buf, buflen, col, cols, if_str, attach_format_str, data,
387 }
388 else if (flags & MUTT_FORMAT_OPTIONAL)
389 {
390 mutt_expando_format(buf, buflen, col, cols, else_str, attach_format_str,
392 }
393
394 /* We return the format string, unchanged */
395 return src;
396}
397
403static void attach_make_entry(struct Menu *menu, char *buf, size_t buflen, int line)
404{
405 struct AttachPrivateData *priv = menu->mdata;
406 struct AttachCtx *actx = priv->actx;
407
408 const char *const c_attach_format = cs_subset_string(NeoMutt->sub, "attach_format");
409 mutt_expando_format(buf, buflen, 0, menu->win->state.cols, NONULL(c_attach_format),
410 attach_format_str, (intptr_t) (actx->idx[actx->v2r[line]]),
412}
413
417static int attach_tag(struct Menu *menu, int sel, int act)
418{
419 struct AttachPrivateData *priv = menu->mdata;
420 struct AttachCtx *actx = priv->actx;
421
422 struct Body *cur = actx->idx[actx->v2r[sel]]->body;
423 bool ot = cur->tagged;
424
425 cur->tagged = ((act >= 0) ? act : !cur->tagged);
426 return cur->tagged - ot;
427}
428
437{
438 if (nc->event_type != NT_WINDOW)
439 return 0;
440 if (!nc->global_data || !nc->event_data)
441 return -1;
443 return 0;
444
445 struct MuttWindow *win_menu = nc->global_data;
446 struct EventWindow *ev_w = nc->event_data;
447 if (ev_w->win != win_menu)
448 return 0;
449
450 struct Menu *menu = win_menu->wdata;
451
454
455 mutt_debug(LL_DEBUG5, "window delete done\n");
456 return 0;
457}
458
472 struct Email *e, FILE *fp, bool attach_msg)
473{
474 if (!mv || !mv->mailbox || !e || !fp)
475 return;
476
477 struct Mailbox *m = mv->mailbox;
478
479 /* make sure we have parsed this message */
482
484 struct Menu *menu = dlg->wdata;
486 menu->tag = attach_tag;
487
488 struct AttachCtx *actx = mutt_actx_new();
489 actx->email = e;
490 actx->fp_root = fp;
491 mutt_update_recvattach_menu(actx, menu, true);
492
494 priv->menu = menu;
495 priv->actx = actx;
496 priv->sub = sub;
497 priv->mailbox = m;
498 priv->attach_msg = attach_msg;
499 menu->mdata = priv;
501
502 // NT_COLOR is handled by the SimpleDialog
505
506 struct MuttWindow *sbar = window_find_child(dlg, WT_STATUS_BAR);
507 sbar_set_title(sbar, _("Attachments"));
508
509 struct MuttWindow *old_focus = window_set_focus(menu->win);
510 // ---------------------------------------------------------------------------
511 // Event Loop
512 int rc = 0;
513 int op = OP_NULL;
514 do
515 {
516 menu_tagging_dispatcher(menu->win, op);
517 window_redraw(NULL);
518
520 mutt_debug(LL_DEBUG1, "Got op %s (%d)\n", opcodes_get_name(op), op);
521 if (op < 0)
522 continue;
523 if (op == OP_NULL)
524 {
526 continue;
527 }
529
530 rc = attach_function_dispatcher(dlg, op);
531 if (rc == FR_UNKNOWN)
532 rc = menu_function_dispatcher(menu->win, op);
533 if (rc == FR_UNKNOWN)
534 rc = global_function_dispatcher(NULL, op);
535
536 if (rc == FR_CONTINUE)
537 {
538 op = priv->op;
539 }
540
541 } while (rc != FR_DONE);
542 // ---------------------------------------------------------------------------
543
544 window_set_focus(old_focus);
545 simple_dialog_free(&dlg);
546}
struct AttachCtx * mutt_actx_new(void)
Create a new Attachment Context.
Definition: attach.c:189
struct AttachPrivateData * attach_private_data_new(void)
Create new Attach Data.
Definition: private_data.c:50
Handling of email attachments.
void mutt_parse_mime_message(struct Email *e, FILE *fp)
Parse a MIME email.
Definition: attachments.c:596
Miscellaneous email parsing routines.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
Definition: buffer.c:407
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:93
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Definition: helpers.c:292
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
void mutt_format_s_tree(char *buf, size_t buflen, const char *prec, const char *s)
Format a simple string with tree characters.
Definition: curs_lib.c:534
void mutt_format_s(char *buf, size_t buflen, const char *prec, const char *s)
Format a simple string.
Definition: curs_lib.c:522
@ FR_DONE
Exit the Dialog.
Definition: dispatcher.h:35
@ FR_UNKNOWN
Unknown function.
Definition: dispatcher.h:33
@ FR_CONTINUE
Remain in the Dialog.
Definition: dispatcher.h:34
static const struct Mapping AttachmentHelp[]
Help Bar for the Attachment selection dialog.
Definition: dlg_attach.c:93
char * mutt_body_get_charset(struct Body *b, char *buf, size_t buflen)
Get a body's character set.
Definition: body.c:131
Structs that make up an email.
bool mutt_is_message_type(int type, const char *subtype)
Determine if a mime type matches a message or not.
Definition: parse.c:1482
long mutt_file_get_size(const char *path)
Get the size of a file.
Definition: file.c:1560
Flags to control mutt_expando_format()
#define MUTT_FORMAT_FORCESUBJ
Print the subject even if unchanged.
Definition: format_flags.h:31
#define MUTT_FORMAT_NO_FLAGS
No flags are set.
Definition: format_flags.h:30
#define MUTT_FORMAT_OPTIONAL
Allow optional field processing.
Definition: format_flags.h:33
#define MUTT_FORMAT_ARROWCURSOR
Reserve space for arrow_cursor.
Definition: format_flags.h:35
uint8_t MuttFormatFlags
Flags for mutt_expando_format(), e.g. MUTT_FORMAT_FORCESUBJ.
Definition: format_flags.h:29
#define MUTT_FORMAT_STAT_FILE
Used by attach_format_str.
Definition: format_flags.h:34
int km_dokey(enum MenuType mtype, GetChFlags flags)
Determine what a keypress should do.
Definition: get.c:475
void km_error_key(enum MenuType mtype)
Handle an unbound key sequence.
Definition: get.c:305
int menu_tagging_dispatcher(struct MuttWindow *win, int op)
Perform tagging operations on the Menu - Implements function_dispatcher_t -.
Definition: tagging.c:230
int global_function_dispatcher(struct MuttWindow *win, int op)
Perform a Global function - Implements function_dispatcher_t -.
Definition: global.c:166
int attach_function_dispatcher(struct MuttWindow *win, int op)
Perform a Attach function - Implements function_dispatcher_t -.
Definition: functions.c:727
int menu_function_dispatcher(struct MuttWindow *win, int op)
Perform a Menu function - Implements function_dispatcher_t -.
Definition: functions.c:317
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t callback, intptr_t data, MuttFormatFlags flags)
Expand expandos (x) in a string -.
Definition: muttlib.c:745
const char * attach_format_str(char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, intptr_t data, MuttFormatFlags flags)
Format a string for the attachment menu - Implements format_t -.
Definition: dlg_attach.c:151
void dlg_attachment(struct ConfigSubset *sub, struct MailboxView *mv, struct Email *e, FILE *fp, bool attach_msg)
Show the attachments in a Menu -.
Definition: dlg_attach.c:471
#define mutt_debug(LEVEL,...)
Definition: logging2.h:89
static void attach_make_entry(struct Menu *menu, char *buf, size_t buflen, int line)
Format a menu item for the attachment list - Implements Menu::make_entry() -.
Definition: dlg_attach.c:403
void attach_private_data_free(struct Menu *menu, void **ptr)
Free Attach Data - Implements Menu::mdata_free() -.
Definition: private_data.c:38
static int attach_tag(struct Menu *menu, int sel, int act)
Tag an attachment - Implements Menu::tag() -.
Definition: dlg_attach.c:417
static int attach_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
Definition: dlg_attach.c:109
static int attach_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
Definition: dlg_attach.c:436
Convenience wrapper for the gui headers.
void simple_dialog_free(struct MuttWindow **ptr)
Destroy a simple index Dialog.
Definition: simple.c:168
struct MuttWindow * simple_dialog_new(enum MenuType mtype, enum WindowType wtype, const struct Mapping *help_data)
Create a simple index Dialog.
Definition: simple.c:132
void mutt_make_string(char *buf, size_t buflen, int cols, const char *s, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress)
Create formatted strings using mailbox expandos.
Definition: hdrline.c:1426
String processing routines to generate the mail index.
void mutt_message_hook(struct Mailbox *m, struct Email *e, HookFlags type)
Perform a message hook.
Definition: hook.c:657
Parse and execute user-defined hooks.
#define MUTT_MESSAGE_HOOK
message-hook: run before displaying a message
Definition: hook.h:45
Manage keymappings.
#define GETCH_NO_FLAGS
No flags are set.
Definition: lib.h:52
@ LL_DEBUG5
Log at debug level 5.
Definition: logging2.h:47
@ LL_DEBUG1
Log at debug level 1.
Definition: logging2.h:43
GUI present the user with a selectable list.
#define MENU_REDRAW_FULL
Redraw everything.
Definition: lib.h:60
void menu_queue_redraw(struct Menu *menu, MenuRedrawFlags redraw)
Queue a request for a redraw.
Definition: menu.c:180
@ TYPE_TEXT
Type: 'text/*'.
Definition: mime.h:38
#define ENCODING(x)
Definition: mime.h:92
#define TYPE(body)
Definition: mime.h:89
Convenience wrapper for the library headers.
#define N_(a)
Definition: message.h:32
#define _(a)
Definition: message.h:28
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
Definition: notify.c:230
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
Definition: notify.c:191
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition: string.c:798
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
Definition: mutt_logging.c:73
NeoMutt Logging.
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
Definition: mutt_window.c:634
struct MuttWindow * window_set_focus(struct MuttWindow *win)
Set the Window focus.
Definition: mutt_window.c:684
struct MuttWindow * window_find_child(struct MuttWindow *win, enum WindowType type)
Recursively find a child Window of a given type.
Definition: mutt_window.c:533
@ WT_STATUS_BAR
Status Bar containing extra info about the Index/Pager/etc.
Definition: mutt_window.h:102
@ WT_DLG_ATTACHMENT
Attachment Dialog, dlg_attachment()
Definition: mutt_window.h:78
@ NT_WINDOW_DELETE
Window is about to be deleted.
Definition: mutt_window.h:229
void buf_pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
Definition: muttlib.c:562
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
Definition: muttlib.c:1651
bool mutt_is_text_part(struct Body *b)
Is this part of an email in plain text?
Definition: muttlib.c:450
Some miscellaneous functions.
View of a Mailbox.
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
Definition: notify_type.h:57
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
Definition: notify_type.h:43
const char * opcodes_get_name(int op)
Get the name of an opcode.
Definition: opcodes.c:48
Private state data for the Pager.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
Definition: pool.c:81
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Definition: pool.c:94
void mutt_update_recvattach_menu(struct AttachCtx *actx, struct Menu *menu, bool init)
Update the Attachment Menu.
Definition: recvattach.c:1208
Routines for managing attachments.
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
Definition: sbar.c:227
Sidebar functions.
#define NONULL(x)
Definition: string2.h:37
A set of attachments.
Definition: attach.h:51
FILE * fp_root
Used by recvattach for updating.
Definition: attach.h:53
struct Email * email
Used by recvattach for updating.
Definition: attach.h:52
struct AttachPtr ** idx
Array of attachments.
Definition: attach.h:55
short * v2r
Mapping from virtual to real attachment.
Definition: attach.h:59
Private state data for Attachments.
Definition: private_data.h:35
int op
Op returned from the Pager, e.g. OP_NEXT_ENTRY.
Definition: private_data.h:40
struct Menu * menu
Current Menu.
Definition: private_data.h:36
struct ConfigSubset * sub
Config subset.
Definition: private_data.h:38
struct AttachCtx * actx
List of all Attachments.
Definition: private_data.h:37
bool attach_msg
Are we in "attach message" mode?
Definition: private_data.h:41
struct Mailbox * mailbox
Current Mailbox.
Definition: private_data.h:39
An email to which things will be attached.
Definition: attach.h:35
struct Body * body
Attachment.
Definition: attach.h:36
char * tree
Tree characters to display.
Definition: attach.h:39
int num
Attachment index number.
Definition: attach.h:41
The body of an email.
Definition: body.h:36
char * d_filename
filename to be used for the content-disposition header If NULL, filename is used instead.
Definition: body.h:56
signed short attach_count
Number of attachments.
Definition: body.h:90
bool deleted
Attachment marked for deletion.
Definition: body.h:87
bool noconv
Don't do character set conversion.
Definition: body.h:46
bool unlink
If true, filename should be unlink()ed before free()ing this structure.
Definition: body.h:67
LOFF_T length
length (in bytes) of attachment
Definition: body.h:53
struct Email * email
header information for message/rfc822
Definition: body.h:73
char * description
content-description
Definition: body.h:55
unsigned int disposition
content-disposition, ContentDisposition
Definition: body.h:42
bool attach_qualifies
This attachment should be counted.
Definition: body.h:86
bool tagged
This attachment is tagged.
Definition: body.h:89
char * subtype
content-type subtype
Definition: body.h:60
unsigned int encoding
content-transfer-encoding, ContentEncoding
Definition: body.h:41
unsigned int type
content-type primary type, ContentType
Definition: body.h:40
char * filename
When sending a message, this is the file to which this structure refers.
Definition: body.h:58
String manipulation buffer.
Definition: buffer.h:34
char * data
Pointer to data.
Definition: buffer.h:35
A set of inherited config items.
Definition: subset.h:47
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
Definition: subset.h:52
The envelope/body of an email.
Definition: email.h:37
A config-change event.
Definition: subset.h:71
const char * name
Name of config item that changed.
Definition: subset.h:73
An Event that happened to a Window.
Definition: mutt_window.h:239
struct MuttWindow * win
Window that changed.
Definition: mutt_window.h:240
View of a Mailbox.
Definition: mview.h:39
struct Mailbox * mailbox
Current Mailbox.
Definition: mview.h:50
A mailbox.
Definition: mailbox.h:79
Mapping between user-readable string and a constant.
Definition: mapping.h:32
Definition: lib.h:70
struct MuttWindow * win
Window holding the Menu.
Definition: lib.h:77
void(* make_entry)(struct Menu *menu, char *buf, size_t buflen, int line)
Definition: lib.h:96
void(* mdata_free)(struct Menu *menu, void **ptr)
Definition: lib.h:151
int(* tag)(struct Menu *menu, int sel, int act)
Definition: lib.h:121
struct ConfigSubset * sub
Inherited config items.
Definition: lib.h:78
void * mdata
Private data.
Definition: lib.h:137
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:127
void * wdata
Private data.
Definition: mutt_window.h:145
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
Definition: mutt_window.h:138
Container for Accounts, Notifications.
Definition: neomutt.h:41
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:45
Data passed to a notification function.
Definition: observer.h:34
void * event_data
Data from notify_send()
Definition: observer.h:38
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
Definition: observer.h:36
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:37
void * global_data
Data from notify_observer_add()
Definition: observer.h:39
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:60
@ MENU_ATTACHMENT
Select an attachment.
Definition: type.h:38