aboutsummaryrefslogtreecommitdiff
path: root/src/animate.h
blob: c243287aad476a77519ea121fc6979e3f3bda602 (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
#ifndef COMET_ANIMATE_H
#define COMET_ANIMATE_H

#include <glib.h>

#include "draw.h"

typedef struct Animation Animation;
typedef struct State State;

typedef bool (* DrawFunc)(Animation *anim, cairo_t *cr, const Layout *layout);

struct Animation {
    enum {
        ANIM_SHINE,
    } type;
    DrawFunc paint;
};

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(gint64 duration);

void animation_destroy(Animation *anim);

#endif

// vim: ts=4 sw=4 et