summaryrefslogtreecommitdiff
path: root/src/state.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.h')
-rw-r--r--src/state.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/state.h b/src/state.h
new file mode 100644
index 0000000..9c36617
--- /dev/null
+++ b/src/state.h
@@ -0,0 +1,30 @@
1#ifndef MTEVENT_H
2#define MTEVENT_H
3
4#include "hwdata.h"
5
6////////////////////////////////////////////////////////
7
8struct FingerState {
9 struct FingerData hw;
10 int id;
11};
12
13////////////////////////////////////////////////////////
14
15struct State {
16 struct FingerState finger[DIM_FINGER];
17 int nfinger, button[DIM_BUTTON];
18};
19
20////////////////////////////////////////////////////////
21
22void init_state(struct State *s);
23void modify_state(struct State *s, const struct HWData* hw);
24void output_state(const struct State *s);
25
26const struct FingerState *find_finger(const struct State *s, int id);
27
28////////////////////////////////////////////////////////
29
30#endif