diff options
Diffstat (limited to 'src/block.h')
| -rw-r--r-- | src/block.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/block.h b/src/block.h index 71db95e..09ef3fc 100644 --- a/src/block.h +++ b/src/block.h @@ -30,6 +30,10 @@ typedef struct block block_t; typedef struct block_scheme block_scheme_t; +// Regularly called depending on the inverval passed from the last update +// +typedef void (*block_update_t)(block_t *block); + // Called in layout_init // typedef void (*block_layout_t)(block_t *block, layout_t *layout, layout_info_t info); @@ -42,10 +46,6 @@ typedef void (*block_render_t)(layout_t *layout, cairo_t *cr); // 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); - // The block struct // struct block { @@ -58,7 +58,6 @@ struct block { struct timespec update_interval; struct timespec update_last; block_update_t update_fn; - block_event_t event_fn; // TODO //gradient_t bg_color; //gradient_t line_color; @@ -85,10 +84,13 @@ typedef struct { bool collapse; } block_group_t; +// NOTE: I am not sure this is required anymore since we can just put +// special function in the scheme typedef struct { block_t block; block_layout_t layout_fn; block_render_t render_fn; + block_event_t event_fn; } block_spec_t; // Called to allocate a block with its default state |
