NeoMutt  2025-09-05-70-gcfdde0
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
observer.c
Go to the documentation of this file.
1
24
30
31#include "config.h"
32#include <stdbool.h>
33#include <stddef.h>
34#include "private.h"
35#include "mutt/lib.h"
36#include "config/lib.h"
37#include "core/lib.h"
38#include "gui/lib.h"
39#include "color/lib.h"
40#include "index/lib.h"
41
42void sb_win_remove_observers(struct MuttWindow *win);
43
52{
54 bool changed = false;
55 const char *const c_sidebar_divider_char = cs_subset_string(NeoMutt->sub, "sidebar_divider_char");
56
57 // Calculate the width of the delimiter in screen cells
58 int width = mutt_strwidth(c_sidebar_divider_char);
59 if (width < 1)
60 {
62 goto done;
63 }
64
65 const bool c_ascii_chars = cs_subset_bool(NeoMutt->sub, "ascii_chars");
66 if (c_ascii_chars || !CharsetIsUtf8)
67 {
68 const size_t len = mutt_str_len(c_sidebar_divider_char);
69 for (size_t i = 0; i < len; i++)
70 {
71 if (c_sidebar_divider_char[i] & ~0x7F) // high-bit is set
72 {
74 width = 1;
75 break;
76 }
77 }
78 }
79
80done:
81 changed = (width != wdata->divider_width);
82
83 wdata->divider_type = type;
84 wdata->divider_width = width;
85
86 return changed;
87}
88
94static struct MuttWindow *sb_win_init(struct MuttWindow *dlg)
95{
97
98 struct MuttWindow *index_panel = TAILQ_FIRST(&dlg->children);
99 mutt_window_remove_child(dlg, index_panel);
100
101 struct MuttWindow *pager_panel = TAILQ_FIRST(&dlg->children);
102 mutt_window_remove_child(dlg, pager_panel);
103
107 dlg->focus = cont_right;
108
109 mutt_window_add_child(cont_right, index_panel);
110 mutt_window_add_child(cont_right, pager_panel);
111 cont_right->focus = index_panel;
112
113 const short c_sidebar_width = cs_subset_number(NeoMutt->sub, "sidebar_width");
115 MUTT_WIN_SIZE_FIXED, c_sidebar_width,
117 const bool c_sidebar_visible = cs_subset_bool(NeoMutt->sub, "sidebar_visible");
118 win_sidebar->state.visible = c_sidebar_visible && (c_sidebar_width > 0);
119
120 struct IndexSharedData *shared = dlg->wdata;
121 win_sidebar->wdata = sb_wdata_new(win_sidebar, shared);
122 win_sidebar->wdata_free = sb_wdata_free;
123
124 calc_divider(win_sidebar->wdata);
125
126 win_sidebar->recalc = sb_recalc;
127 win_sidebar->repaint = sb_repaint;
128
129 const bool c_sidebar_on_right = cs_subset_bool(NeoMutt->sub, "sidebar_on_right");
130 if (c_sidebar_on_right)
131 {
132 mutt_window_add_child(dlg, cont_right);
133 mutt_window_add_child(dlg, win_sidebar);
134 }
135 else
136 {
137 mutt_window_add_child(dlg, win_sidebar);
138 mutt_window_add_child(dlg, cont_right);
139 }
140
141 sb_win_add_observers(win_sidebar);
142
143 return win_sidebar;
144}
145
150static void sb_init_data(struct MuttWindow *win)
151{
153 if (!wdata)
154 return;
155
156 if (!ARRAY_EMPTY(&wdata->entries))
157 return;
158
159 struct MailboxArray ma = neomutt_mailboxes_get(NeoMutt, MUTT_MAILBOX_ANY);
160 struct Mailbox **mp = NULL;
161 ARRAY_FOREACH(mp, &ma)
162 {
163 struct Mailbox *m = *mp;
164
165 if (m->visible)
166 sb_add_mailbox(wdata, m);
167 }
168 ARRAY_FREE(&ma); // Clean up the ARRAY, but not the Mailboxes
169}
170
175{
176 if (nc->event_type != NT_ACCOUNT)
177 return 0;
178 if (!nc->global_data || !nc->event_data)
179 return -1;
181 return 0;
182
183 struct MuttWindow *win = nc->global_data;
185 struct EventAccount *ev_a = nc->event_data;
186
187 struct Mailbox **mp = NULL;
188 ARRAY_FOREACH(mp, &ev_a->account->mailboxes)
189 {
190 sb_add_mailbox(wdata, *mp);
191 }
192
193 win->actions |= WA_RECALC;
194 mutt_debug(LL_DEBUG5, "account done, request WA_RECALC\n");
195 return 0;
196}
197
201static int sb_color_observer(struct NotifyCallback *nc)
202{
203 if (nc->event_type != NT_COLOR)
204 return 0;
205 if (!nc->global_data || !nc->event_data)
206 return -1;
207
208 struct EventColor *ev_c = nc->event_data;
209 struct MuttWindow *win = nc->global_data;
210
211 enum ColorId cid = ev_c->cid;
212
213 if (cid == MT_COLOR_MAX) // Sent on `uncolor *`
214 {
215 // Set a default style
217 ac->attrs = A_UNDERLINE;
218 }
219
220 switch (cid)
221 {
223 case MT_COLOR_NORMAL:
233 case MT_COLOR_MAX: // Sent on `uncolor *`
234 win->actions |= WA_REPAINT;
235 mutt_debug(LL_DEBUG5, "color done, request WA_REPAINT\n");
236 break;
237
238 default:
239 break;
240 }
241 return 0;
242}
243
248{
249 if (nc->event_type != NT_COMMAND)
250 return 0;
251 if (!nc->global_data || !nc->event_data)
252 return -1;
253
254 struct Command *cmd = nc->event_data;
255
256 if ((cmd->parse != sb_parse_sidebar_pin) && (cmd->parse != sb_parse_sidebar_unpin))
257 return 0;
258
259 struct MuttWindow *win = nc->global_data;
260 win->actions |= WA_RECALC;
261 mutt_debug(LL_DEBUG5, "command done, request WA_RECALC\n");
262 return 0;
263}
264
268static int sb_config_observer(struct NotifyCallback *nc)
269{
270 if (nc->event_type != NT_CONFIG)
271 return 0;
272 if (!nc->global_data || !nc->event_data)
273 return -1;
274
275 struct EventConfig *ev_c = nc->event_data;
276
277 if (!mutt_strn_equal(ev_c->name, "sidebar_", 8) &&
278 !mutt_str_equal(ev_c->name, "ascii_chars") &&
279 !mutt_str_equal(ev_c->name, "folder") && !mutt_str_equal(ev_c->name, "spool_file"))
280 {
281 return 0;
282 }
283
284 if (mutt_str_equal(ev_c->name, "sidebar_next_new_wrap"))
285 return 0; // Affects the behaviour, but not the display
286
287 mutt_debug(LL_DEBUG5, "config: %s\n", ev_c->name);
288
289 struct MuttWindow *win = nc->global_data;
290
291 if (mutt_str_equal(ev_c->name, "sidebar_visible"))
292 {
293 const bool c_sidebar_visible = cs_subset_bool(NeoMutt->sub, "sidebar_visible");
294 window_set_visible(win, c_sidebar_visible);
295 window_reflow(win->parent);
296 mutt_debug(LL_DEBUG5, "config done, request WA_REFLOW\n");
297 return 0;
298 }
299
300 if (mutt_str_equal(ev_c->name, "sidebar_width"))
301 {
302 const short c_sidebar_width = cs_subset_number(NeoMutt->sub, "sidebar_width");
303 win->req_cols = c_sidebar_width;
304 window_reflow(win->parent);
305 mutt_debug(LL_DEBUG5, "config done, request WA_REFLOW\n");
306 return 0;
307 }
308
309 if (mutt_str_equal(ev_c->name, "spool_file"))
310 {
311 win->actions |= WA_REPAINT;
312 mutt_debug(LL_DEBUG5, "config done, request WA_REPAINT\n");
313 return 0;
314 }
315
316 if (mutt_str_equal(ev_c->name, "sidebar_on_right"))
317 {
318 struct MuttWindow *parent = win->parent;
319 struct MuttWindow *first = TAILQ_FIRST(&parent->children);
320 const bool c_sidebar_on_right = cs_subset_bool(NeoMutt->sub, "sidebar_on_right");
321
322 if ((c_sidebar_on_right && (first == win)) || (!c_sidebar_on_right && (first != win)))
323 {
324 // Swap the Sidebar and the Container of the Index/Pager
325 TAILQ_REMOVE(&parent->children, first, entries);
326 TAILQ_INSERT_TAIL(&parent->children, first, entries);
327 }
328
329 window_reflow(win->parent);
330 mutt_debug(LL_DEBUG5, "config done, request WA_REFLOW\n");
331 return 0;
332 }
333
334 if (mutt_str_equal(ev_c->name, "ascii_chars") ||
335 mutt_str_equal(ev_c->name, "sidebar_divider_char"))
336 {
340 mutt_debug(LL_DEBUG5, "config done, request WA_RECALC\n");
341 return 0;
342 }
343
344 // All the remaining config changes...
346 mutt_debug(LL_DEBUG5, "config done, request WA_RECALC\n");
347 return 0;
348}
349
353static int sb_index_observer(struct NotifyCallback *nc)
354{
355 if (nc->event_type != NT_INDEX)
356 return 0;
357 if (!nc->global_data || !nc->event_data)
358 return 0;
359 if (!(nc->event_subtype & NT_INDEX_MAILBOX))
360 return 0;
361
362 struct MuttWindow *win_sidebar = nc->global_data;
363 struct IndexSharedData *shared = nc->event_data;
364
365 struct SidebarWindowData *wdata = sb_wdata_get(win_sidebar);
367
368 win_sidebar->actions |= WA_RECALC;
369 mutt_debug(LL_DEBUG5, "index done, request WA_RECALC\n");
370
371 return 0;
372}
373
378{
379 if (nc->event_type != NT_MAILBOX)
380 return 0;
381 if (!nc->global_data || !nc->event_data)
382 return -1;
383
384 struct MuttWindow *win = nc->global_data;
385
387 struct EventMailbox *ev_m = nc->event_data;
388
389 if (nc->event_subtype == NT_MAILBOX_ADD)
390 {
391 sb_add_mailbox(wdata, ev_m->mailbox);
392 }
393 else if (nc->event_subtype == NT_MAILBOX_DELETE)
394 {
395 sb_remove_mailbox(wdata, ev_m->mailbox);
396 }
397
398 win->actions |= WA_RECALC;
399 mutt_debug(LL_DEBUG5, "mailbox done, request WA_RECALC\n");
400 return 0;
401}
402
406static int sb_window_observer(struct NotifyCallback *nc)
407{
408 if (nc->event_type != NT_WINDOW)
409 return 0;
410 if (!nc->global_data || !nc->event_data)
411 return -1;
412
413 struct MuttWindow *win = nc->global_data;
414 struct EventWindow *ev_w = nc->event_data;
415 if (ev_w->win != win)
416 return 0;
417
419 {
421 mutt_debug(LL_DEBUG5, "window state done, request WA_RECALC\n");
422 }
423 else if (nc->event_subtype == NT_WINDOW_DELETE)
424 {
425 mutt_debug(LL_DEBUG5, "window delete done\n");
427 }
428 return 0;
429}
430
450
470
475{
476 if (nc->event_type != NT_WINDOW)
477 return 0;
478 if (!nc->event_data)
479 return -1;
481 return 0;
482
483 struct EventWindow *ev_w = nc->event_data;
484 if (ev_w->win->type != WT_DLG_INDEX)
485 return 0;
486
487 if (ev_w->flags & WN_VISIBLE)
488 {
489 mutt_debug(LL_DEBUG5, "insertion: visible\n");
490 struct MuttWindow *win_sidebar = sb_win_init(ev_w->win);
491 sb_init_data(win_sidebar);
492 }
493 else if (ev_w->flags & WN_HIDDEN)
494 {
495 mutt_debug(LL_DEBUG5, "insertion: hidden\n");
497 }
498
499 return 0;
500}
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
Definition array.h:214
#define ARRAY_EMPTY(head)
Check if an array is empty.
Definition array.h:74
#define ARRAY_FREE(head)
Release all memory.
Definition array.h:204
Color and attribute parsing.
void mutt_color_observer_remove(observer_t callback, void *global_data)
Remove an observer.
Definition notify.c:71
void mutt_color_observer_add(observer_t callback, void *global_data)
Add an observer.
Definition notify.c:61
struct AttrColor * simple_color_get(enum ColorId cid)
Get the colour of an object by its ID.
Definition simple.c:95
ColorId
List of all coloured objects.
Definition color.h:36
@ MT_COLOR_SIDEBAR_DIVIDER
Line dividing sidebar from the index/pager.
Definition color.h:70
@ MT_COLOR_MAX
Definition color.h:98
@ MT_COLOR_SIDEBAR_NEW
Mailbox with new mail.
Definition color.h:74
@ MT_COLOR_SIDEBAR_UNREAD
Mailbox with unread mail.
Definition color.h:77
@ MT_COLOR_INDICATOR
Selected item in list.
Definition color.h:50
@ MT_COLOR_SIDEBAR_SPOOLFILE
$spool_file (Spool mailbox)
Definition color.h:76
@ MT_COLOR_SIDEBAR_ORDINARY
Mailbox with no new or flagged messages.
Definition color.h:75
@ MT_COLOR_SIDEBAR_BACKGROUND
Background colour for the Sidebar.
Definition color.h:69
@ MT_COLOR_NORMAL
Plain text.
Definition color.h:54
@ MT_COLOR_SIDEBAR_INDICATOR
Current open mailbox.
Definition color.h:73
@ MT_COLOR_SIDEBAR_HIGHLIGHT
Select cursor.
Definition color.h:72
@ MT_COLOR_SIDEBAR_FLAGGED
Mailbox with flagged messages.
Definition color.h:71
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Definition helpers.c:291
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.
@ NT_ACCOUNT_DELETE
Account is about to be deleted.
Definition account.h:68
Convenience wrapper for the core headers.
@ NT_MAILBOX_DELETE
Mailbox is about to be deleted.
Definition mailbox.h:174
@ NT_MAILBOX_ADD
Mailbox has been added.
Definition mailbox.h:173
@ MUTT_MAILBOX_ANY
Match any Mailbox type.
Definition mailbox.h:42
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
Definition curs_lib.c:445
enum CommandResult sb_parse_sidebar_pin(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'sidebar_pin' command - Implements Command::parse() -.
Definition commands.c:41
enum CommandResult sb_parse_sidebar_unpin(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'sidebar_unpin' command - Implements Command::parse() -.
Definition commands.c:60
#define mutt_debug(LEVEL,...)
Definition logging2.h:90
static int sb_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
Definition observer.c:406
static int sb_mailbox_observer(struct NotifyCallback *nc)
Notification that a Mailbox has changed - Implements observer_t -.
Definition observer.c:377
static int sb_account_observer(struct NotifyCallback *nc)
Notification that an Account has changed - Implements observer_t -.
Definition observer.c:174
int sb_insertion_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
Definition observer.c:474
static int sb_command_observer(struct NotifyCallback *nc)
Notification that a Command has occurred - Implements observer_t -.
Definition observer.c:247
static int sb_color_observer(struct NotifyCallback *nc)
Notification that a Color has changed - Implements observer_t -.
Definition observer.c:201
static int sb_index_observer(struct NotifyCallback *nc)
Notification that the Index has changed - Implements observer_t -.
Definition observer.c:353
static int sb_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
Definition observer.c:268
int sb_recalc(struct MuttWindow *win)
Recalculate the Sidebar display - Implements MuttWindow::recalc() -.
Definition window.c:505
int sb_repaint(struct MuttWindow *win)
Repaint the Sidebar display - Implements MuttWindow::repaint() -.
Definition window.c:695
void sb_wdata_free(struct MuttWindow *win, void **ptr)
Free Sidebar Window data - Implements MuttWindow::wdata_free() -.
Definition wdata.c:56
Convenience wrapper for the gui headers.
GUI manage the main index (list of emails)
#define NT_INDEX_MAILBOX
Mailbox has changed.
Definition lib.h:70
@ LL_DEBUG5
Log at debug level 5.
Definition logging2.h:48
bool CharsetIsUtf8
Is the user's current character set utf-8?
Definition charset.c:66
Convenience wrapper for the library headers.
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:660
bool mutt_strn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings (to a maximum), safely.
Definition string.c:427
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
Definition string.c:498
struct MuttWindow * window_find_parent(struct MuttWindow *win, enum WindowType type)
Find a (grand-)parent of a Window by type.
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.
struct MuttWindow * mutt_window_remove_child(struct MuttWindow *parent, struct MuttWindow *child)
Remove a child from a Window.
void window_set_visible(struct MuttWindow *win, bool visible)
Set a Window visible or hidden.
#define WA_RECALC
Recalculate the contents of the Window.
@ WT_CONTAINER
Invisible shaping container Window.
Definition mutt_window.h:74
@ WT_DLG_INDEX
Index Dialog, dlg_index()
Definition mutt_window.h:87
@ WT_SIDEBAR
Side panel containing Accounts or groups of data.
@ MUTT_WIN_ORIENT_VERTICAL
Window uses all available vertical space.
Definition mutt_window.h:39
@ MUTT_WIN_ORIENT_HORIZONTAL
Window uses all available horizontal space.
Definition mutt_window.h:40
@ NT_WINDOW_DIALOG
A new Dialog Window has been created, e.g. WT_DLG_INDEX.
@ NT_WINDOW_STATE
Window state has changed, e.g. WN_VISIBLE.
@ NT_WINDOW_DELETE
Window is about to be deleted.
#define WN_VISIBLE
Window became visible.
#define WN_HIDDEN
Window became hidden.
#define WA_REPAINT
Redraw the contents of the Window.
#define MUTT_WIN_SIZE_UNLIMITED
Use as much space as possible.
Definition mutt_window.h:53
@ MUTT_WIN_SIZE_FIXED
Window has a fixed size.
Definition mutt_window.h:48
@ MUTT_WIN_SIZE_MAXIMISE
Window wants as much space as possible.
Definition mutt_window.h:49
struct MailboxArray neomutt_mailboxes_get(struct NeoMutt *n, enum MailboxType type)
Get an Array of matching Mailboxes.
Definition neomutt.c:184
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
Definition notify_type.h:57
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
Definition notify_type.h:43
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
Definition notify_type.h:41
@ NT_MAILBOX
Mailbox has changed, NotifyMailbox, EventMailbox.
Definition notify_type.h:49
@ NT_COMMAND
A Command has been executed, Command.
Definition notify_type.h:42
@ NT_ACCOUNT
Account has changed, NotifyAccount, EventAccount.
Definition notify_type.h:36
@ NT_INDEX
Index data has changed, NotifyIndex, IndexSharedData.
Definition notify_type.h:48
#define TAILQ_INSERT_TAIL(head, elm, field)
Definition queue.h:866
#define TAILQ_FIRST(head)
Definition queue.h:780
#define TAILQ_REMOVE(head, elm, field)
Definition queue.h:901
void window_reflow(struct MuttWindow *win)
Reflow Windows.
Definition reflow.c:220
void sb_win_add_observers(struct MuttWindow *win)
Add Observers to the Sidebar Window.
Definition observer.c:435
static struct MuttWindow * sb_win_init(struct MuttWindow *dlg)
Initialise and insert the Sidebar Window.
Definition observer.c:94
static bool calc_divider(struct SidebarWindowData *wdata)
Decide what actions are required for the divider.
Definition observer.c:51
static void sb_init_data(struct MuttWindow *win)
Initialise the Sidebar data.
Definition observer.c:150
void sb_win_remove_observers(struct MuttWindow *win)
Remove Observers from the Sidebar Window.
Definition observer.c:455
GUI display the mailboxes in a side panel.
DivType
Source of the sidebar divider character.
Definition private.h:79
@ SB_DIV_ASCII
An ASCII vertical bar (pipe)
Definition private.h:81
@ SB_DIV_USER
User configured using $sidebar_divider_char.
Definition private.h:80
void sb_remove_mailbox(struct SidebarWindowData *wdata, const struct Mailbox *m)
Remove a Mailbox from the Sidebar.
Definition sidebar.c:128
struct SidebarWindowData * sb_wdata_new(struct MuttWindow *win, struct IndexSharedData *shared)
Create new Window data for the Sidebar.
Definition wdata.c:44
void sb_set_current_mailbox(struct SidebarWindowData *wdata, struct Mailbox *m)
Set the current Mailbox.
Definition sidebar.c:181
void sb_add_mailbox(struct SidebarWindowData *wdata, struct Mailbox *m)
Add a Mailbox to the Sidebar.
Definition sidebar.c:91
struct SidebarWindowData * sb_wdata_get(struct MuttWindow *win)
Get the Sidebar data for this window.
Definition wdata.c:77
struct MailboxArray mailboxes
All Mailboxes.
Definition account.h:40
A curses colour and its attributes.
Definition attr.h:66
int attrs
Text attributes, e.g. A_BOLD.
Definition attr.h:69
enum CommandResult(* parse)(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Definition command.h:64
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
Definition subset.h:51
An Event that happened to an Account.
Definition account.h:77
struct Account * account
The Account this Event relates to.
Definition account.h:78
An Event that happened to a Colour.
Definition notify2.h:55
enum ColorId cid
Colour ID that has changed.
Definition notify2.h:56
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 Mailbox.
Definition mailbox.h:190
struct Mailbox * mailbox
The Mailbox this Event relates to.
Definition mailbox.h:191
An Event that happened to a Window.
struct MuttWindow * win
Window that changed.
WindowNotifyFlags flags
Attributes of Window that changed.
Data shared between Index, Pager and Sidebar.
Definition shared_data.h:37
struct Mailbox * mailbox
Current Mailbox.
Definition shared_data.h:41
A mailbox.
Definition mailbox.h:79
bool visible
True if a result of "mailboxes".
Definition mailbox.h:130
int(* repaint)(struct MuttWindow *win)
short req_cols
Number of columns required.
struct WindowState state
Current state of the Window.
struct MuttWindow * focus
Focused Window.
void * wdata
Private data.
enum MuttWindowOrientation orient
Which direction the Window will expand.
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
int(* recalc)(struct MuttWindow *win)
void(* wdata_free)(struct MuttWindow *win, void **ptr)
struct MuttWindowList children
Children Windows.
struct MuttWindow * parent
Parent Window.
WindowActionFlags actions
Actions to be performed, e.g. WA_RECALC.
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Container for Accounts, Notifications.
Definition neomutt.h:42
struct Notify * notify
Notifications handler.
Definition neomutt.h:43
struct ConfigSubset * sub
Inherited config items.
Definition neomutt.h:46
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
Sidebar private Window data -.
Definition private.h:88
short divider_width
Width of the divider in screen columns.
Definition private.h:100
enum DivType divider_type
Type of divider to use, e.g. SB_DIV_ASCII.
Definition private.h:99
struct IndexSharedData * shared
Shared Index Data.
Definition private.h:90
struct MuttWindow * win
Sidebar Window.
Definition private.h:89
bool visible
Window is visible.
Definition mutt_window.h:60