summaryrefslogtreecommitdiff
path: root/src/state.h
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2008-11-06 17:18:16 +0100
committerHenrik Rydberg <rydberg@euromail.se>2008-11-06 17:18:16 +0100
commit63de72d8d810e3692c96c7385b497bb4d68ef54a (patch)
treecaa3ecce7c826553d611193f6f1363d76ebd906f /src/state.h
parent3734c2c5dc65f41aa727d9d69201d604eab6e77d (diff)
state added, now do the matching
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
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