decorations: are now plugins

This commit is contained in:
Daniel Eklöf 2019-01-13 17:43:25 +01:00
parent 4eee71eaf4
commit 7754ef3661
11 changed files with 160 additions and 124 deletions

View file

@ -16,10 +16,16 @@ struct particle_iface {
const struct yml_node *node, struct particle *common);
};
struct deco_iface {
bool (*verify_conf)(keychain_t *chain, const struct yml_node *node);
struct deco *(*from_conf)(const struct yml_node *node);
};
const struct module_iface *plugin_load_module(const char *name);
const struct particle_iface *plugin_load_particle(const char *name);
const struct deco_iface *plugin_load_deco(const char *name);
enum plugin_type { PLUGIN_MODULE, PLUGIN_PARTICLE };
enum plugin_type { PLUGIN_MODULE, PLUGIN_PARTICLE, PLUGIN_DECORATION };
struct plugin {
char *name;
@ -34,6 +40,7 @@ struct plugin {
struct module_iface module;
struct particle_iface particle;
struct deco_iface decoration;
};
};