NAME
SDL2::gesture - SDL Gesture Event Handling
SYNOPSIS
use SDL2 qw[:gesture];
DESCRIPTION
SDL2::gesture provides functions that allow for simple and complex gesture events. These functions may be imported by name or with the :gesture
tag.
Functions
These may be imported by name or with the :gesture
tag.
SDL_RecordGesture( ... )
Begin recording a gesture on a specified touch device or all touch devices.
If the parameter touchId
is -1
(i.e., all devices), this function will always return 1
, regardless of whether there actually are any devices.
Expected parameters include:
Returns 1
on success or 0
if the specified device could not be found.
SDL_SaveAllDollarTemplates( ... )
Save all currently loaded Dollar Gesture templates.
Expected parameters include:
dst
- a SDL2::RWops to save to
Returns the number of saved templates on success or 0
on failure; call SDL_GetError( )
for more information.
SDL_SaveDollarTemplate( ... )
Save a currently loaded Dollar Gesture template.
Expected parameters include:
gestureId
- a gesture iddst
- a SDL2::RWops to save to
Returns 1
on success or 0
on failure; call SDL_GetError( )
for more information.
SDL_LoadDollarTemplates( ... )
Load Dollar Gesture templates from a file.
Expected parameters include:
touchId
- a touch idsrc
- a SDL2::RWops to load from
Returns the number of loaded templates on success or a negative error code (or 0
) on failure; call SDL_GetError( )
for more information.
Defined Types
These are used internally.
SDL_GestureID
A signed 64-bit integer.
LICENSE
Copyright (C) Sanko Robinson.
This library is free software; you can redistribute it and/or modify it under the terms found in the Artistic License 2. Other copyrights, terms, and conditions may apply to data transmitted through this module.
AUTHOR
Sanko Robinson <sanko@cpan.org>