129 const char *
name = NULL;
167 if (buf->
data[6] !=
'\0')
185 buf_printf(err,
_(
"%s: too few arguments"),
"color");
230 struct Buffer *err,
bool uncolor)
326 unsigned int match = 0;
340 buf_printf(err,
_(
"%s: too few arguments"), color ?
"color" :
"mono");
355 rc = callback(buf, s, ac, err);
364#ifndef NEOMUTT_DIRECT_COLORS
370 if (!c_color_directcolor)
402 buf_printf(err,
_(
"%s: too many arguments"), color ?
"color" :
"mono");
432 if (!mutt_str_atoui_full(tmp->
data, &match))
434 buf_printf(err,
_(
"%s: invalid number: %s"), color ?
"color" :
"mono", tmp->
data);
444 buf_printf(err,
_(
"%s: too many arguments"), color ?
"color" :
"mono");
478 intptr_t data,
struct Buffer *err)
499 intptr_t data,
struct Buffer *err)
509 intptr_t data,
struct Buffer *err)
531 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.
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".
const struct Mapping ComposeColorFields[]
Mapping of compose colour names to their IDs.
void get_colorid_name(unsigned int cid, struct Buffer *buf)
Get the name of a color id.
const struct Mapping ColorFields[]
Mapping of colour names to their IDs.
static enum CommandResult parse_object(struct Buffer *buf, struct Buffer *s, enum ColorId *cid, int *ql, struct Buffer *err)
Identify a colour object.
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_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.
void colors_cleanup(void)
Reset all the simple, quoted and regex colours.
bool mutt_color_has_pattern(enum ColorId cid)
Check if a color object supports a regex pattern.
Color and attribute parsing.
ColorId
List of all colored 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_QUOTED
Pager: quoted text.
@ MT_COLOR_INDEX_AUTHOR
Index: author field.
@ 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_COMPOSE_SECURITY_NONE
Mail will not be encrypted or signed.
@ MT_COLOR_SIDEBAR_ORDINARY
Mailbox with no new or flagged messages.
@ MT_COLOR_INDEX_TAGS
Index: tags field (g, J)
@ 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_PROGRESS
Progress bar.
@ MT_COLOR_COMPOSE_SECURITY_BOTH
Mail will be encrypted and signed.
@ 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_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_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_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_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.
size_t mutt_str_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix.
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.
enum CommandResult quoted_colors_parse_uncolor(enum ColorId cid, int q_level, struct Buffer *err)
Parse the 'uncolor quoted' command.
bool quoted_colors_parse_color(enum ColorId cid, struct AttrColor *ac_val, int q_level, int *rc, struct Buffer *err)
Parse the 'color quoted' command.
#define COLOR_QUOTES_MAX
Ten colours, quoted0..quoted9 (quoted and quoted0 are equivalent)
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.