From 93c4dc6893e733f563e70c315537922d55adfab2 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Thu, 14 Mar 2024 02:00:21 +0100 Subject: Refactor code and start adding shine animation --- src/animate.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/animate.h') 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 + +#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); -- cgit v1.2.3