NeoMutt  2024-10-02-34-g9dd811
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
render.h
Go to the documentation of this file.
1
24#ifndef MUTT_EXPANDO_RENDER_H
25#define MUTT_EXPANDO_RENDER_H
26
27#include <stdint.h>
28
29struct Buffer;
30struct ExpandoNode;
31
32typedef uint8_t MuttFormatFlags;
33#define MUTT_FORMAT_NO_FLAGS 0
34#define MUTT_FORMAT_FORCESUBJ (1 << 0)
35#define MUTT_FORMAT_TREE (1 << 1)
36#define MUTT_FORMAT_STAT_FILE (1 << 2)
37#define MUTT_FORMAT_ARROWCURSOR (1 << 3)
38#define MUTT_FORMAT_INDEX (1 << 4)
39#define MUTT_FORMAT_PLAIN (1 << 5)
40
48{
49 int did;
50 int uid;
51
64 void (*get_string)(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf);
65
78 long (*get_number)(const struct ExpandoNode *node, void *data, MuttFormatFlags flags);
79};
80
81int node_render(const struct ExpandoNode *node,
82 const struct ExpandoRenderData *rdata, struct Buffer *buf,
83 int max_cols, void *data, MuttFormatFlags flags);
84
85#endif /* MUTT_EXPANDO_RENDER_H */
int node_render(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Render a tree of ExpandoNodes into a string.
Definition: render.c:45
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
Definition: render.h:32
String manipulation buffer.
Definition: buffer.h:36
Basic Expando Node.
Definition: node.h:67
long(* get_number)(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Definition: render.h:78
int did
Domain ID.
Definition: render.h:49
void(* get_string)(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Definition: render.h:64
int uid
Unique ID.
Definition: render.h:50