aboutsummaryrefslogtreecommitdiff
path: root/src/animate.h
blob: 3bfa87f40b8fe36cf7c844701999ceb305591653 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#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_shine_create(State *state, gint64 duration);

void animation_destroy(Animation *anim);

#endif

// vim: ts=4 sw=4 et