From 43238419974e599a84f17b5faa8fb52401bdfe90 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sun, 8 Sep 2024 13:07:22 +0200 Subject: Refactor config parsing --- src/block.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/block.h') diff --git a/src/block.h b/src/block.h index 5301a7b..1ceedf1 100644 --- a/src/block.h +++ b/src/block.h @@ -7,6 +7,7 @@ #include "event.h" #include "util.h" +#include "config.h" // Element or text alignment // @@ -33,19 +34,23 @@ typedef void (*block_event_t)(block_t *block, event_t event); // typedef void (*block_update_t)(block_t *block); +// Block finalization routine +// +typedef void (*block_finalize_t)(block_t *block); + // Block struct // struct block { block_type_t type; char *label; bool active; + bool hidden; + void *state; struct timespec update_interval; struct timespec update_last; block_update_t update_cb; block_event_t event_cb; - void *info; - - bool hidden; + block_finalize_t finalize_cb; color_t color; color_t line_color; int line_width; -- cgit v1.2.3