diff options
| author | Federico Angelilli <code@fedang.net> | 2024-03-16 16:03:21 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-03-16 16:03:21 +0100 |
| commit | 115a2b5d2fb0b8b4950c6daa897fbe012b9204b2 (patch) | |
| tree | 2d9c7bb94dd006b750805fe742365e20a271016b /src/animate.h | |
| parent | 40ca9598d269c9b6f162e80b5293f83ec37bb75d (diff) | |
Split animation paint_func
Diffstat (limited to 'src/animate.h')
| -rw-r--r-- | src/animate.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/animate.h b/src/animate.h index a4ded33..b296723 100644 --- a/src/animate.h +++ b/src/animate.h @@ -8,18 +8,20 @@ typedef struct Animation Animation; typedef struct State State; -typedef bool (* DrawFunc)(Animation *anim, cairo_t *cr, const Layout *layout); typedef bool (* LayoutFunc)(Animation *anim, Layout *layout); +typedef bool (* DrawFunc)(Animation *anim, Layout *layout, cairo_t *cr); struct Animation { enum { ANIM_SHINE, ANIM_PULSE, } type; - DrawFunc paint_func; - LayoutFunc layout_func; gint64 start; gint64 duration; + LayoutFunc layout_func; + // NOTE: These should not change the layout width + DrawFunc before_func; + DrawFunc after_func; }; double clamp(double x, double min, double max); |
