forked from external/yambar
decorations: are now plugins
This commit is contained in:
parent
4eee71eaf4
commit
7754ef3661
11 changed files with 160 additions and 124 deletions
9
plugin.h
9
plugin.h
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue