diff options
Diffstat (limited to 'src/state.h')
| -rw-r--r-- | src/state.h | 30 |
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 | |||
| 8 | struct FingerState { | ||
| 9 | struct FingerData hw; | ||
| 10 | int id; | ||
| 11 | }; | ||
| 12 | |||
| 13 | //////////////////////////////////////////////////////// | ||
| 14 | |||
| 15 | struct State { | ||
| 16 | struct FingerState finger[DIM_FINGER]; | ||
| 17 | int nfinger, button[DIM_BUTTON]; | ||
| 18 | }; | ||
| 19 | |||
| 20 | //////////////////////////////////////////////////////// | ||
| 21 | |||
| 22 | void init_state(struct State *s); | ||
| 23 | void modify_state(struct State *s, const struct HWData* hw); | ||
| 24 | void output_state(const struct State *s); | ||
| 25 | |||
| 26 | const struct FingerState *find_finger(const struct State *s, int id); | ||
| 27 | |||
| 28 | //////////////////////////////////////////////////////// | ||
| 29 | |||
| 30 | #endif | ||
