NeoMutt
2024-11-14-34-g5aaf0d
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
29
struct
Buffer
;
30
struct
ExpandoNode
;
31
32
typedef
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
47
struct
ExpandoRenderData
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
81
int
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 */
node_render
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
MuttFormatFlags
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
Definition:
render.h:32
Buffer
String manipulation buffer.
Definition:
buffer.h:36
ExpandoNode
Basic Expando Node.
Definition:
node.h:67
ExpandoRenderData
Definition:
render.h:48
ExpandoRenderData::get_number
long(* get_number)(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Definition:
render.h:78
ExpandoRenderData::did
int did
Domain ID.
Definition:
render.h:49
ExpandoRenderData::get_string
void(* get_string)(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Definition:
render.h:64
ExpandoRenderData::uid
int uid
Unique ID.
Definition:
render.h:50