aboutsummaryrefslogtreecommitdiffstats
path: root/include/mtstate.h
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-06-16 02:30:41 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-06-16 02:30:41 +0200
commit8dff8642c43a473713d48533974d9c7883bbc5c1 (patch)
treeea8513c76d38f2612a1202d30abf0f2e768f204c /include/mtstate.h
parent1c73d171b2814bf2809aa48c2d4b683a064a4f7e (diff)
downloadxorg-input-kobomultitouch-8dff8642c43a473713d48533974d9c7883bbc5c1.tar.gz
xorg-input-kobomultitouch-8dff8642c43a473713d48533974d9c7883bbc5c1.tar.bz2
xorg-input-kobomultitouch-8dff8642c43a473713d48533974d9c7883bbc5c1.zip
refactor: Replace hwdata by mtdev
This patch makes the switch, from using hwdata and the associated type A parser, to using mtdev and the associated type B parser. A command-line gesture test program is included. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'include/mtstate.h')
-rw-r--r--include/mtstate.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/mtstate.h b/include/mtstate.h
index b6b8e8d..a474114 100644
--- a/include/mtstate.h
+++ b/include/mtstate.h
@@ -24,14 +24,10 @@
#include "hwstate.h"
-struct MTFinger {
- struct FingerData hw;
- int id, thumb;
-};
-
struct MTState {
- struct MTFinger finger[DIM_FINGER];
+ struct FingerState finger[DIM_FINGER];
int nfinger;
+ bitmask_t thumb;
bitmask_t button;
mstime_t evtime;
};
@@ -42,14 +38,14 @@ void extract_mtstate(struct MTState *s,
const struct Capabilities *caps);
void output_mtstate(const struct MTState *s);
-const struct MTFinger *find_finger(const struct MTState *s, int id);
+const struct FingerState *find_finger(const struct MTState *s, int id);
-static inline int center_dist2(const struct MTFinger *a,
+static inline int center_dist2(const struct FingerState *a,
const struct Capabilities *caps)
{
- return dist2(a->hw.position_x - get_cap_xmid(caps),
- a->hw.position_y - get_cap_ymid(caps));
+ return dist2(a->position_x - get_cap_xmid(caps),
+ a->position_y - get_cap_ymid(caps));
}
static inline int center_maxdist2(const struct Capabilities *caps)