]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/gesturedetector.h
Implement tap gestures
[libs/gui.git] / source / input / gesturedetector.h
index fdd083de0372feb7cb4cde113881f6175d1e27cb..a6186fdef815dce6fa56956bd8261360b1632f3f 100644 (file)
@@ -11,8 +11,12 @@ class Touchscreen;
 enum Gesture
 {
        GESTURE_NONE,
+       GESTURE_TAP,
+       GESTURE_TAP_2,
        GESTURE_DRAG,
-       GESTURE_PINCH
+       GESTURE_DRAG_2,
+       GESTURE_PINCH,
+       GESTURE_ROTATE
 };
 
 /**
@@ -45,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;
@@ -60,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);