diff options
| author | Federico Angelilli <code@fedang.net> | 2024-03-14 02:00:21 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-03-14 02:00:21 +0100 |
| commit | 93c4dc6893e733f563e70c315537922d55adfab2 (patch) | |
| tree | 245e84a64fed1dd56cc9e91b4fa415384caf9322 /src/animate.h | |
| parent | 398fdbaa5c02bbd138c59004053d2e8ad0082ead (diff) | |
Refactor code and start adding shine animation
Diffstat (limited to 'src/animate.h')
| -rw-r--r-- | src/animate.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/animate.h b/src/animate.h index 3f8d4a6..3bfa87f 100644 --- a/src/animate.h +++ b/src/animate.h @@ -1,18 +1,28 @@ #ifndef COMET_ANIMATE_H #define COMET_ANIMATE_H +#include <glib.h> + +#include "draw.h" + +// TODO: Custom drawing for animations +typedef void (* DrawFunc)(cairo_t *cr, const Layout *layout); + +typedef struct State State; + typedef struct { enum { ANIM_SHINE, } type; GSourceFunc handler; + DrawFunc paint; } Animation; double quadratic_bezier(double x, double a, double b, double c); double cubic_bezier(double x, double a, double b, double c, double d); -Animation *animation_create(); +Animation *animation_shine_create(State *state, gint64 duration); void animation_destroy(Animation *anim); |
