From 963d6f71bb64125603d59c8bb70eaeec38c6fd72 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Sat, 10 Apr 2010 22:57:26 +0200 Subject: Introduce the MTState The HWState keeps, for good reason, both touching fingers and fingers going away. However, this implies that additional logic is needed to keep track of the number of actual touching fingers. In particular the test for touching fingers is somewhat misplaced in hwstate.c. Moreover, HWState should only exist in one instance, since it contains data which does not need to be referred to during gesture extraction. This patch introduces the MTState structure, which keeps more digested data for gesture extraction. In particular, it only keeps the actual touches. Signed-off-by: Henrik Rydberg --- src/mtouch.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mtouch.h') diff --git a/src/mtouch.h b/src/mtouch.h index e4a59fb..28a637b 100644 --- a/src/mtouch.h +++ b/src/mtouch.h @@ -26,12 +26,14 @@ #include "iobuffer.h" #include "hwdata.h" #include "hwstate.h" +#include "mtstate.h" struct MTouch { struct Capabilities caps; struct IOBuffer buf; struct HWData hw; - struct HWState ohs, nhs; + struct HWState hs; + struct MTState prev_state, state; }; int configure_mtouch(struct MTouch *mt, int fd); -- cgit v1.2.3