69 for (
size_t i = 0; i < len; i++)
71 if (c_sidebar_divider_char[i] & ~0x7F)
81 changed = (width !=
wdata->divider_width);
84 wdata->divider_width = width;
107 dlg->
focus = cont_right;
111 cont_right->
focus = index_panel;
118 win_sidebar->
state.
visible = c_sidebar_visible && (c_sidebar_width > 0);
130 if (c_sidebar_on_right)
314 if ((c_sidebar_on_right && (first == win)) || (!c_sidebar_on_right && (first != win)))
#define ARRAY_EMPTY(head)
Check if an array is empty.
Color and attribute parsing.
void mutt_color_observer_remove(observer_t callback, void *global_data)
Remove an observer.
void mutt_color_observer_add(observer_t callback, void *global_data)
Add an observer.
ColorId
List of all colored objects.
@ MT_COLOR_SIDEBAR_DIVIDER
Line dividing sidebar from the index/pager.
@ MT_COLOR_SIDEBAR_NEW
Mailbox with new mail.
@ MT_COLOR_SIDEBAR_UNREAD
Mailbox with unread mail.
@ MT_COLOR_INDICATOR
Selected item in list.
@ MT_COLOR_SIDEBAR_SPOOLFILE
$spool_file (Spool mailbox)
@ MT_COLOR_SIDEBAR_ORDINARY
Mailbox with no new or flagged messages.
@ MT_COLOR_SIDEBAR_BACKGROUND
Background colour for the Sidebar.
@ MT_COLOR_NORMAL
Plain text.
@ MT_COLOR_SIDEBAR_INDICATOR
Current open mailbox.
@ MT_COLOR_SIDEBAR_HIGHLIGHT
Select cursor.
@ MT_COLOR_SIDEBAR_FLAGGED
Mailbox with flagged messages.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
short cs_subset_number(const struct ConfigSubset *sub, const char *name)
Get a number config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Convenience wrapper for the config headers.
@ NT_ACCOUNT_DELETE
Account is about to be deleted.
Convenience wrapper for the core headers.
@ NT_MAILBOX_DELETE
Mailbox is about to be deleted.
@ NT_MAILBOX_ADD
Mailbox has been added.
@ MUTT_MAILBOX_ANY
Match any Mailbox type.
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
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() -.
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() -.
#define mutt_debug(LEVEL,...)
static int sb_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
static int sb_mailbox_observer(struct NotifyCallback *nc)
Notification that a Mailbox has changed - Implements observer_t -.
static int sb_account_observer(struct NotifyCallback *nc)
Notification that an Account has changed - Implements observer_t -.
int sb_insertion_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
static int sb_command_observer(struct NotifyCallback *nc)
Notification that a Command has occurred - Implements observer_t -.
static int sb_color_observer(struct NotifyCallback *nc)
Notification that a Color has changed - Implements observer_t -.
static int sb_index_observer(struct NotifyCallback *nc)
Notification that the Index has changed - Implements observer_t -.
static int sb_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
int sb_recalc(struct MuttWindow *win)
Recalculate the Sidebar display - Implements MuttWindow::recalc() -.
int sb_repaint(struct MuttWindow *win)
Repaint the Sidebar display - Implements MuttWindow::repaint() -.
void sb_wdata_free(struct MuttWindow *win, void **ptr)
Free Sidebar Window data - Implements MuttWindow::wdata_free() -.
Convenience wrapper for the gui headers.
GUI manage the main index (list of emails)
#define NT_INDEX_MAILBOX
Mailbox has changed.
@ LL_DEBUG5
Log at debug level 5.
bool CharsetIsUtf8
Is the user's current character set utf-8?
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.
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
bool mutt_strn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings (to a maximum), safely.
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
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.
@ WT_DLG_INDEX
Index Dialog, dlg_index()
@ WT_SIDEBAR
Side panel containing Accounts or groups of data.
@ MUTT_WIN_ORIENT_VERTICAL
Window uses all available vertical space.
@ MUTT_WIN_ORIENT_HORIZONTAL
Window uses all available horizontal space.
@ 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.
@ MUTT_WIN_SIZE_FIXED
Window has a fixed size.
@ MUTT_WIN_SIZE_MAXIMISE
Window wants as much space as possible.
void neomutt_mailboxlist_clear(struct MailboxList *ml)
Free a Mailbox List.
size_t neomutt_mailboxlist_get_all(struct MailboxList *head, struct NeoMutt *n, enum MailboxType type)
Get a List of all Mailboxes.
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
@ NT_MAILBOX
Mailbox has changed, NotifyMailbox, EventMailbox.
@ NT_COMMAND
A Command has been executed, Command.
@ NT_ACCOUNT
Account has changed, NotifyAccount, EventAccount.
@ NT_INDEX
Index data has changed, NotifyIndex, IndexSharedData.
@ NT_ALL
Register for all notifications.
#define STAILQ_HEAD_INITIALIZER(head)
#define TAILQ_INSERT_TAIL(head, elm, field)
#define STAILQ_FOREACH(var, head, field)
#define TAILQ_FIRST(head)
#define TAILQ_REMOVE(head, elm, field)
void window_reflow(struct MuttWindow *win)
Reflow Windows.
struct MailboxList mailboxes
List of Mailboxes.
enum CommandResult(* parse)(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
An Event that happened to an Account.
struct Account * account
The Account this Event relates to.
An Event that happened to a Colour.
enum ColorId cid
Colour ID that has changed.
const char * name
Name of config item that changed.
An Event that happened to a Mailbox.
struct Mailbox * mailbox
The Mailbox this Event relates to.
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.
struct Mailbox * mailbox
Current Mailbox.
struct Mailbox * mailbox
Mailbox in the list.
bool visible
True if a result of "mailboxes".
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.
struct Notify * notify
Notifications handler.
struct ConfigSubset * sub
Inherited config items.
Data passed to a notification function.
void * event_data
Data from notify_send()
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
void * global_data
Data from notify_observer_add()
bool visible
Window is visible.