SDL2::gesture - SDL Gesture Event Handling
use SDL2 qw[:gesture];
SDL2::gesture provides functions that allow for simple and complex gesture events. These functions may be imported by name or with the :gesture tag.
:gesture
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.
touchId
-1
1
Expected parameters include:
Returns 1 on success or 0 if the specified device could not be found.
0
SDL_SaveAllDollarTemplates( ... )
Save all currently loaded Dollar Gesture templates.
dst
Returns the number of saved templates on success or 0 on failure; call SDL_GetError( ) for more information.
SDL_GetError( )
SDL_SaveDollarTemplate( ... )
Save a currently loaded Dollar Gesture template.
gestureId
Returns 1 on success or 0 on failure; call SDL_GetError( ) for more information.
SDL_LoadDollarTemplates( ... )
Load Dollar Gesture templates from a file.
src
Returns the number of loaded templates on success or a negative error code (or 0) on failure; call SDL_GetError( ) for more information.
These are used internally.
SDL_GestureID
A signed 64-bit integer.
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.
Sanko Robinson <sanko@cpan.org>
To install SDL2::FFI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SDL2::FFI
CPAN shell
perl -MCPAN -e shell install SDL2::FFI
For more information on module installation, please visit the detailed CPAN module installation guide.