From eaf061ee574096d70bd8d829659e2d340f06130d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 12 Jan 2019 11:52:46 +0100 Subject: [PATCH] module: define a struct for module meta data * Function pointer; instantiates the module from a yml conf node * Its (top-level) configuration attributes --- module.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module.h b/module.h index 012a2fd..450dcd6 100644 --- a/module.h +++ b/module.h @@ -3,12 +3,22 @@ #include #include +#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;