NeoMutt  2024-12-12-19-ge4b57e
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
53typedef void (*get_string_t)(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf);
54
67typedef long (*get_number_t)(const struct ExpandoNode *node, void *data, MuttFormatFlags flags);
68
76{
77 int did;
78 int uid;
79
80 get_string_t get_string; // Callback function to get a string
81 get_number_t get_number; // Callback function to get a number
82};
83
84int node_render(const struct ExpandoNode *node, const struct ExpandoRenderCallback *erc,
85 struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags);
86
87#endif /* MUTT_EXPANDO_RENDER_H */
void(* get_string_t)(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Definition: render.h:53
long(* get_number_t)(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Definition: render.h:67
int node_render(const struct ExpandoNode *node, const struct ExpandoRenderCallback *erc, 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
int uid
Unique ID, e.g. ExpandoDataAlias.
Definition: render.h:78
int did
Domain ID, ExpandoDomain.
Definition: render.h:77
get_string_t get_string
Definition: render.h:80
get_number_t get_number
Definition: render.h:81