Mercurial > molko
comparison libmlk-core/mlk/core/state.h @ 469:0d6206cee6b9
core: state -> mlk_state
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 27 Feb 2023 11:11:23 +0100 |
parents | 5729efd23286 |
children | 6e8f6640e05b |
comparison
equal
deleted
inserted
replaced
468:91ce23a36143 | 469:0d6206cee6b9 |
---|---|
21 | 21 |
22 #include "core.h" | 22 #include "core.h" |
23 | 23 |
24 union mlk_event; | 24 union mlk_event; |
25 | 25 |
26 struct state { | 26 struct mlk_state { |
27 void *data; | 27 void *data; |
28 void (*start)(struct state *); | 28 void (*start)(struct mlk_state *); |
29 void (*handle)(struct state *, const union mlk_event *); | 29 void (*handle)(struct mlk_state *, const union mlk_event *); |
30 void (*update)(struct state *, unsigned int); | 30 void (*update)(struct mlk_state *, unsigned int); |
31 void (*draw)(struct state *); | 31 void (*draw)(struct mlk_state *); |
32 void (*suspend)(struct state *); | 32 void (*suspend)(struct mlk_state *); |
33 void (*resume)(struct state *); | 33 void (*resume)(struct mlk_state *); |
34 void (*end)(struct state *); | 34 void (*end)(struct mlk_state *); |
35 void (*finish)(struct state *); | 35 void (*finish)(struct mlk_state *); |
36 }; | 36 }; |
37 | 37 |
38 MLK_CORE_BEGIN_DECLS | 38 MLK_CORE_BEGIN_DECLS |
39 | 39 |
40 void | 40 void |
41 state_start(struct state *); | 41 mlk_state_start(struct mlk_state *); |
42 | 42 |
43 void | 43 void |
44 state_handle(struct state *, const union mlk_event *); | 44 mlk_state_handle(struct mlk_state *, const union mlk_event *); |
45 | 45 |
46 void | 46 void |
47 state_update(struct state *, unsigned int); | 47 mlk_state_update(struct mlk_state *, unsigned int); |
48 | 48 |
49 void | 49 void |
50 state_draw(struct state *); | 50 mlk_state_draw(struct mlk_state *); |
51 | 51 |
52 void | 52 void |
53 state_suspend(struct state *); | 53 mlk_state_suspend(struct mlk_state *); |
54 | 54 |
55 void | 55 void |
56 state_resume(struct state *); | 56 mlk_state_resume(struct mlk_state *); |
57 | 57 |
58 void | 58 void |
59 state_end(struct state *); | 59 mlk_state_end(struct mlk_state *); |
60 | 60 |
61 void | 61 void |
62 state_finish(struct state *); | 62 mlk_state_finish(struct mlk_state *); |
63 | 63 |
64 MLK_CORE_END_DECLS | 64 MLK_CORE_END_DECLS |
65 | 65 |
66 #endif /* !MLK_CORE_STATE_H */ | 66 #endif /* !MLK_CORE_STATE_H */ |