aboutsummaryrefslogtreecommitdiff
path: root/src/animate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/animate.h')
-rw-r--r--src/animate.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/animate.h b/src/animate.h
index 3bfa87f..c243287 100644
--- a/src/animate.h
+++ b/src/animate.h
@@ -5,24 +5,23 @@
#include "draw.h"
-// TODO: Custom drawing for animations
-typedef void (* DrawFunc)(cairo_t *cr, const Layout *layout);
-
+typedef struct Animation Animation;
typedef struct State State;
-typedef struct {
+typedef bool (* DrawFunc)(Animation *anim, cairo_t *cr, const Layout *layout);
+
+struct Animation {
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_shine_create(State *state, gint64 duration);
+Animation *animation_shine_create(gint64 duration);
void animation_destroy(Animation *anim);