diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2010-05-14 01:14:04 +0200 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2010-05-14 01:41:39 +0200 |
commit | ebaf307ab1b22d4786cc5fb55170204759e887ce (patch) | |
tree | 933487729ab47354f29cb1fbda38e6438ca8d22c /src/gestures.c | |
parent | 2b271ed5348daec2bcf90b83da47781e2d8b964c (diff) | |
download | xorg-input-kobomultitouch-ebaf307ab1b22d4786cc5fb55170204759e887ce.tar.gz xorg-input-kobomultitouch-ebaf307ab1b22d4786cc5fb55170204759e887ce.tar.bz2 xorg-input-kobomultitouch-ebaf307ab1b22d4786cc5fb55170204759e887ce.zip |
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 <rydberg@euromail.se>
Diffstat (limited to 'src/gestures.c')
-rw-r--r-- | src/gestures.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; |