aboutsummaryrefslogtreecommitdiff
path: root/src/state.h
blob: ef621f41273cd75ee69e1178c5ae9b2c748c761b (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
32
33
34
35
36
37
#ifndef COMET_STATE_H
#define COMET_STATE_H

#include <glib.h>

#include "window.h"
#include "draw.h"
#include "button.h"

typedef struct State State;

struct State {
    Window *win;
    Drawer *draw;
    GList *btns;
    gint idle_id;
    gint anim_id;
    bool relayout;
};

State *state_create(Window *win, Drawer *draw);

void state_add_button(State *state, Button *btn);

void state_remove_button(State *state, Button *btn);

void state_order_button(State *state);

void state_request_redraw(State *state, bool relayout);

void state_request_animation(State *state);

void state_destroy(State *state);

#endif

// vim: ts=4 sw=4 et