71#define UTILWIN_COLS 10
104 for (
int r = 0; r < (win->
state.
rows - 1); r++)
167 for (
int i = 0; i < ev_k->
key_len; i++)
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Color and attribute parsing.
@ MT_COLOR_NORMAL
Plain text.
Convenience wrapper for the core headers.
#define mutt_debug(LEVEL,...)
static int utilwin_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
static int utilwin_key_observer(struct NotifyCallback *nc)
Notification that key progress has changed - Implements observer_t -.
static int utilwin_recalc(struct MuttWindow *win)
Recalculate the Utility Window - Implements MuttWindow::recalc() -.
static int utilwin_repaint(struct MuttWindow *win)
Repaint the Utility Window - Implements MuttWindow::repaint() -.
static void utilwin_wdata_free(struct MuttWindow *win, void **ptr)
Free the private data - Implements MuttWindow::wdata_free() -.
void keymap_get_name(int c, struct Buffer *buf)
Get the human name for a key.
@ NT_KEY_PROGRESS
Key state has changed.
@ LL_DEBUG5
Log at debug level 5.
#define FREE(x)
Free memory and set the pointer to NULL.
#define MUTT_MEM_CALLOC(n, type)
@ MODULE_ID_GUI
ModuleGui, Graphical code
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.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
const struct AttrColor * mutt_curses_set_color_by_id(enum ColorId cid)
Set the colour and attributes by the Colour ID.
Define wrapper functions around Curses.
void mutt_window_clear(struct MuttWindow *win)
Clear a Window.
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
void mutt_window_reflow(struct MuttWindow *win)
Resize a Window and its children.
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 row, int col)
Move the cursor in a Window.
void window_set_visible(struct MuttWindow *win, bool visible)
Set a Window visible or hidden.
int mutt_window_addstr(struct MuttWindow *win, const char *str)
Write a string to 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_CUSTOM
Window with a custom drawing function.
@ 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.
@ MUTT_WIN_SIZE_FIXED
Window has a fixed size.
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
@ NT_KEY
Runtime key handling changed, NotifyKey, EventKeyProgress.
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.
String manipulation buffer.
Runtime key progress event.
short key_len
Number of keys entered.
keycode_t keys[KEY_SEQ_MAX_LEN]
Entered keys.
int count
Parsed count prefix, if any.
An Event that happened to a Window.
struct MuttWindow * win
Window that changed.
struct MuttWindow * utility_window
Utility Window.
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)
WindowActionFlags actions
Actions to be performed, e.g. WA_RECALC.
Container for Accounts, Notifications.
struct Notify * notify
Notifications handler.
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()
Utility Window private data.
char * text
Cached display string.
short rows
Number of rows, can be MUTT_WIN_SIZE_UNLIMITED.
const char * utilwin_get_text(struct MuttWindow *win)
Get the text from the Utility Window.
void utilwin_set_text(struct MuttWindow *win, const char *text)
Set the text for the Utility Window.
struct MuttWindow * utilwin_new(void)
Create the Utility Window.
#define UTILWIN_COLS
Width of the Utility Window in columns.