sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.Touch.FunPtr

Synopsis

Documentation

sDL_GetTouchDevices :: FunPtr (Ptr CInt -> IO (Ptr SDL_TouchID)) Source #

Get a list of registered touch devices.

On some platforms SDL first sees the touch device if it was actually used. Therefore the returned list might be empty, although devices are available. After using all devices at least once the number will be correct.

count
a pointer filled in with the number of devices returned, may be NULL.
Returns
a 0 terminated array of touch device IDs or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
C declaration
SDL_GetTouchDevices, defined at SDL3/SDL_touch.h 140:43

Since: 3.2.0

sDL_GetTouchDeviceName :: FunPtr (SDL_TouchID -> IO (PtrConst CChar)) Source #

Get the touch device name as reported from the driver.

touchID
the touch device instance ID.
Returns
touch device name, or NULL on failure; call SDL_GetError() for more information.
C declaration
SDL_GetTouchDeviceName, defined at SDL3/SDL_touch.h 151:42

Since: 3.2.0

sDL_GetTouchDeviceType :: FunPtr (SDL_TouchID -> IO SDL_TouchDeviceType) Source #

Get the type of the given touch device.

touchID
the ID of a touch device.
Returns
touch device type.
C declaration
SDL_GetTouchDeviceType, defined at SDL3/SDL_touch.h 161:49

Since: 3.2.0

sDL_GetTouchFingers :: FunPtr (SDL_TouchID -> Ptr CInt -> IO (Ptr (Ptr SDL_Finger))) Source #

Get a list of active fingers for a given touch device.

touchID
the ID of a touch device.
count
a pointer filled in with the number of fingers returned, can be NULL.
Returns
a NULL terminated array of SDL_Finger pointers or NULL on failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
C declaration
SDL_GetTouchFingers, defined at SDL3/SDL_touch.h 176:43

Since: 3.2.0