module: define a struct for module meta data

* Function pointer; instantiates the module from a yml conf node
* Its (top-level) configuration attributes
This commit is contained in:
Daniel Eklöf 2019-01-12 11:52:46 +01:00
parent 4dd1a24af6
commit eaf061ee57

View file

@ -3,12 +3,22 @@
#include <threads.h>
#include <cairo.h>
#include "config-verify.h"
#include "particle.h"
#include "tag.h"
#include "yml.h"
struct bar;
struct module;
struct module_info {
struct module *(*from_conf)(const struct yml_node *node,
const struct font *parent_font);
size_t attr_count; /* TODO: remove, NULL-terminate attr list instead */
const struct attr_info attrs[];
};
struct module_run_context {
struct module *module;
int ready_fd;