mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-22 14:01:55 +00:00
Add more information for pinch gestures on mobile (#15092)
This commit is contained in:
parent
941dda1ccd
commit
65091012b4
10 changed files with 68 additions and 33 deletions
|
|
@ -837,6 +837,8 @@ typedef struct SDL_TouchFingerEvent
|
|||
|
||||
/**
|
||||
* Pinch event structure (event.pinch.*)
|
||||
*
|
||||
* span_(x/y) and focus_(x/y) are only available for pinch gestures on mobile devices
|
||||
*/
|
||||
typedef struct SDL_PinchFingerEvent
|
||||
{
|
||||
|
|
@ -845,6 +847,10 @@ typedef struct SDL_PinchFingerEvent
|
|||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
float scale; /**< The scale change since the last SDL_EVENT_PINCH_UPDATE. Scale < 1 is "zoom out". Scale > 1 is "zoom in". */
|
||||
SDL_WindowID windowID; /**< The window underneath the finger, if any */
|
||||
float span_x; /**< On mobile devices, the average X distance between each of the pointers forming the pinch in window coordinates. Otherwise, -1. */
|
||||
float span_y; /**< On mobile devices, the average Y distance between each of the pointers forming the pinch in window coordinates. Otherwise, -1. */
|
||||
float focus_x; /**< On mobile devices, the X coordinate of the current gesture's focal point in window coordinates. Otherwise, -1. */
|
||||
float focus_y; /**< On mobile devices, the Y coordinate of the current gesture's focal point in window coordinates. Otherwise, -1. */
|
||||
} SDL_PinchFingerEvent;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue