154 buf_printf(err,
_(
"%s: too few arguments"),
"color");
193 struct Buffer *err,
bool uncolor)
281 unsigned int match = 0;
295 buf_printf(err,
_(
"%s: too few arguments"), color ?
"color" :
"mono");
310 rc = callback(buf, s, ac, err);
319#ifndef NEOMUTT_DIRECT_COLORS
325 if (!c_color_directcolor)
357 buf_printf(err,
_(
"%s: too many arguments"), color ?
"color" :
"mono");
381 if (!mutt_str_atoui_full(tmp->
data, &match))
383 buf_printf(err,
_(
"%s: invalid number: %s"), color ?
"color" :
"mono", tmp->
data);
393 buf_printf(err,
_(
"%s: too many arguments"), color ?
"color" :
"mono");
427 intptr_t data,
struct Buffer *err)
448 intptr_t data,
struct Buffer *err)
458 intptr_t data,
struct Buffer *err)
480 intptr_t data,
struct Buffer *err)
struct AttrColor * attr_color_new(void)
Create a new AttrColor.
void attr_color_free(struct AttrColor **ptr)
Free an AttrColor.
@ CT_RGB
True colour, e.g. "#11AAFF".
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
void buf_fix_dptr(struct Buffer *buf)
Move the dptr to end of the Buffer.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
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".
void get_colorid_name(unsigned int cid, struct Buffer *buf)
Get the name of a Colour ID.
const struct Mapping ColorFields[]
Mapping of colour names to their IDs.
static enum CommandResult parse_color(struct Buffer *buf, struct Buffer *s, struct Buffer *err, parser_callback_t callback, bool color)
Parse a 'color' command.
static enum CommandResult parse_object(struct Buffer *buf, struct Buffer *s, enum ColorId *cid, struct Buffer *err)
Identify a colour object.
static enum CommandResult parse_uncolor(struct Buffer *buf, struct Buffer *s, struct Buffer *err, bool uncolor)
Parse an 'uncolor' command.
void color_dump(void)
Display all the colours in the Pager.
struct Notify * ColorsNotify
Notifications: ColorId, EventColor.
int regex_colors_parse_status_list(enum ColorId cid, const char *pat, struct AttrColor *ac, int match, struct Buffer *err)
Parse a Regex 'color status' command.
bool regex_colors_parse_color_list(enum ColorId cid, const char *pat, struct AttrColor *ac, int *rc, struct Buffer *err)
Parse a Regex 'color' command.
bool regex_colors_parse_uncolor(enum ColorId cid, const char *pat, bool uncolor)
Parse a Regex 'uncolor' command.
struct AttrColor * simple_color_set(enum ColorId cid, struct AttrColor *ac_val)
Set the colour of a simple object.
void simple_color_reset(enum ColorId cid)
Clear the colour of a simple object.
bool mutt_color_has_pattern(enum ColorId cid)
Check if a color object supports a regex pattern.
void colors_reset(void)
Reset all the simple, quoted and regex colours.
Color and attribute parsing.
ColorId
List of all coloured objects.
@ MT_COLOR_SIDEBAR_DIVIDER
Line dividing sidebar from the index/pager.
@ MT_COLOR_MARKERS
Pager: markers, line continuation.
@ MT_COLOR_COMPOSE_SECURITY_ENCRYPT
Mail will be encrypted.
@ MT_COLOR_MESSAGE
Informational message.
@ MT_COLOR_INDEX_AUTHOR
Index: author field.
@ MT_COLOR_QUOTED0
Pager: quoted text, level 0.
@ MT_COLOR_SIDEBAR_NEW
Mailbox with new mail.
@ MT_COLOR_HEADER
Message headers (takes a pattern)
@ MT_COLOR_STATUS
Status bar (takes a pattern)
@ MT_COLOR_SIDEBAR_UNREAD
Mailbox with unread mail.
@ MT_COLOR_INDEX_SIZE
Index: size field.
@ MT_COLOR_INDICATOR
Selected item in list.
@ MT_COLOR_STRIPE_EVEN
Stripes: even lines of the Help Page.
@ MT_COLOR_SIDEBAR_SPOOLFILE
$spool_file (Spool mailbox)
@ MT_COLOR_ERROR
Error message.
@ MT_COLOR_NONE
No colour.
@ MT_COLOR_COMPOSE_SECURITY_NONE
Mail will not be encrypted or signed.
@ MT_COLOR_SIDEBAR_ORDINARY
Mailbox with no new or flagged messages.
@ MT_COLOR_QUOTED1
Pager: quoted text, level 1.
@ MT_COLOR_INDEX_TAGS
Index: tags field (g, J)
@ MT_COLOR_QUOTED3
Pager: quoted text, level 3.
@ MT_COLOR_BOLD
Bold text.
@ MT_COLOR_INDEX_SUBJECT
Index: subject field.
@ MT_COLOR_BODY
Pager: highlight body of message (takes a pattern)
@ MT_COLOR_INDEX_DATE
Index: date field.
@ MT_COLOR_QUOTED6
Pager: quoted text, level 6.
@ MT_COLOR_PROGRESS
Progress bar.
@ MT_COLOR_COMPOSE_SECURITY_BOTH
Mail will be encrypted and signed.
@ MT_COLOR_QUOTED8
Pager: quoted text, level 8.
@ MT_COLOR_SIDEBAR_BACKGROUND
Background colour for the Sidebar.
@ MT_COLOR_INDEX_TAG
Index: tag field (G)
@ MT_COLOR_HDRDEFAULT
Header default colour.
@ MT_COLOR_OPTIONS
Options in prompt.
@ MT_COLOR_TREE
Index: tree-drawing characters.
@ MT_COLOR_QUOTED7
Pager: quoted text, level 7.
@ MT_COLOR_NORMAL
Plain text.
@ MT_COLOR_ATTACH_HEADERS
MIME attachment test (takes a pattern)
@ MT_COLOR_SEARCH
Pager: search matches.
@ MT_COLOR_COMPOSE_SECURITY_SIGN
Mail will be signed.
@ MT_COLOR_INDEX_LABEL
Index: label field.
@ MT_COLOR_ITALIC
Italic text.
@ MT_COLOR_QUOTED4
Pager: quoted text, level 4.
@ MT_COLOR_STRIPE_ODD
Stripes: odd lines of the Help Page.
@ MT_COLOR_PROMPT
Question/user input.
@ MT_COLOR_COMPOSE_HEADER
Header labels, e.g. From:
@ MT_COLOR_INDEX
Index: default colour.
@ MT_COLOR_QUOTED9
Pager: quoted text, level 9.
@ MT_COLOR_QUOTED2
Pager: quoted text, level 2.
@ MT_COLOR_ATTACHMENT
MIME attachments text (entire line)
@ MT_COLOR_SIDEBAR_INDICATOR
Current open mailbox.
@ MT_COLOR_SIDEBAR_HIGHLIGHT
Select cursor.
@ MT_COLOR_WARNING
Warning messages.
@ MT_COLOR_UNDERLINE
Underlined text.
@ MT_COLOR_INDEX_NUMBER
Index: index number.
@ MT_COLOR_SIGNATURE
Pager: signature lines.
@ MT_COLOR_INDEX_FLAGS
Index: flags field.
@ MT_COLOR_QUOTED5
Pager: quoted text, level 5.
@ MT_COLOR_SIDEBAR_FLAGGED
Mailbox with flagged messages.
@ MT_COLOR_TILDE
Pager: empty lines after message.
@ MT_COLOR_INDEX_COLLAPSED
Index: number of messages in collapsed thread.
enum CommandResult(* parser_callback_t)(struct Buffer *buf, struct Buffer *s, struct AttrColor *ac, struct Buffer *err)
CommandResult
Error codes for command_t parse functions.
@ MUTT_CMD_SUCCESS
Success: Command worked.
@ MUTT_CMD_ERROR
Error: Can't help the user.
@ MUTT_CMD_WARNING
Warning: Help given to the user.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Convenience wrapper for the config headers.
bool StartupComplete
When the config has been read.
Convenience wrapper for the core headers.
void curses_colors_dump(struct Buffer *buf)
Dump all the Curses colours.
static int color_debug(enum LogLevel level, const char *format,...)
bool OptNoCurses
(pseudo) when sending in batch mode
enum CommandResult mutt_parse_unmono(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unmono' command - Implements Command::parse() -.
enum CommandResult mutt_parse_mono(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'mono' command - Implements Command::parse() -.
enum CommandResult mutt_parse_color(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'color' command - Implements Command::parse() -.
enum CommandResult mutt_parse_uncolor(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'uncolor' command - Implements Command::parse() -.
enum CommandResult parse_attr_spec(struct Buffer *buf, struct Buffer *s, struct AttrColor *ac, struct Buffer *err)
Parse an attribute description - Implements parser_callback_t -.
enum CommandResult parse_color_pair(struct Buffer *buf, struct Buffer *s, struct AttrColor *ac, struct Buffer *err)
Parse a pair of colours - Implements parser_callback_t -.
Convenience wrapper for the gui headers.
@ LL_DEBUG5
Log at debug level 5.
int mutt_map_get_value(const char *name, const struct Mapping *map)
Lookup the constant for a string.
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
Convenience wrapper for the library headers.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Many unsorted constants and some structs.
@ NT_COLOR_SET
Color has been set.
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
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.
A curses colour and its attributes.
struct ColorElement bg
Background colour.
struct ColorElement fg
Foreground colour.
String manipulation buffer.
char * dptr
Current read/write position.
char * data
Pointer to data.
enum ColorType type
Type of Colour.
An Event that happened to a Colour.
enum ColorId cid
Colour ID that has changed.
Mapping between user-readable string and a constant.
const char * name
String value.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.