From ebaf307ab1b22d4786cc5fb55170204759e887ce Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Fri, 14 May 2010 01:14:04 +0200 Subject: Introduce MTFinger structure Switch from the FingerData structure to the MTFinger structure, making room for more computed finger details in MTState. Signed-off-by: Henrik Rydberg --- src/gestures.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gestures.c') diff --git a/src/gestures.c b/src/gestures.c index a0ef5d4..9426226 100644 --- a/src/gestures.c +++ b/src/gestures.c @@ -31,18 +31,18 @@ static const int FINGER_ATTACK_MS = 70; static const int FINGER_DECAY_MS = 120; -inline int dxval(const struct FingerState *a, const struct FingerState *b) +inline int dxval(const struct MTFinger *a, const struct MTFinger *b) { return a->hw.position_x - b->hw.position_x; } -inline int dyval(const struct FingerState *a, const struct FingerState *b) +inline int dyval(const struct MTFinger *a, const struct MTFinger *b) { return a->hw.position_y - b->hw.position_y; } static void extract_finger_configuration(struct Gestures *gs, struct MTouch* mt) { - const struct FingerState *f = mt->state.finger; + const struct MTFinger *f = mt->state.finger; int i, same = mt->state.nfinger == mt->prev_state.nfinger; for (i = 0; i < mt->state.nfinger; i++) same = same && find_finger(&mt->prev_state, f[i].id); @@ -51,7 +51,7 @@ static void extract_finger_configuration(struct Gestures *gs, struct MTouch* mt) static void extract_pointers(struct Gestures *gs, struct MTouch* mt) { - const struct FingerState *f = mt->state.finger; + const struct MTFinger *f = mt->state.finger; int i; if (mt->state.nfinger < 2) { @@ -86,7 +86,7 @@ static void extract_pointers(struct Gestures *gs, struct MTouch* mt) static void extract_movement(struct Gestures *gs, struct MTouch* mt) { - const struct FingerState *prev, *f = mt->state.finger; + const struct MTFinger *prev, *f = mt->state.finger; int i, x = 0, y = 0; int dx, dy, xcut, ycut, xmax = 0, ymax = 0; -- cgit v1.2.3