Update SDL2 to 2.0.16
This commit is contained in:
parent
0b45535613
commit
e987a81edf
88 changed files with 9944 additions and 5114 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -64,30 +64,66 @@ typedef struct SDL_Finger
|
|||
#define SDL_MOUSE_TOUCHID ((Sint64)-1)
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* \brief Get the number of registered touch devices.
|
||||
* Get the number of registered touch devices.
|
||||
*
|
||||
* On some platforms SDL first sees the touch device if it was actually used.
|
||||
* Therefore SDL_GetNumTouchDevices() may return 0 although devices are
|
||||
* available. After using all devices at least once the number will be
|
||||
* correct.
|
||||
*
|
||||
* This was fixed for Android in SDL 2.0.1.
|
||||
*
|
||||
* \returns the number of registered touch devices.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetTouchDevice
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
|
||||
|
||||
/**
|
||||
* \brief Get the touch ID with the given index, or 0 if the index is invalid.
|
||||
* Get the touch ID with the given index.
|
||||
*
|
||||
* \param index the touch device index
|
||||
* \returns the touch ID with the given index on success or 0 if the index is
|
||||
* invalid; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetNumTouchDevices
|
||||
*/
|
||||
extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
|
||||
|
||||
/**
|
||||
* \brief Get the type of the given touch device.
|
||||
* Get the type of the given touch device.
|
||||
*/
|
||||
extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
|
||||
|
||||
/**
|
||||
* \brief Get the number of active fingers for a given touch device.
|
||||
* Get the number of active fingers for a given touch device.
|
||||
*
|
||||
* \param touchID the ID of a touch device
|
||||
* \returns the number of active fingers for a given touch device on success
|
||||
* or 0 on failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetTouchFinger
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);
|
||||
|
||||
/**
|
||||
* \brief Get the finger object of the given touch, with the given index.
|
||||
* Get the finger object for specified touch device ID and finger index.
|
||||
*
|
||||
* The returned resource is owned by SDL and should not be deallocated.
|
||||
*
|
||||
* \param touchID the ID of the requested touch device
|
||||
* \param index the index of the requested finger
|
||||
* \returns a pointer to the SDL_Finger object or NULL if no object at the
|
||||
* given ID and index could be found.
|
||||
*
|
||||
* \sa SDL_RecordGesture
|
||||
*/
|
||||
extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue