SDL_events.h

Estructura SDL_TouchFingerEvent

Una estructura que contiene información de eventos de toque de dedo.

typedef struct SDL_TouchFingerEvent
{
    Uint32 type;        /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
    SDL_TouchID touchId; /**< The touch device id */
    SDL_FingerID fingerId;
    float x;            /**< Normalized in the range 0...1 */
    float y;            /**< Normalized in the range 0...1 */
    float dx;           /**< Normalized in the range -1...1 */
    float dy;           /**< Normalized in the range -1...1 */
    float pressure;     /**< Normalized in the range 0...1 */
    Uint32 windowID;    /**< The window underneath the finger, if any */
} SDL_TouchFingerEvent;

Miembros

type
SDL_FINGERMOTION o SDL_FINGERDOWN o SDL_FINGERUP
timestamp
Marca de tiempo en milisegundos.
touchId
El identificador del dispositivo táctil.
fingerId
La identificación del dedo.
x
La ubicación en el eje x del evento táctil, normalizada (0...1).
y
La ubicación en el eje y del evento táctil, normalizada (0...1).
dx
La distancia recorrida en el eje x, normalizada (-1...1).
dy
La distancia recorrida en el eje y, normalizada (-1...1).
pressure
La cantidad de presión aplicada, normalizada (0...1).
windowID
La ventana debajo del dedo, si existe.

Observaciones

SDL_TouchFingerEvent es un miembro de la unión SDL_Event y se utiliza cuando se reporta un evento de tipo SDL_FINGERMOTION, SDL_FINGERDOWN, o SDL_FINGERUP. Se accede a través del campo tfinger del evento.