diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-04-10 22:57:26 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-04-15 06:10:07 +0200 |
| commit | 963d6f71bb64125603d59c8bb70eaeec38c6fd72 (patch) | |
| tree | 87dc34640a4e47cee618ebbc8d665e100e21239f /src/mtouch.h | |
| parent | 9c24576540ba57449c31bafcb8f4aab41b8623b7 (diff) | |
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 <rydberg@euromail.se>
Diffstat (limited to 'src/mtouch.h')
| -rw-r--r-- | src/mtouch.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ | |||
| 26 | #include "iobuffer.h" | 26 | #include "iobuffer.h" |
| 27 | #include "hwdata.h" | 27 | #include "hwdata.h" |
| 28 | #include "hwstate.h" | 28 | #include "hwstate.h" |
| 29 | #include "mtstate.h" | ||
| 29 | 30 | ||
| 30 | struct MTouch { | 31 | struct MTouch { |
| 31 | struct Capabilities caps; | 32 | struct Capabilities caps; |
| 32 | struct IOBuffer buf; | 33 | struct IOBuffer buf; |
| 33 | struct HWData hw; | 34 | struct HWData hw; |
| 34 | struct HWState ohs, nhs; | 35 | struct HWState hs; |
| 36 | struct MTState prev_state, state; | ||
| 35 | }; | 37 | }; |
| 36 | 38 | ||
| 37 | int configure_mtouch(struct MTouch *mt, int fd); | 39 | int configure_mtouch(struct MTouch *mt, int fd); |
