NeoMutt  2024-04-25-1-g3de005
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(const char *start, const char *end, 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 ExpandoNode *node_expando_parse(const char *s, const char **parsed_until, const struct ExpandoDefinition *defs, ExpandoParserFlags flags, struct ExpandoParseError *error);
51int node_expando_render(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags);
52
53struct ExpandoNode *node_expando_parse_enclosure(const char *s, const char **parsed_until, int did, int uid, char terminator, struct ExpandoParseError *error);
54const char *skip_classic_expando(const char *s, const struct ExpandoDefinition *defs);
55
56#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:41
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:345
void node_expando_set_color(const struct ExpandoNode *node, int cid)
Set the colour for an Expando.
Definition: node_expando.c:107
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:122
struct ExpandoNode * node_expando_new(const char *start, const char *end, struct ExpandoFormat *fmt, int did, int uid)
Create a new Expando ExpandoNode.
Definition: node_expando.c:81
struct ExpandoNode * node_expando_parse_enclosure(const char *s, const char **parsed_until, int did, int uid, char terminator, struct ExpandoParseError *error)
Parse an enclosed Expando.
Definition: node_expando.c:297
struct ExpandoNode * node_expando_parse(const char *s, const char **parsed_until, const struct ExpandoDefinition *defs, ExpandoParserFlags flags, struct ExpandoParseError *error)
Parse an Expando format string.
Definition: node_expando.c:238
const char * skip_classic_expando(const char *s, const struct ExpandoDefinition *defs)
Skip over the text of an Expando.
Definition: helpers.c:145
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:52
Formatting information for an Expando.
Definition: node.h:53
Basic Expando Node.
Definition: node.h:69
int uid
Unique ID, e.g. ED_EMA_SIZE.
Definition: node.h:73
const char * end
End of string data.
Definition: node.h:80
int did
Domain ID, e.g. ED_EMAIL.
Definition: node.h:72
const char * start
Start of string data.
Definition: node.h:79
Buffer for parsing errors.
Definition: parse.h:34
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