module lib.sdl2.touch

Code Map

module lib.sdl2.touch;


alias SDL_TouchID = Sint64;
alias SDL_FingerID = Sint64;

struct SDL_Finger
{
public:
	id: SDL_FingerID;
	x: f32;
	y: f32;
	pressure: f32;
}

fn SDL_TOUCH_MOUSEID() u32 { }
//! \brief Get the number of registered touch devices.
fn SDL_GetNumTouchDevices() i32;
//! \brief Get the touch ID with the given index, or 0 if the index is
//! invalid.
fn SDL_GetTouchDevice(index: i32) SDL_TouchID;
//! \brief Get the number of active fingers for a given touch device.
fn SDL_GetNumTouchFingers(touchID: SDL_TouchID) i32;
//! \brief Get the finger object of the given touch, with the given index.
fn SDL_GetTouchFinger(touchID: SDL_TouchID, index: i32) SDL_Finger*;
fn SDL_GetNumTouchDevices() i32

\brief Get the number of registered touch devices.

fn SDL_GetTouchDevice(index: i32) SDL_TouchID

\brief Get the touch ID with the given index, or 0 if the index is invalid.

fn SDL_GetNumTouchFingers(touchID: SDL_TouchID) i32

\brief Get the number of active fingers for a given touch device.

fn SDL_GetTouchFinger(touchID: SDL_TouchID, index: i32) SDL_Finger*

\brief Get the finger object of the given touch, with the given index.