aboutsummaryrefslogtreecommitdiff
path: root/src/animate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/animate.c')
-rw-r--r--src/animate.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/animate.c b/src/animate.c
index 7241104..8bd09b5 100644
--- a/src/animate.c
+++ b/src/animate.c
@@ -47,8 +47,7 @@ typedef struct {
cairo_pattern_t *gradient;
} AnimationShine;
-// FIXME: Not working for button group
-static bool shine_paint(AnimationShine *shine, cairo_t *cr, const Layout *layout)
+static bool shine_func(AnimationShine *shine, Layout *layout, cairo_t *cr)
{
gint64 end = shine->anim.start + shine->anim.duration;
gint64 now = g_get_monotonic_time();
@@ -88,7 +87,7 @@ Animation *animation_shine_create(gint64 duration)
// Note the 0 initialization
AnimationShine *shine = g_malloc0(sizeof(AnimationShine));
shine->anim.type = ANIM_SHINE;
- shine->anim.paint_func = (DrawFunc)shine_paint;
+ shine->anim.after_func = (DrawFunc)shine_func;
shine->anim.duration = duration;
// TODO: Change it depending on container size
@@ -102,7 +101,7 @@ Animation *animation_shine_create(gint64 duration)
return (gpointer)shine;
}
-static bool pulse_layout(Animation *pulse, Layout *layout)
+static bool pulse_func(Animation *pulse, Layout *layout, cairo_t *cr)
{
gint64 end = pulse->start + pulse->duration;
gint64 now = g_get_monotonic_time();
@@ -128,7 +127,7 @@ Animation *animation_pulse_create(gint64 duration)
// Note the 0 initialization
Animation *pulse = g_malloc0(sizeof(Animation));
pulse->type = ANIM_PULSE;
- pulse->layout_func = (LayoutFunc)pulse_layout;
+ pulse->before_func = (DrawFunc)pulse_func;
pulse->duration = duration;
return (gpointer)pulse;