summaryrefslogtreecommitdiff
path: root/src/grail-recognizer.h
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2011-02-14 16:35:13 +0100
committerHenrik Rydberg <rydberg@euromail.se>2011-03-14 12:55:19 +0100
commit296cc6e9d0fe0d69045cb288f9f470f3760c4a43 (patch)
treebe329db8617905c89130432c3f98c44c5371a64e /src/grail-recognizer.h
parentcc2d67d0f9c6381080de1d666bccfb4b99221113 (diff)
Add in time boundaries for recognition
50 ms: Minimum time waiting for touch configuration to settle before flushing touch events to X. We don't want a two finger gesture triggering X events for the first finger before the second finger lands. 200 ms: Maximum time for touches to begin a gesture. If no gesture is found within this time period, the events are flushed to X. If after 50 ms there are no possible gestures for the number of active touches, the events are immediately flushed to X. If events are flushed to X, no more gesture recognition is possible until all touches are lifted. Likewise, if any gesture is recognized, no events may be flushed to X until all touches are lifted. [rydberg@euromail.se: this patch is severely restrictive and not final] Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/grail-recognizer.h')
-rw-r--r--src/grail-recognizer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/grail-recognizer.h b/src/grail-recognizer.h
index 56e5b8d..b08ff34 100644
--- a/src/grail-recognizer.h
+++ b/src/grail-recognizer.h
@@ -25,6 +25,12 @@
25 25
26#include "grail-gestures.h" 26#include "grail-gestures.h"
27 27
28enum recognition_state {
29 RECOGNIZING,
30 RECOGNIZED,
31 UNRECOGNIZED
32};
33
28struct gesture_recognizer { 34struct gesture_recognizer {
29 struct move_model move; 35 struct move_model move;
30 struct combo_model drag; 36 struct combo_model drag;
@@ -34,6 +40,8 @@ struct gesture_recognizer {
34 struct combo_model winpinch; 40 struct combo_model winpinch;
35 struct combo_model winrotate; 41 struct combo_model winrotate;
36 struct tapping_model tapping; 42 struct tapping_model tapping;
43 utouch_frame_time_t start_time;
44 enum recognition_state state;
37}; 45};
38 46
39int gru_init(struct grail *ge); 47int gru_init(struct grail *ge);