NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
render.h
Go to the documentation of this file.
1
23
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
35
enum
MuttFormatFlag
36
{
37
MUTT_FORMAT_NONE
= 0,
38
MUTT_FORMAT_FORCESUBJ
= 1U << 0,
39
MUTT_FORMAT_TREE
= 1U << 1,
40
MUTT_FORMAT_STAT_FILE
= 1U << 2,
41
MUTT_FORMAT_ARROWCURSOR
= 1U << 3,
42
MUTT_FORMAT_INDEX
= 1U << 4,
43
MUTT_FORMAT_PLAIN
= 1U << 5,
44
};
45
typedef
uint8_t
MuttFormatFlags
;
46
59
typedef
void (*
get_string_t
)(
const
struct
ExpandoNode
*node,
void
*data,
MuttFormatFlags
flags,
struct
Buffer
*buf);
60
73
typedef
long (*
get_number_t
)(
const
struct
ExpandoNode
*node,
void
*data,
MuttFormatFlags
flags);
74
81
struct
ExpandoRenderCallback
82
{
83
int
did
;
84
int
uid
;
85
86
get_string_t
get_string
;
87
get_number_t
get_number
;
88
};
89
90
int
node_render
(
const
struct
ExpandoNode
*node,
const
struct
ExpandoRenderCallback
*erc,
91
struct
Buffer
*buf,
int
max_cols,
void
*data,
MuttFormatFlags
flags);
92
93
#endif
/* MUTT_EXPANDO_RENDER_H */
get_string_t
void(* get_string_t)(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Definition
render.h:59
get_number_t
long(* get_number_t)(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Definition
render.h:73
node_render
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
MuttFormatFlag
MuttFormatFlag
Flags for expando_render(), e.g.
Definition
render.h:36
MUTT_FORMAT_PLAIN
@ MUTT_FORMAT_PLAIN
Do not prepend DISP_TO, DISP_CC ...
Definition
render.h:43
MUTT_FORMAT_INDEX
@ MUTT_FORMAT_INDEX
This is a main index entry.
Definition
render.h:42
MUTT_FORMAT_ARROWCURSOR
@ MUTT_FORMAT_ARROWCURSOR
Reserve space for arrow_cursor.
Definition
render.h:41
MUTT_FORMAT_STAT_FILE
@ MUTT_FORMAT_STAT_FILE
Used by attach_format_str.
Definition
render.h:40
MUTT_FORMAT_TREE
@ MUTT_FORMAT_TREE
Draw the thread tree.
Definition
render.h:39
MUTT_FORMAT_NONE
@ MUTT_FORMAT_NONE
No flags are set.
Definition
render.h:37
MUTT_FORMAT_FORCESUBJ
@ MUTT_FORMAT_FORCESUBJ
Print the subject even if unchanged.
Definition
render.h:38
MuttFormatFlags
uint8_t MuttFormatFlags
Definition
render.h:45
Buffer
String manipulation buffer.
Definition
buffer.h:36
ExpandoNode
Basic Expando Node.
Definition
node.h:67
ExpandoRenderCallback
Definition
render.h:82
ExpandoRenderCallback::uid
int uid
Unique ID, e.g. ExpandoDataAlias.
Definition
render.h:84
ExpandoRenderCallback::did
int did
Domain ID, ExpandoDomain.
Definition
render.h:83
ExpandoRenderCallback::get_string
get_string_t get_string
Callback function to get a string.
Definition
render.h:86
ExpandoRenderCallback::get_number
get_number_t get_number
Callback function to get a number.
Definition
render.h:87