From bc70dead7fb518f073fecb21a04fa374e9ad6dd0 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Thu, 12 Sep 2024 19:19:45 +0200 Subject: Start working on actions --- src/block.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/block.h') diff --git a/src/block.h b/src/block.h index 6eeb0c0..d38a79d 100644 --- a/src/block.h +++ b/src/block.h @@ -8,6 +8,8 @@ #include "event.h" #include "util.h" #include "config.h" +#include "action.h" +#include "effect.h" // Element or text alignment // @@ -26,10 +28,6 @@ typedef enum { typedef struct block block_t; -// Triggered when an event is directed towards the block -// -typedef void (*block_event_t)(block_t *block, event_t event); - // Regularly called depending on the inverval passed from the last update // typedef void (*block_update_t)(block_t *block); @@ -49,10 +47,12 @@ struct block { void *state; struct timespec update_interval; struct timespec update_last; - block_update_t update_cb; - block_event_t event_cb; - block_finalize_t finalize_cb; - struct effect *effect; + block_update_t update; + block_finalize_t finalize; + effect_t *effect; + action_t *right_click_action; + action_t *middle_click_action; + action_t *left_click_action; color_t color; color_t line_color; unsigned int line_width; -- cgit v1.2.3