NeoMutt  2025-12-11-911-gd8d604
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
dlg_compose.c
Go to the documentation of this file.
1
24
66
67#include "config.h"
68#include <stdbool.h>
69#include <stdint.h>
70#include <stdio.h>
71#include "private.h"
72#include "mutt/lib.h"
73#include "config/lib.h"
74#include "email/lib.h"
75#include "core/lib.h"
76#include "gui/lib.h"
77#include "lib.h"
78#include "attach/lib.h"
79#include "envelope/lib.h"
80#include "hooks/lib.h"
81#include "index/lib.h"
82#include "key/lib.h"
83#include "menu/lib.h"
84#include "ncrypt/lib.h"
85#include "attach_data.h"
86#include "cbar.h"
87#include "functions.h"
88#include "globals.h"
89#include "module_data.h"
90#include "mutt_logging.h"
91#include "shared_data.h"
92
94static const struct Mapping ComposeHelp[] = {
95 // clang-format off
96 { N_("Send"), OP_COMPOSE_SEND_MESSAGE },
97 { N_("Abort"), OP_EXIT },
98 /* L10N: compose menu help line entry */
99 { N_("To"), OP_ENVELOPE_EDIT_TO },
100 /* L10N: compose menu help line entry */
101 { N_("CC"), OP_ENVELOPE_EDIT_CC },
102 /* L10N: compose menu help line entry */
103 { N_("Subj"), OP_ENVELOPE_EDIT_SUBJECT },
104 { N_("Attach file"), OP_ATTACH_ATTACH_FILE },
105 { N_("Descrip"), OP_ATTACH_EDIT_DESCRIPTION },
106 { N_("Help"), OP_HELP },
107 { NULL, 0 },
108 // clang-format on
109};
110
112static const struct Mapping ComposeNewsHelp[] = {
113 // clang-format off
114 { N_("Send"), OP_COMPOSE_SEND_MESSAGE },
115 { N_("Abort"), OP_EXIT },
116 { N_("Newsgroups"), OP_ENVELOPE_EDIT_NEWSGROUPS },
117 { N_("Subj"), OP_ENVELOPE_EDIT_SUBJECT },
118 { N_("Attach file"), OP_ATTACH_ATTACH_FILE },
119 { N_("Descrip"), OP_ATTACH_EDIT_DESCRIPTION },
120 { N_("Help"), OP_HELP },
121 { NULL, 0 },
122 // clang-format on
123};
124
128static int compose_recalc(struct MuttWindow *dlg)
129{
130 if (!dlg)
131 return -1;
132
133 struct ComposeSharedData *shared = dlg->wdata;
134 struct MuttWindow *win_env = window_find_child(dlg, WT_CUSTOM);
135 struct MuttWindow *win_preview = shared->win_preview;
136 struct MuttWindow *win_preview_bar = shared->win_preview_bar;
137
138 const bool c_show_preview = cs_subset_bool(shared->sub, "compose_show_preview");
139 const short c_preview_min_rows = cs_subset_number(shared->sub, "compose_preview_min_rows");
140
141 // How many rows are available for the preview window?
142 // Total rows - (envelope window + attachments + number of status bars)
143 int rows_available = dlg->state.rows -
144 (win_env->state.rows + shared->adata->actx->idxlen + 3);
145
146 if (c_show_preview && rows_available >= c_preview_min_rows)
147 {
148 window_set_visible(win_preview, true);
149 window_set_visible(win_preview_bar, true);
151 }
152 else
153 {
154 window_set_visible(win_preview, false);
155 window_set_visible(win_preview_bar, false);
157 }
158
159 return 0;
160}
161
166{
167 if (nc->event_type != NT_CONFIG)
168 return 0;
169 if (!nc->global_data || !nc->event_data)
170 return -1;
171
172 struct EventConfig *ev_c = nc->event_data;
173 struct MuttWindow *dlg = nc->global_data;
174
175 if (mutt_str_equal(ev_c->name, "status_on_top"))
176 {
178 mutt_debug(LL_DEBUG5, "config done, request WA_REFLOW\n");
179 }
180 else if (mutt_str_equal(ev_c->name, "compose_show_preview") ||
181 mutt_str_equal(ev_c->name, "compose_preview_min_rows"))
182 {
183 dlg->actions |= WA_RECALC;
184 mutt_debug(LL_DEBUG5, "config done, request WA_RECALC\n");
185 }
186 else if (mutt_str_equal(ev_c->name, "compose_preview_above_attachments"))
187 {
188 struct ComposeSharedData *shared = dlg->wdata;
189
190 mutt_window_swap(dlg, shared->win_preview_bar, shared->win_attach_bar);
191 mutt_window_swap(dlg, shared->win_preview, shared->adata->menu->win);
192
193 dlg->actions |= WA_REPAINT;
194 mutt_debug(LL_DEBUG5, "config done, request WA_REPAINT\n");
195 }
196
197 return 0;
198}
199
204{
205 if (nc->event_type != NT_ENVELOPE)
206 return 0;
207 if (!nc->global_data || !nc->event_data)
208 return -1;
209
210 struct ComposeSharedData *shared = nc->global_data;
211
213 shared->fcc_set = true;
214
216 return 0;
217}
218
223{
224 if (nc->event_type != NT_WINDOW)
225 return 0;
226 if (!nc->global_data || !nc->event_data)
227 return -1;
228
229 struct MuttWindow *dlg = nc->global_data;
230 struct EventWindow *ev_w = nc->event_data;
231 if (ev_w->win != dlg)
232 return 0;
233
234 struct ComposeSharedData *shared = dlg->wdata;
235
237 {
238 dlg->actions |= WA_RECALC;
239 mutt_debug(LL_DEBUG5, "window state done, request WA_RECALC\n");
240 }
241 else if (nc->event_subtype == NT_WINDOW_DELETE)
242 {
246 mutt_debug(LL_DEBUG5, "window delete done\n");
247 }
248
249 return 0;
250}
251
262static void gen_attach_list(struct AttachCtx *actx, struct Body *b, int parent_type, int level)
263{
264 const int max_depth = 20;
265
266 for (; b; b = b->next)
267 {
268 struct AttachPtr *ap = mutt_aptr_new();
269 mutt_actx_add_attach(actx, ap);
270 ap->body = b;
271 b->aptr = ap;
273 ap->level = level;
274 if ((level < max_depth) && (b->type == TYPE_MULTIPART) && b->parts &&
276 {
277 gen_attach_list(actx, b->parts, b->type, level + 1);
278 }
279 }
280}
281
288void update_menu(struct AttachCtx *actx, struct Menu *menu, bool init)
289{
290 if (init)
291 {
292 gen_attach_list(actx, actx->email->body, -1, 0);
293 mutt_attach_init(actx);
294
295 struct ComposeAttachData *adata = menu->mdata;
296 adata->actx = actx;
297 }
298
300
301 menu->max = actx->vcount;
302 if (menu->max)
303 {
304 int index = menu_get_index(menu);
305 if (index >= menu->max)
307 }
308 else
309 {
311 }
312
314}
315
323static struct MuttWindow *compose_dlg_init(struct ConfigSubset *sub,
324 struct Email *e, struct Buffer *fcc)
325{
327 ASSERT(mod_data);
328
330 shared->sub = sub;
331 shared->email = e;
332
336 dlg->wdata = shared;
338 dlg->recalc = compose_recalc;
339
340 struct MuttWindow *win_env = env_window_new(e, fcc, sub);
341 struct MuttWindow *win_attach = attach_new(dlg, shared);
342 struct MuttWindow *win_cbar = cbar_new(shared);
343 struct MuttWindow *win_abar = sbar_new();
344 sbar_set_title(win_abar, _("-- Attachments"));
345 struct MuttWindow *win_preview_bar = sbar_new();
346 sbar_set_title(win_preview_bar, _("-- Preview"));
347 struct MuttWindow *win_preview = preview_window_new(e, win_preview_bar);
348
349 const bool c_preview_above_attachments = cs_subset_bool(shared->sub, "compose_preview_above_attachments");
350 const bool c_status_on_top = cs_subset_bool(sub, "status_on_top");
351 if (c_status_on_top)
352 {
353 mutt_window_add_child(dlg, win_cbar);
354 mutt_window_add_child(dlg, win_env);
355 if (c_preview_above_attachments)
356 {
357 mutt_window_add_child(dlg, win_preview_bar);
358 mutt_window_add_child(dlg, win_preview);
359 mutt_window_add_child(dlg, win_abar);
360 mutt_window_add_child(dlg, win_attach);
361 }
362 else
363 {
364 mutt_window_add_child(dlg, win_abar);
365 mutt_window_add_child(dlg, win_attach);
366 mutt_window_add_child(dlg, win_preview_bar);
367 mutt_window_add_child(dlg, win_preview);
368 }
369 }
370 else
371 {
372 mutt_window_add_child(dlg, win_env);
373 if (c_preview_above_attachments)
374 {
375 mutt_window_add_child(dlg, win_preview_bar);
376 mutt_window_add_child(dlg, win_preview);
377 mutt_window_add_child(dlg, win_abar);
378 mutt_window_add_child(dlg, win_attach);
379 }
380 else
381 {
382 mutt_window_add_child(dlg, win_abar);
383 mutt_window_add_child(dlg, win_attach);
384 mutt_window_add_child(dlg, win_preview_bar);
385 mutt_window_add_child(dlg, win_preview);
386 }
387 mutt_window_add_child(dlg, win_cbar);
388 }
389
390 shared->win_preview_bar = win_preview_bar;
391 shared->win_preview = win_preview;
392 shared->win_attach_bar = win_abar;
393
394 dlg->help_data = ComposeHelp;
395 dlg->help_md = mod_data->md_compose;
396
397 return dlg;
398}
399
412int dlg_compose(struct Email *e, struct Buffer *fcc, uint8_t flags, struct ConfigSubset *sub)
413{
415 ASSERT(mod_data);
416
417 struct MuttWindow *dlg = compose_dlg_init(sub, e, fcc);
418 struct ComposeSharedData *shared = dlg->wdata;
419 shared->mailbox = get_current_mailbox();
420 shared->email = e;
421 shared->sub = sub;
422 shared->fcc = fcc;
423 shared->fcc_set = false;
424 shared->flags = flags;
425 shared->rc = -1;
426
430
431 if (OptNewsSend)
433 else
434 dlg->help_data = ComposeHelp;
435 dlg->help_md = mod_data->md_compose;
436
437 struct Menu *menu = shared->adata->menu;
438 update_menu(shared->adata->actx, menu, true);
440
441 struct MuttWindow *win_env = window_find_child(dlg, WT_CUSTOM);
442
443 dialog_push(dlg);
444 struct MuttWindow *old_focus = window_set_focus(menu->win);
445 // ---------------------------------------------------------------------------
446 // Event Loop
447 int rc = 0;
448 int op = OP_NULL;
449 struct KeyEvent event = { 0, OP_NULL };
450 do
451 {
452 OptNews = false; /* for any case */
453 menu_tagging_dispatcher(menu->win, &event);
454 window_redraw(NULL);
455
456 event = km_dokey(mod_data->md_compose, GETCH_NONE);
457 op = event.op;
458 mutt_debug(LL_DEBUG1, "Got op %s (%d)\n", opcodes_get_name(op), op);
459 if (op < 0)
460 continue;
461 if (op == OP_NULL)
462 {
463 km_error_key(mod_data->md_compose);
464 continue;
465 }
467
468 rc = compose_function_dispatcher(dlg, &event);
469 if (rc == FR_UNKNOWN)
470 rc = env_function_dispatcher(win_env, &event);
471 if (rc == FR_UNKNOWN)
472 rc = preview_function_dispatcher(shared->win_preview, &event);
473 if (rc == FR_UNKNOWN)
474 rc = menu_function_dispatcher(menu->win, &event);
475 if (rc == FR_UNKNOWN)
476 rc = global_function_dispatcher(menu->win, &event);
477 } while (rc != FR_DONE);
478 // ---------------------------------------------------------------------------
479
480#ifdef USE_AUTOCRYPT
481 /* This is a fail-safe to make sure the bit isn't somehow turned
482 * on. The user could have disabled the option after setting SEC_AUTOCRYPT,
483 * or perhaps resuming or replying to an autocrypt message. */
484 const bool c_autocrypt = cs_subset_bool(sub, "autocrypt");
485 if (!c_autocrypt)
487#endif
488
489 if (shared->adata->actx->idxlen)
490 e->body = shared->adata->actx->idx[0]->body;
491 else
492 e->body = NULL;
493
494 rc = shared->rc;
495
496 window_set_focus(old_focus);
497 dialog_pop();
498 mutt_window_free(&dlg);
499
500 return rc;
501}
void mutt_actx_add_attach(struct AttachCtx *actx, struct AttachPtr *attach)
Add an Attachment to an Attachment Context.
Definition attach.c:65
struct AttachPtr * mutt_aptr_new(void)
Create a new Attachment Pointer.
Definition attach.c:40
GUI display the mailboxes in a side panel.
Compose Attach Data.
struct MuttWindow * cbar_new(struct ComposeSharedData *shared)
Create the Compose Bar (status)
Definition cbar.c:226
Compose Bar.
@ CMD_SEND2_HOOK
:send2-hook
Definition command.h:109
void attachment_size_fixed(struct MuttWindow *win)
Make the Attachment Window fixed-size.
Definition attach.c:302
struct MuttWindow * attach_new(struct MuttWindow *parent, struct ComposeSharedData *shared)
Create the Attachments Menu.
Definition attach.c:269
void attachment_size_max(struct MuttWindow *win)
Make the Attachment Window maximised.
Definition attach.c:315
Compose functions.
GUI editor for an email's headers.
Compose private Module data.
Compose Private Data.
struct ComposeSharedData * compose_shared_data_new(void)
Free the compose shared data.
Definition shared_data.c:48
Compose Shared Data.
short cs_subset_number(const struct ConfigSubset *sub, const char *name)
Get a number config item by name.
Definition helpers.c:143
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.
SecurityFlags mutt_is_multipart_encrypted(struct Body *b)
Does the message have encrypted parts?
Definition crypt.c:443
void dialog_push(struct MuttWindow *dlg)
Display a Window to the user.
Definition dialog.c:109
void dialog_pop(void)
Hide a Window from the user.
Definition dialog.c:148
@ FR_DONE
Exit the Dialog.
Definition dispatcher.h:36
@ FR_UNKNOWN
Unknown function.
Definition dispatcher.h:34
static void gen_attach_list(struct AttachCtx *actx, struct Body *b, int parent_type, int level)
Generate the attachment list for the compose screen.
void update_menu(struct AttachCtx *actx, struct Menu *menu, bool init)
Redraw the compose window.
static const struct Mapping ComposeHelp[]
Help Bar for the Compose dialog.
Definition dlg_compose.c:94
static const struct Mapping ComposeNewsHelp[]
Help Bar for the News Compose dialog.
static struct MuttWindow * compose_dlg_init(struct ConfigSubset *sub, struct Email *e, struct Buffer *fcc)
Allocate the Windows for Compose.
Structs that make up an email.
@ NT_EMAIL_CHANGE
Email has changed.
Definition email.h:186
Envelope-editing Window.
struct MuttWindow * env_window_new(struct Email *e, struct Buffer *fcc, struct ConfigSubset *sub)
Create the Envelope Window.
Definition window.c:955
@ NT_ENVELOPE_FCC
"Fcc:" header has changed
Definition envelope.h:139
struct KeyEvent km_dokey(const struct MenuDefinition *md, GetChFlags flags)
Determine what a keypress should do.
Definition get.c:518
void km_error_key(const struct MenuDefinition *md)
Handle an unbound key sequence.
Definition get.c:328
@ GETCH_NONE
No flags are set.
Definition get.h:38
bool OptNews
(pseudo) used to change reader mode
Definition globals.c:53
bool OptNewsSend
(pseudo) used to change behavior when posting
Definition globals.c:54
Global variables.
int compose_function_dispatcher(struct MuttWindow *win, const struct KeyEvent *event)
Perform a Compose function - Implements function_dispatcher_t -.
Definition functions.c:2713
int preview_function_dispatcher(struct MuttWindow *win, const struct KeyEvent *event)
Perform a preview function - Implements function_dispatcher_t -.
Definition preview.c:439
int menu_tagging_dispatcher(struct MuttWindow *win, const struct KeyEvent *event)
Perform tagging operations on the Menu - Implements function_dispatcher_t -.
Definition tagging.c:239
int env_function_dispatcher(struct MuttWindow *win, const struct KeyEvent *event)
Perform an Envelope function - Implements function_dispatcher_t -.
Definition functions.c:536
int global_function_dispatcher(struct MuttWindow *win, const struct KeyEvent *event)
Perform a Global function - Implements function_dispatcher_t -.
Definition global.c:182
int menu_function_dispatcher(struct MuttWindow *win, const struct KeyEvent *event)
Perform a Menu function - Implements function_dispatcher_t -.
Definition functions.c:366
int dlg_compose(struct Email *e, struct Buffer *fcc, uint8_t flags, struct ConfigSubset *sub)
Allow the user to edit the message envelope -.
#define mutt_debug(LEVEL,...)
Definition logging2.h:91
static int compose_email_observer(struct NotifyCallback *nc)
Notification that an Email has changed - Implements observer_t -.
static int compose_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
static int compose_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
static int compose_recalc(struct MuttWindow *dlg)
Recalculate the Window data - Implements MuttWindow::recalc() -.
void compose_shared_data_free(struct MuttWindow *win, void **ptr)
Free the compose shared data - Implements MuttWindow::wdata_free() -.
Definition shared_data.c:36
Convenience wrapper for the gui headers.
void exec_message_hook(struct Mailbox *m, struct Email *e, enum CommandId id)
Perform a message hook.
Definition exec.c:137
Hook Commands.
GUI manage the main index (list of emails)
struct Mailbox * get_current_mailbox(void)
Get the current Mailbox.
Definition index.c:726
Manage keymappings.
@ LL_DEBUG5
Log at debug level 5.
Definition logging2.h:49
@ LL_DEBUG1
Log at debug level 1.
Definition logging2.h:45
GUI present the user with a selectable list.
void menu_queue_redraw(struct Menu *menu, MenuRedrawFlags redraw)
Queue a request for a redraw.
Definition menu.c:179
int menu_get_index(struct Menu *menu)
Get the current selection in the Menu.
Definition menu.c:155
@ MENU_REDRAW_INDEX
Redraw the index.
Definition lib.h:61
MenuRedrawFlags menu_set_index(struct Menu *menu, int index)
Set the current selection in the Menu.
Definition menu.c:169
@ TYPE_MULTIPART
Type: 'multipart/*'.
Definition mime.h:37
@ MODULE_ID_COMPOSE
ModuleCompose, Compose an Email
Definition module_api.h:57
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 notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition notify.c:173
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition string.c:665
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.
void mutt_window_add_child(struct MuttWindow *parent, struct MuttWindow *child)
Add a child to Window.
struct MuttWindow * mutt_window_new(enum WindowType type, enum MuttWindowOrientation orient, enum MuttWindowSize size, int cols, int rows)
Create a new Window.
bool mutt_window_swap(struct MuttWindow *parent, struct MuttWindow *win1, struct MuttWindow *win2)
Swap the position of two windows.
struct MuttWindow * window_set_focus(struct MuttWindow *win)
Set the Window focus.
void window_set_visible(struct MuttWindow *win, bool visible)
Set a Window visible or hidden.
struct MuttWindow * window_find_child(struct MuttWindow *win, enum WindowType type)
Recursively find a child Window of a given type.
bool window_status_on_top(struct MuttWindow *panel, const struct ConfigSubset *sub)
Organise windows according to config variable.
@ WT_CUSTOM
Window with a custom drawing function.
Definition mutt_window.h:95
@ WT_DLG_COMPOSE
Compose Dialog, dlg_compose()
Definition mutt_window.h:82
@ MUTT_WIN_ORIENT_VERTICAL
Window uses all available vertical space.
Definition mutt_window.h:38
@ WA_REPAINT
Redraw the contents of the Window.
@ WA_RECALC
Recalculate the contents of the Window.
@ NT_WINDOW_STATE
Window state has changed, e.g. WN_VISIBLE.
@ NT_WINDOW_DELETE
Window is about to be deleted.
#define MUTT_WIN_SIZE_UNLIMITED
Use as much space as possible.
Definition mutt_window.h:52
@ MUTT_WIN_SIZE_MAXIMISE
Window wants as much space as possible.
Definition mutt_window.h:48
API for encryption/signing of emails.
@ SEC_AUTOCRYPT
(Autocrypt) Message will be, or was Autocrypt encrypt+signed
Definition lib.h:101
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition lib.h:106
#define WithCrypto
Definition lib.h:132
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:663
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
Definition notify_type.h:58
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
Definition notify_type.h:43
@ NT_EMAIL
Email has changed, NotifyEmail, EventEmail.
Definition notify_type.h:44
@ NT_ENVELOPE
Envelope has changed, NotifyEnvelope.
Definition notify_type.h:45
const char * opcodes_get_name(int op)
Get the name of an opcode.
Definition opcodes.c:48
struct MuttWindow * preview_window_new(struct Email *e, struct MuttWindow *bar)
Create the preview window.
Definition preview.c:359
void mutt_attach_init(struct AttachCtx *actx)
Create a new Attachment context.
void mutt_update_tree(struct AttachCtx *actx)
Refresh the list of attachments.
Definition recvattach.c:116
struct MuttWindow * sbar_new(void)
Add the Simple Bar (status)
Definition sbar.c:203
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
Definition sbar.c:227
#define ASSERT(COND)
Definition signal2.h:59
A set of attachments.
Definition attach.h:65
short vcount
The number of virtual attachments.
Definition attach.h:74
struct Email * email
Used by recvattach for updating.
Definition attach.h:66
struct AttachPtr ** idx
Array of attachments.
Definition attach.h:69
short idxlen
Number of attachmentes.
Definition attach.h:70
An email to which things will be attached.
Definition attach.h:36
struct Body * body
Attachment.
Definition attach.h:37
int level
Nesting depth of attachment.
Definition attach.h:41
int parent_type
Type of parent attachment, e.g. TYPE_MULTIPART.
Definition attach.h:39
The body of an email.
Definition body.h:36
struct Body * parts
parts of a multipart or message/rfc822
Definition body.h:73
struct AttachPtr * aptr
Menu information, used in recvattach.c.
Definition body.h:75
struct Body * next
next attachment in the list
Definition body.h:72
unsigned int type
content-type primary type, ContentType
Definition body.h:40
String manipulation buffer.
Definition buffer.h:36
Data to fill the Compose Attach Window.
Definition attach_data.h:33
struct Menu * menu
Menu displaying the attachments.
Definition attach_data.h:35
struct AttachCtx * actx
Set of attachments.
Definition attach_data.h:34
Compose private Module data.
Definition module_data.h:30
struct MenuDefinition * md_compose
Compose Menu Definition.
Definition module_data.h:32
Shared Compose Data.
Definition shared_data.h:35
struct ConfigSubset * sub
Config set to use.
Definition shared_data.h:36
struct Mailbox * mailbox
Current Mailbox.
Definition shared_data.h:37
int flags
Flags, e.g. MUTT_COMPOSE_NOFREEHEADER.
Definition shared_data.h:45
struct MuttWindow * win_preview
Message preview window.
Definition shared_data.h:41
struct MuttWindow * win_preview_bar
Status bar divider above preview.
Definition shared_data.h:42
bool fcc_set
User has edited the Fcc: field.
Definition shared_data.h:46
int rc
Return code to leave compose.
Definition shared_data.h:47
struct ComposeAttachData * adata
Attachments.
Definition shared_data.h:39
struct Email * email
Email being composed.
Definition shared_data.h:38
struct MuttWindow * win_attach_bar
Status bar divider above attachments.
Definition shared_data.h:40
struct Buffer * fcc
Buffer to save FCC.
Definition shared_data.h:44
A set of inherited config items.
Definition subset.h:46
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
Definition subset.h:51
The envelope/body of an email.
Definition email.h:39
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
Definition email.h:43
struct Body * body
List of MIME parts.
Definition email.h:69
struct Notify * notify
Notifications: NotifyEmail, EventEmail.
Definition email.h:73
A config-change event.
Definition subset.h:70
const char * name
Name of config item that changed.
Definition subset.h:72
An Event that happened to a Window.
struct MuttWindow * win
Window that changed.
An event such as a keypress.
Definition get.h:75
int op
Function opcode, e.g. OP_HELP.
Definition get.h:77
Mapping between user-readable string and a constant.
Definition mapping.h:33
Definition lib.h:86
struct MuttWindow * win
Window holding the Menu.
Definition lib.h:94
void * mdata
Private data.
Definition lib.h:155
int max
Number of entries in the menu.
Definition lib.h:88
const struct Mapping * help_data
Data for the Help Bar.
const struct MenuDefinition * help_md
Menu Definition for key bindings.
struct WindowState state
Current state of the Window.
void * wdata
Private data.
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
int(* recalc)(struct MuttWindow *win)
void(* wdata_free)(struct MuttWindow *win, void **ptr)
WindowActionFlags actions
Actions to be performed, e.g. WA_RECALC.
Container for Accounts, Notifications.
Definition neomutt.h:41
struct ConfigSubset * sub
Inherited config items.
Definition neomutt.h:49
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 rows
Number of rows, can be MUTT_WIN_SIZE_UNLIMITED.
Definition mutt_window.h:61