NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
node_expando.h
Go to the documentation of this file.
1
24#ifndef MUTT_EXPANDO_NODE_EXPANDO_H
25#define MUTT_EXPANDO_NODE_EXPANDO_H
26
27#include <stdbool.h>
28#include "definition.h"
29#include "render.h"
30
31struct Buffer;
32struct ExpandoFormat;
33struct ExpandoNode;
35
40{
41 int color;
42 bool has_tree;
43};
44
45struct ExpandoNode *node_expando_new(struct ExpandoFormat *fmt, int did, int uid);
46
47void node_expando_set_color (const struct ExpandoNode *node, int cid);
48void node_expando_set_has_tree(const struct ExpandoNode *node, bool has_tree);
49
50struct ExpandoFormat *parse_format(const char *str, const char **parsed_until, struct ExpandoParseError *err);
51struct ExpandoNode *parse_short_name(const char *str, const struct ExpandoDefinition *defs, ExpandoParserFlags flags, struct ExpandoFormat *fmt, const char **parsed_until, struct ExpandoParseError *err);
52struct ExpandoNode *node_expando_parse(const char *str, const struct ExpandoDefinition *defs, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err);
53int node_expando_render(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags);
54
55struct ExpandoNode *node_expando_parse_enclosure(const char *str, int did, int uid, char terminator, struct ExpandoFormat *fmt, const char **parsed_until, struct ExpandoParseError *err);
56
57#endif /* MUTT_EXPANDO_NODE_EXPANDO_H */
Define an Expando format string.
uint8_t ExpandoParserFlags
Flags for expando_parse(), e.g. EP_CONDITIONAL.
Definition: definition.h:33
int node_expando_render(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Render an Expando Node - Implements ExpandoNode::render() -.
Definition: node_expando.c:404
struct ExpandoNode * node_expando_parse(const char *str, const struct ExpandoDefinition *defs, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse an Expando format string.
Definition: node_expando.c:284
void node_expando_set_color(const struct ExpandoNode *node, int cid)
Set the colour for an Expando.
Definition: node_expando.c:100
void node_expando_set_has_tree(const struct ExpandoNode *node, bool has_tree)
Set the has_tree flag for an Expando.
Definition: node_expando.c:115
struct ExpandoNode * node_expando_new(struct ExpandoFormat *fmt, int did, int uid)
Create a new Expando ExpandoNode.
Definition: node_expando.c:78
struct ExpandoNode * node_expando_parse_enclosure(const char *str, int did, int uid, char terminator, struct ExpandoFormat *fmt, const char **parsed_until, struct ExpandoParseError *err)
Parse an enclosed Expando.
Definition: node_expando.c:349
struct ExpandoNode * parse_short_name(const char *str, const struct ExpandoDefinition *defs, ExpandoParserFlags flags, struct ExpandoFormat *fmt, const char **parsed_until, struct ExpandoParseError *err)
Create an expando by its short name.
Definition: node_expando.c:245
struct ExpandoFormat * parse_format(const char *str, const char **parsed_until, struct ExpandoParseError *err)
Parse a format string.
Definition: node_expando.c:136
Render Expandos using Data.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
Definition: render.h:32
String manipulation buffer.
Definition: buffer.h:36
Definition of a format string.
Definition: definition.h:44
Formatting information for an Expando.
Definition: node.h:53
Basic Expando Node.
Definition: node.h:67
int uid
Unique ID, e.g. ED_EMA_SIZE.
Definition: node.h:70
int did
Domain ID, e.g. ED_EMAIL.
Definition: node.h:69
Buffer for parsing errors.
Definition: parse.h:37
Private data for an Expando -.
Definition: node_expando.h:40
int color
ColorId to use.
Definition: node_expando.h:41
bool has_tree
Contains tree characters, used in $index_format's s.
Definition: node_expando.h:42