mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
config: pass a struct with inheritable values
For now, font and foreground color
This commit is contained in:
parent
7776135454
commit
8dc278aaf2
20 changed files with 84 additions and 48 deletions
12
config.h
12
config.h
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue