mirror of https://github.com/ppy/SDL3-CS.git
Update bindings to SDL commit 0429f5d6a36fc35b551bcc2acd4a40c2db6dab82
This commit is contained in:
parent
23e045ca14
commit
f1b7b2caf6
|
|
@ -117,12 +117,12 @@ namespace SDL
|
|||
{
|
||||
public SDL_GamepadBindingType input_type;
|
||||
|
||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L184_C5")]
|
||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L196_C5")]
|
||||
public _input_e__Union input;
|
||||
|
||||
public SDL_GamepadBindingType output_type;
|
||||
|
||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L204_C5")]
|
||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L216_C5")]
|
||||
public _output_e__Union output;
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
|
|
@ -132,11 +132,11 @@ namespace SDL
|
|||
public int button;
|
||||
|
||||
[FieldOffset(0)]
|
||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L188_C9")]
|
||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L200_C9")]
|
||||
public _axis_e__Struct axis;
|
||||
|
||||
[FieldOffset(0)]
|
||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L195_C9")]
|
||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L207_C9")]
|
||||
public _hat_e__Struct hat;
|
||||
|
||||
public partial struct _axis_e__Struct
|
||||
|
|
@ -163,7 +163,7 @@ namespace SDL
|
|||
public SDL_GamepadButton button;
|
||||
|
||||
[FieldOffset(0)]
|
||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L208_C9")]
|
||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L220_C9")]
|
||||
public _axis_e__Struct axis;
|
||||
|
||||
public partial struct _axis_e__Struct
|
||||
|
|
|
|||
|
|
@ -56,9 +56,6 @@ namespace SDL
|
|||
|
||||
public unsafe partial struct SDL_VirtualJoystickDesc
|
||||
{
|
||||
[NativeTypeName("Uint16")]
|
||||
public ushort version;
|
||||
|
||||
[NativeTypeName("Uint16")]
|
||||
public ushort type;
|
||||
|
||||
|
|
@ -314,9 +311,6 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_IPHONE_MAX_GFORCE 5.0")]
|
||||
public const double SDL_IPHONE_MAX_GFORCE = 5.0;
|
||||
|
||||
[NativeTypeName("#define SDL_VIRTUAL_JOYSTICK_DESC_VERSION 1")]
|
||||
public const int SDL_VIRTUAL_JOYSTICK_DESC_VERSION = 1;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN \"SDL.joystick.cap.mono_led\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN => "SDL.joystick.cap.mono_led"u8;
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace SDL
|
|||
{
|
||||
public static SDL_bool SDL_PointInRect([NativeTypeName("const SDL_Point *")] SDL_Point* p, [NativeTypeName("const SDL_Rect *")] SDL_Rect* r)
|
||||
{
|
||||
return ((p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? (SDL_bool)(1) : (SDL_bool)(0);
|
||||
return ((p) != null && (r) != null && (p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? (SDL_bool)(1) : (SDL_bool)(0);
|
||||
}
|
||||
|
||||
public static SDL_bool SDL_RectEmpty([NativeTypeName("const SDL_Rect *")] SDL_Rect* r)
|
||||
|
|
@ -97,7 +97,7 @@ namespace SDL
|
|||
|
||||
public static SDL_bool SDL_PointInRectFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* p, [NativeTypeName("const SDL_FRect *")] SDL_FRect* r)
|
||||
{
|
||||
return ((p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? (SDL_bool)(1) : (SDL_bool)(0);
|
||||
return ((p) != null && (r) != null && (p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? (SDL_bool)(1) : (SDL_bool)(0);
|
||||
}
|
||||
|
||||
public static SDL_bool SDL_RectEmptyFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* r)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
|
|
@ -47,15 +46,10 @@ namespace SDL
|
|||
|
||||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const wchar_t *")]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern IntPtr SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_WinRTGetFSPathUTF8", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_WinRTGetFSPath", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern byte* Unsafe_SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
|
||||
public static extern byte* Unsafe_SDL_WinRTGetFSPath(SDL_WinRT_Path pathType);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ namespace SDL
|
|||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("iOS")]
|
||||
public static extern int SDL_iPhoneSetAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("void (*)(void *)")] delegate* unmanaged[Cdecl]<IntPtr, void> callback, [NativeTypeName("void*")] IntPtr callbackParam);
|
||||
public static extern int SDL_iOSSetAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("void (*)(void *)")] delegate* unmanaged[Cdecl]<IntPtr, void> callback, [NativeTypeName("void*")] IntPtr callbackParam);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("iOS")]
|
||||
public static extern void SDL_iPhoneSetEventPump(SDL_bool enabled);
|
||||
public static extern void SDL_iOSSetEventPump(SDL_bool enabled);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("iOS")]
|
||||
|
|
|
|||
|
|
@ -49,14 +49,14 @@ namespace SDL
|
|||
public int utc_offset;
|
||||
}
|
||||
|
||||
public enum SDL_DATE_FORMAT
|
||||
public enum SDL_DateFormat
|
||||
{
|
||||
SDL_DATE_FORMAT_YYYYMMDD = 0,
|
||||
SDL_DATE_FORMAT_DDMMYYYY = 1,
|
||||
SDL_DATE_FORMAT_MMDDYYYY = 2,
|
||||
}
|
||||
|
||||
public enum SDL_TIME_FORMAT
|
||||
public enum SDL_TimeFormat
|
||||
{
|
||||
SDL_TIME_FORMAT_24HR = 0,
|
||||
SDL_TIME_FORMAT_12HR = 1,
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
public partial class SDL3
|
||||
{
|
||||
[Macro]
|
||||
public static unsafe bool SDL_QuitRequested()
|
||||
{
|
||||
SDL_PumpEvents();
|
||||
return SDL_PeepEvents(null, 0, SDL_eventaction.SDL_PEEKEVENT, SDL_EventType.SDL_EVENT_QUIT, SDL_EventType.SDL_EVENT_QUIT) > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
public static partial class SDL3
|
||||
{
|
||||
[SupportedOSPlatform("iOS")]
|
||||
[Macro]
|
||||
public static unsafe int SDL_iOSSetAnimationCallback(SDL_Window* window, int interval, delegate* unmanaged[Cdecl]<IntPtr, void> callback, IntPtr callbackParam)
|
||||
=> SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam);
|
||||
|
||||
[SupportedOSPlatform("iOS")]
|
||||
[Macro]
|
||||
public static void SDL_iOSSetEventPump(SDL_bool enabled)
|
||||
=> SDL_iPhoneSetEventPump(enabled);
|
||||
}
|
||||
}
|
||||
|
|
@ -112,7 +112,6 @@ headers = [
|
|||
add("SDL3/SDL_platform.h"),
|
||||
add("SDL3/SDL_power.h"),
|
||||
add("SDL3/SDL_properties.h"),
|
||||
add("SDL3/SDL_quit.h"),
|
||||
add("SDL3/SDL_rect.h"),
|
||||
add("SDL3/SDL_render.h"),
|
||||
add("SDL3/SDL_revision.h"),
|
||||
|
|
|
|||
Loading…
Reference in New Issue