diff options
| author | Marc Palau <sucdepressec@gmail.com> | 2015-04-22 17:34:42 +0200 |
|---|---|---|
| committer | Marc Palau <sucdepressec@gmail.com> | 2015-04-22 17:34:42 +0200 |
| commit | ceb73257272e34a739b6225e1f30e4e377fdab77 (patch) | |
| tree | 08521b1830316d124739f2fa1553f7b9949295f1 /src/raylib.h | |
| parent | 7d2318c1677fd6e81b8cc63b040289148ca8adfc (diff) | |
| download | raylib-ceb73257272e34a739b6225e1f30e4e377fdab77.tar.gz raylib-ceb73257272e34a739b6225e1f30e4e377fdab77.zip | |
Added Gestures System for Android and Web
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/raylib.h b/src/raylib.h index 603cc47d..962376a9 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -183,6 +183,20 @@ typedef enum { false, true } bool; #endif +typedef enum { + GESTURE_NONE = 0, + GESTURE_TAP, + GESTURE_DOUBLETAP, + GESTURE_HOLD, + GESTURE_DRAG, + GESTURE_SWIPE_RIGHT, + GESTURE_SWIPE_LEFT, + GESTURE_SWIPE_UP, + GESTURE_SWIPE_DOWN, + GESTURE_PINCH_IN, + GESTURE_PINCH_OUT +} Gestures; + // byte type typedef unsigned char byte; @@ -433,10 +447,18 @@ bool IsGamepadButtonUp(int gamepad, int button); // Detect if a gamepad b #endif #if defined(PLATFORM_ANDROID) -bool IsScreenTouched(void); // Detect screen touch event int GetTouchX(void); // Returns touch position X int GetTouchY(void); // Returns touch position Y Vector2 GetTouchPosition(void); // Returns touch position XY + +bool IsGestureDetected(void); +int GetGestureType(void); +float GetDragIntensity(void); +float GetDragAngle(void); +Vector2 GetDragVector(void); +int GetHoldDuration(void); // Hold time in frames +float GetPinchDelta(void); +float GetPinchAngle(void); #endif //------------------------------------------------------------------------------------ |
