A structure that contains finger touch event information.
Uint32 |
type |
SDL_EVENT_FINGER_MOTION, SDL_EVENT_FINGER_DOWN, or SDL_EVENT_FINGER_UP |
Uint32 |
timestamp |
timestamp of the event |
SDL_TouchID |
touchId |
the touch device id |
SDL_FingerID |
fingerId |
the finger id |
float |
x |
the x-axis location of the touch event, normalized (0...1) |
float |
y |
the y-axis location of the touch event, normalized (0...1) |
float |
dx |
the distance moved in the x-axis, normalized (-1...1) |
float |
dy |
the distance moved in the y-axis, normalized (-1...1) |
float |
pressure |
the quantity of pressure applied, normalized (0...1) |
Uint32 |
windowID |
the window underneath the finger, if any |
SDL_TouchFingerEvent is a member of the SDL_Event union and is used when an event of type SDL_EVENT_FINGER_MOTION, SDL_EVENT_FINGER_DOWN, or SDL_EVENT_FINGER_UP is reported. You would access it through the event's tfinger
field.
This structure is available since SDL 2.0.0.
CategoryStruct, CategoryEvents