79 if (transform &&
mutt_strn_equal((
const char *) (s + 1), transform, strlen(transform)))
116 unsigned char *s = (
unsigned char *) buf->
data;
117 mbstate_t mbstate = { 0 };
137 add_wch(WACS_LLCORNER);
150 add_wch(WACS_ULCORNER);
267 else if ((k = mbrtowc(&wc, (
char *) s, n, &mbstate)) > 0)
299 for (; buf_cols < max_cols; buf_cols++)
336 ac = menu->
color(menu, i);
363 if ((i == menu->
current) && !c_arrow_cursor)
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Color and attribute parsing.
struct RegexColorList * regex_colors_get_list(enum ColorId cid)
Return the RegexColorList for a colour id.
struct AttrColor * simple_color_get(enum ColorId cid)
Get the colour of an object by its ID.
@ MT_COLOR_INDICATOR
Selected item in list.
@ MT_COLOR_INDEX_TAG
Index: tag field (G)
@ MT_COLOR_NORMAL
Plain text.
@ MT_COLOR_INDEX
Index: default colour.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string 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.
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
void menu_redraw_current(struct Menu *menu)
Redraw the current menu.
static const struct AttrColor * get_color(int index, unsigned char *s)
Choose a colour for a line of the index.
void menu_redraw_index(struct Menu *menu)
Force the redraw of the index.
int menu_redraw(struct Menu *menu)
Redraw the parts of the screen that have been flagged to be redrawn.
void menu_redraw_full(struct Menu *menu)
Force the redraw of the Menu.
static void menu_pad_string(struct Menu *menu, struct Buffer *buf)
Pad a string with spaces for display in the Menu.
static void print_enriched_string(struct MuttWindow *win, int index, const struct AttrColor *ac_def, struct AttrColor *ac_ind, struct Buffer *buf, struct ConfigSubset *sub)
Display a string with embedded colours and graphics.
void menu_redraw_motion(struct Menu *menu)
Force the redraw of the list part of the menu.
Structs that make up an email.
bool mutt_pattern_exec(struct Pattern *pat, PatternExecFlags flags, struct Mailbox *m, struct Email *e, struct PatternCache *cache)
Match a pattern against an email header.
Convenience wrapper for the gui headers.
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
GUI manage the main index (list of emails)
struct Mailbox * get_current_mailbox(void)
Get the current Mailbox.
const struct AttrColor * merged_color_overlay(const struct AttrColor *base, const struct AttrColor *over)
Combine two colours.
bool CharsetIsUtf8
Is the user's current character set utf-8?
Convenience wrapper for the library headers.
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.
const struct AttrColor * mutt_curses_set_color_by_id(enum ColorId cid)
Set the colour and attributes by the colour id.
void mutt_curses_set_color(const struct AttrColor *ac)
Set the colour and attributes for text.
Create/manipulate threading in emails.
@ MUTT_TREE_LLCORNER
Lower left corner.
@ MUTT_TREE_RARROW
Right arrow.
@ MUTT_SPECIAL_INDEX
Colour indicator.
@ MUTT_TREE_ULCORNER
Upper left corner.
@ MUTT_TREE_EQUALS
Equals (for threads)
@ MUTT_TREE_HIDDEN
Ampersand character (for threads)
@ MUTT_TREE_STAR
Star character (for threads)
@ MUTT_TREE_LTEE
Left T-piece.
@ MUTT_TREE_VLINE
Vertical line.
@ MUTT_TREE_MISSING
Question mark.
@ MUTT_TREE_TTEE
Top T-piece.
@ MUTT_TREE_HLINE
Horizontal line.
@ MUTT_TREE_SPACE
Blank space.
@ MUTT_TREE_BTEE
Bottom T-piece.
void mutt_window_clear(struct MuttWindow *win)
Clear a Window.
int mutt_window_printf(struct MuttWindow *win, const char *fmt,...)
Write a formatted string to a Window.
int mutt_window_move(struct MuttWindow *win, int col, int row)
Move the cursor in a Window.
int mutt_window_mvaddstr(struct MuttWindow *win, int col, int row, const char *str)
Move the cursor and write a fixed string to a Window.
void mutt_window_clearline(struct MuttWindow *win, int row)
Clear a row of a Window.
int mutt_window_addstr(struct MuttWindow *win, const char *str)
Write a string to a Window.
int mutt_window_addnstr(struct MuttWindow *win, const char *str, int num)
Write a partial string to a Window.
int mutt_window_addch(struct MuttWindow *win, int ch)
Write one character to a Window.
struct Email * mutt_get_virt_email(struct Mailbox *m, int vnum)
Get a virtual Email.
Match patterns to emails.
#define MUTT_MATCH_FULL_ADDRESS
Match the full address.
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 STAILQ_FOREACH(var, head, field)
#define SLIST_FIRST(head)
A curses colour and its attributes.
String manipulation buffer.
char * data
Pointer to data.
A set of inherited config items.
The envelope/body of an email.
int index
The absolute (unsorted) message number.
struct WindowState state
Current state of the Window.
A regular expression and a color to highlight a line.
struct PatternList * color_pattern
Compiled pattern to speed up index color calculation.
struct AttrColor attr_color
Colour and attributes to apply.
char * pattern
Pattern to match.
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
short rows
Number of rows, can be MUTT_WIN_SIZE_UNLIMITED.