]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/gesturedetector.h
Implement tap gestures
[libs/gui.git] / source / input / gesturedetector.h
index ccccc888d27b67bc57f1652e31f898897aee8814..a6186fdef815dce6fa56956bd8261360b1632f3f 100644 (file)
@@ -11,6 +11,8 @@ class Touchscreen;
 enum Gesture
 {
        GESTURE_NONE,
+       GESTURE_TAP,
+       GESTURE_TAP_2,
        GESTURE_DRAG,
        GESTURE_DRAG_2,
        GESTURE_PINCH,
@@ -47,6 +49,7 @@ private:
        TouchPoint points[MAX_POINTS];
        Gesture current_gesture;
        unsigned active_points;
+       Gesture pending_tap;
        bool invalid_gesture;
        float threshold_x_sq;
        float threshold_y_sq;
@@ -62,6 +65,7 @@ private:
        void touch_up(unsigned);
        void touch_move(unsigned, float, float);
        void start_gesture();
+       void set_gesture_location(unsigned);
        void update_progress();
        void end_gesture();
        void window_resized(unsigned, unsigned);