config: pass a struct with inheritable values

For now, font and foreground color
This commit is contained in:
Daniel Eklöf 2019-01-13 14:13:14 +01:00
parent 7776135454
commit 8dc278aaf2
20 changed files with 84 additions and 48 deletions

View file

@ -1,10 +1,11 @@
#pragma once
#include "bar.h"
#include "font.h"
#include "particle.h"
#include "yml.h"
struct bar;
struct particle;
bool conf_verify_bar(const struct yml_node *bar);
struct bar *conf_to_bar(const struct yml_node *bar);
@ -15,5 +16,10 @@ struct bar *conf_to_bar(const struct yml_node *bar);
struct rgba conf_to_color(const struct yml_node *node);
struct font *conf_to_font(const struct yml_node *node);
struct conf_inherit {
const struct font *font;
struct rgba foreground;
};
struct particle * conf_to_particle(
const struct yml_node *node, const struct font *parent_font);
const struct yml_node *node, struct conf_inherit inherited);