X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Finput%2Fgesturedetector.h;h=b2d0d4fdd36139411c3fb61e8b1062e575ea3ba4;hb=5858aa055277dbd376c33bb3bbeb6aa74137a17f;hp=2b5ea3c3203219d2153b78cd22e19c65aed3d291;hpb=85609ce268bdd6a91cd26e0bda7460862d3f38d7;p=libs%2Fgui.git diff --git a/source/input/gesturedetector.h b/source/input/gesturedetector.h index 2b5ea3c..b2d0d4f 100644 --- a/source/input/gesturedetector.h +++ b/source/input/gesturedetector.h @@ -27,6 +27,11 @@ absolute values greater than one. class GestureDetector: public Device { private: + enum + { + MAX_POINTS = 3 + }; + struct TouchPoint { bool down; @@ -34,12 +39,13 @@ private: float down_y; float x; float y; + bool threshold_exceeded; TouchPoint(); }; Touchscreen &touchscreen; - TouchPoint points[3]; + TouchPoint points[MAX_POINTS]; Gesture current_gesture; unsigned active_points; bool invalid_gesture; @@ -58,6 +64,7 @@ private: void touch_move(unsigned, float, float); void start_gesture(); void update_progress(); + void end_gesture(); void window_resized(unsigned, unsigned); };