90 if (!adata || !adata->
menu)
132 char tmp[128] = { 0 };
270 if (ev_w->
win != win_cbar)
328 { -1, -1, NULL, NULL },
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
static int num_attachments(const struct ComposeAttachData *adata)
Count the number of attachments.
const struct ExpandoRenderData ComposeRenderData[]
Callbacks for Compose Expandos.
struct MuttWindow * cbar_new(struct ComposeSharedData *shared)
Create the Compose Bar (status)
struct ComposeBarData * cbar_data_new(void)
Create the private data for the Compose Bar.
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.
@ MT_COLOR_STATUS
Status bar (takes a pattern)
@ MT_COLOR_NORMAL
Plain text.
unsigned long cum_attachs_size(struct ConfigSubset *sub, struct ComposeAttachData *adata)
Cumulative Attachments Size.
@ ED_COM_ATTACH_COUNT
ComposeAttachData, num_attachments()
@ ED_COM_ATTACH_SIZE
ComposeAttachData, cum_attachs_size()
const struct Expando * cs_subset_expando(const struct ConfigSubset *sub, const char *name)
Get an Expando config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
void mutt_draw_statusline(struct MuttWindow *win, int max_cols, const char *buf, size_t buflen)
Draw a highlighted status bar.
@ ED_COMPOSE
Compose ED_COM_ ExpandoDataCompose.
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Structs that make up an email.
int expando_filter(const struct Expando *exp, const struct ExpandoRenderData *rdata, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Render an Expando and run the result through a filter.
char * ShortHostname
Short version of the hostname.
long compose_a_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Compose: Number of attachments - Implements ExpandoRenderData::get_number() -.
long compose_l_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Compose: Size in bytes - Implements ExpandoRenderData::get_number() -.
void compose_v(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Compose: Version - Implements ExpandoRenderData::get_string() -.
void compose_l(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Compose: Size in bytes - Implements ExpandoRenderData::get_string() -.
void compose_h(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Compose: Hostname - Implements ExpandoRenderData::get_string() -.
#define mutt_debug(LEVEL,...)
int cbar_color_observer(struct NotifyCallback *nc)
Notification that a Color has changed - Implements observer_t -.
int cbar_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
static int cbar_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
static int cbar_email_observer(struct NotifyCallback *nc)
Notification that the Email has changed - Implements observer_t -.
static int cbar_recalc(struct MuttWindow *win)
Recalculate the Window data - Implements MuttWindow::recalc() -.
static int cbar_repaint(struct MuttWindow *win)
Repaint the Window - Implements MuttWindow::repaint() -.
void cbar_data_free(struct MuttWindow *win, void **ptr)
Free the private Compose Bar data - Implements MuttWindow::wdata_free() -.
Convenience wrapper for the gui headers.
GUI manage the main index (list of emails)
Data shared between Index, Pager and Sidebar.
@ LL_DEBUG5
Log at debug level 5.
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.
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
const struct AttrColor * mutt_curses_set_normal_backed_color_by_id(enum ColorId cid)
Set the colour and attributes by the colour id.
const struct AttrColor * mutt_curses_set_color_by_id(enum ColorId cid)
Set the colour and attributes by the colour id.
struct MuttWindow * mutt_window_new(enum WindowType type, enum MuttWindowOrientation orient, enum MuttWindowSize size, int cols, int rows)
Create a new Window.
int mutt_window_move(struct MuttWindow *win, int col, int row)
Move the cursor in a Window.
void mutt_window_clrtoeol(struct MuttWindow *win)
Clear to the end of the line.
#define WA_RECALC
Recalculate the contents of the Window.
@ WT_STATUS_BAR
Status Bar containing extra info about the Index/Pager/etc.
@ MUTT_WIN_ORIENT_VERTICAL
Window uses all available vertical space.
@ NT_WINDOW_STATE
Window state has changed, e.g. WN_VISIBLE.
@ NT_WINDOW_DELETE
Window is about to be deleted.
#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.
const char * mutt_make_version(void)
Generate the NeoMutt version string.
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
Some miscellaneous functions.
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
@ NT_EMAIL
Email has changed, NotifyEmail, EventEmail.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
#define MUTT_FORMAT_NO_FLAGS
No flags are set.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
String manipulation buffer.
Data to fill the Compose Attach Window.
struct Menu * menu
Menu displaying the attachments.
Data to fill the Compose Bar Window.
char * compose_format
Cached status string.
struct ConfigSubset * sub
Config set to use.
int flags
Flags, e.g. MUTT_COMPOSE_NOFREEHEADER.
struct ComposeAttachData * adata
Attachments.
struct Email * email
Email being composed.
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
struct Notify * notify
Notifications: NotifyEmail, EventEmail.
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 Window.
struct MuttWindow * win
Window that changed.
int(* repaint)(struct MuttWindow *win)
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)
struct MuttWindow * parent
Parent Window.
WindowActionFlags actions
Actions to be performed, e.g. WA_RECALC.
Container for Accounts, Notifications.
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()
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
@ ED_GLO_VERSION
NeoMutt version.
@ ED_GLO_HOSTNAME
Local hostname.