aboutsummaryrefslogtreecommitdiff
path: root/src/block.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/block.h')
-rw-r--r--src/block.h11
1 files changed, 8 insertions, 3 deletions
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;