diff options
Diffstat (limited to 'src/effect.h')
| -rw-r--r-- | src/effect.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/effect.h b/src/effect.h index 1bf1a9e..2c6ec2c 100644 --- a/src/effect.h +++ b/src/effect.h @@ -5,25 +5,29 @@ #include "util.h" -typedef enum { - EFFECT_PULSE, -} effect_type_t; - typedef struct effect effect_t; typedef struct layout layout_t; typedef void (*effect_render_t)(effect_t *effect, layout_t *layout, cairo_t *cr); +// NOTE: The effect state must be freed by this function +// +typedef void (*effect_finalize_t)(effect_t *effect); + +typedef void (*effect_init_t)(effect_t *effect); + struct effect { - effect_type_t type; + char *label; struct timespec start; struct timespec duration; effect_render_t pre; effect_render_t post; + void *state; + effect_finalize_t finalize; }; -effect_t *effect_pulse(struct timespec duration); +void effect_copy(effect_t *copy, const effect_t *effect); void effect_free(effect_t *effect); |
