Parse colour commands. More...
#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "mutt.h"
#include "parse/lib.h"
#include "attr.h"
#include "color.h"
#include "command2.h"
#include "debug.h"
#include "dump.h"
#include "globals.h"
#include "notify2.h"
#include "parse_color.h"
#include "quoted.h"
#include "regex4.h"
#include "simple2.h"
Go to the source code of this file.
Functions | |
void | get_colorid_name (unsigned int cid, struct Buffer *buf) |
Get the name of a color id. | |
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_uncolor (struct Buffer *buf, struct Buffer *s, struct Buffer *err, bool uncolor) |
Parse an 'uncolor' command. | |
static enum CommandResult | parse_color (struct Buffer *buf, struct Buffer *s, struct Buffer *err, parser_callback_t callback, bool color) |
Parse a 'color' command. | |
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 | 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_color (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'color' 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() -. | |
Variables | |
const struct Mapping | ColorFields [] |
Mapping of colour names to their IDs. | |
const struct Mapping | ComposeColorFields [] |
Mapping of compose colour names to their IDs. | |
Parse colour commands.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file command.c.
void get_colorid_name | ( | unsigned int | cid, |
struct Buffer * | buf | ||
) |
Get the name of a color id.
cid | Colour, e.g. MT_COLOR_HEADER |
buf | Buffer for result |
Definition at line 127 of file command.c.
|
static |
Identify a colour object.
[in] | buf | Temporary Buffer space |
[in] | s | Buffer containing string to be parsed |
[out] | cid | Object type, e.g. MT_COLOR_TILDE |
[out] | ql | Quote level, if type MT_COLOR_QUOTED |
[out] | err | Buffer for error messages |
CommandResult | Result e.g. MUTT_CMD_SUCCESS |
Identify a colour object, e.g. "quoted", "compose header"
Definition at line 159 of file command.c.
|
static |
Parse an 'uncolor' command.
buf | Temporary Buffer space |
s | Buffer containing string to be parsed |
err | Buffer for error messages |
uncolor | If true, 'uncolor', else 'unmono' |
CommandResult | Result e.g. MUTT_CMD_SUCCESS |
Usage:
Definition at line 229 of file command.c.
|
static |
Parse a 'color' command.
buf | Temporary Buffer space |
s | Buffer containing string to be parsed |
err | Buffer for error messages |
callback | Function to handle command - Implements parser_callback_t |
color | If true "color", else "mono" |
CommandResult | Result e.g. MUTT_CMD_SUCCESS |
Usage:
Definition at line 321 of file command.c.
const struct Mapping ColorFields[] |
const struct Mapping ComposeColorFields[] |
Mapping of compose colour names to their IDs.