From 63de72d8d810e3692c96c7385b497bb4d68ef54a Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Thu, 6 Nov 2008 17:18:16 +0100 Subject: state added, now do the matching Signed-off-by: Henrik Rydberg --- src/state.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/state.h (limited to 'src/state.h') 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 @@ +#ifndef MTEVENT_H +#define MTEVENT_H + +#include "hwdata.h" + +//////////////////////////////////////////////////////// + +struct FingerState { + struct FingerData hw; + int id; +}; + +//////////////////////////////////////////////////////// + +struct State { + struct FingerState finger[DIM_FINGER]; + int nfinger, button[DIM_BUTTON]; +}; + +//////////////////////////////////////////////////////// + +void init_state(struct State *s); +void modify_state(struct State *s, const struct HWData* hw); +void output_state(const struct State *s); + +const struct FingerState *find_finger(const struct State *s, int id); + +//////////////////////////////////////////////////////// + +#endif -- cgit v1.2.3