mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
oarticles: don't assume particle content is a dictionary
This is done by having each particle implement a top-level verifier function.
This commit is contained in:
parent
9944a8f972
commit
8bc6a0b783
8 changed files with 77 additions and 27 deletions
|
@ -14,11 +14,11 @@ struct particle;
|
|||
struct exposable;
|
||||
|
||||
struct particle_info {
|
||||
bool (*verify_conf)(keychain_t *chain, const struct yml_node *node);
|
||||
struct particle *(*from_conf)(const struct yml_node *node,
|
||||
const struct font *parent_font,
|
||||
int left_margin, int right_margin,
|
||||
const char *on_click_template);
|
||||
const struct attr_info attrs[];
|
||||
|
||||
#define PARTICLE_COMMON_ATTRS_COUNT 5
|
||||
#define PARTICLE_COMMON_ATTRS \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue