mirror of
https://github.com/Ryujinx/SDL2-CS.git
synced 2024-12-22 19:05:40 +00:00
commit
70af91f844
39
src/SDL2.cs
39
src/SDL2.cs
|
@ -4338,6 +4338,45 @@ namespace SDL2
|
|||
|
||||
#endregion
|
||||
|
||||
#region SDL_touch.h
|
||||
|
||||
public const uint SDL_TOUCH_MOUSEID = uint.MaxValue;
|
||||
|
||||
public struct SDL_Finger
|
||||
{
|
||||
public long id; // SDL_FingerID
|
||||
public float x;
|
||||
public float y;
|
||||
public float pressure;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the number of registered touch devices.
|
||||
*/
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int SDL_GetNumTouchDevices();
|
||||
|
||||
/**
|
||||
* \brief Get the touch ID with the given index, or 0 if the index is invalid.
|
||||
*/
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern long SDL_GetTouchDevice(int index);
|
||||
|
||||
/**
|
||||
* \brief Get the number of active fingers for a given touch device.
|
||||
*/
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int SDL_GetNumTouchFingers(long touchID);
|
||||
|
||||
/**
|
||||
* \brief Get the finger object of the given touch, with the given index.
|
||||
* Returns pointer to SDL_Finger.
|
||||
*/
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr SDL_GetTouchFinger(long touchID, int index);
|
||||
|
||||
#endregion
|
||||
|
||||
#region SDL_joystick.h
|
||||
|
||||
public const byte SDL_HAT_CENTERED = 0x00;
|
||||
|
|
Loading…
Reference in a new issue