From 3daf817a016e947d2ad0998e7269613c22841767 Mon Sep 17 00:00:00 2001 From: hwsmm Date: Wed, 26 Jun 2024 01:41:00 +0900 Subject: [PATCH 1/5] Update bindings to 596c0af0f319157d748b00d369240a9177a3132f --- SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs | 20 +- SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs | 8 +- SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs | 33 +- SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs | 10 +- SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs | 12 + SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs | 28 +- SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs | 35 +- SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs | 1068 ++++++++++--------- SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs | 42 +- SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs | 4 - SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs | 33 +- SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs | 58 +- SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs | 45 +- SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs | 27 +- SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs | 7 +- SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs | 57 +- SDL3-CS/SDL3/SDL_audio.cs | 8 +- SDL3-CS/SDL3/SDL_keycode.cs | 82 +- 22 files changed, 910 insertions(+), 677 deletions(-) diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs index b42caa8..ee40b9d 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs @@ -55,13 +55,13 @@ namespace SDL public static extern byte* Unsafe_SDL_GetCurrentAudioDriver(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_AudioDeviceID* SDL_GetAudioOutputDevices(int* count); + public static extern SDL_AudioDeviceID* SDL_GetAudioPlaybackDevices(int* count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_AudioDeviceID* SDL_GetAudioCaptureDevices(int* count); + public static extern SDL_AudioDeviceID* SDL_GetAudioRecordingDevices(int* count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAudioDeviceName", ExactSpelling = true)] - [return: NativeTypeName("char *")] + [return: NativeTypeName("const char *")] public static extern byte* Unsafe_SDL_GetAudioDeviceName(SDL_AudioDeviceID devid); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] @@ -133,6 +133,12 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_ClearAudioStream(SDL_AudioStream* stream); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_PauseAudioStreamDevice(SDL_AudioStream* stream); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_ResumeAudioStreamDevice(SDL_AudioStream* stream); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_LockAudioStream(SDL_AudioStream* stream); @@ -205,10 +211,10 @@ namespace SDL [NativeTypeName("#define SDL_AUDIO_MASK_SIGNED (1u<<15)")] public const uint SDL_AUDIO_MASK_SIGNED = (1U << 15); - [NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_OUTPUT ((SDL_AudioDeviceID) 0xFFFFFFFF)")] - public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_OUTPUT = ((SDL_AudioDeviceID)(0xFFFFFFFF)); + [NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK ((SDL_AudioDeviceID) 0xFFFFFFFF)")] + public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK = ((SDL_AudioDeviceID)(0xFFFFFFFF)); - [NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_CAPTURE ((SDL_AudioDeviceID) 0xFFFFFFFE)")] - public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_CAPTURE = ((SDL_AudioDeviceID)(0xFFFFFFFE)); + [NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_RECORDING ((SDL_AudioDeviceID) 0xFFFFFFFE)")] + public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_RECORDING = ((SDL_AudioDeviceID)(0xFFFFFFFE)); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs index 2b7b5f0..96396f5 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs @@ -35,13 +35,15 @@ namespace SDL { public SDL_PixelFormatEnum format; + public SDL_Colorspace colorspace; + public int width; public int height; - public int interval_numerator; + public int framerate_numerator; - public int interval_denominator; + public int framerate_denominator; } public enum SDL_CameraPosition @@ -71,7 +73,7 @@ namespace SDL public static extern SDL_CameraSpec* SDL_GetCameraDeviceSupportedFormats(SDL_CameraDeviceID devid, int* count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetCameraDeviceName", ExactSpelling = true)] - [return: NativeTypeName("char *")] + [return: NativeTypeName("const char *")] public static extern byte* Unsafe_SDL_GetCameraDeviceName(SDL_CameraDeviceID instance_id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs index 365aa52..d24bd94 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs @@ -40,10 +40,10 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, [NativeTypeName("const char *")] byte* default_location, SDL_bool allow_many); + public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location, SDL_bool allow_many); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_ShowSaveFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, [NativeTypeName("const char *")] byte* default_location); + public static extern void SDL_ShowSaveFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ShowOpenFolderDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, SDL_bool allow_many); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs index b584c00..911e05f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs @@ -46,9 +46,8 @@ namespace SDL SDL_EVENT_DISPLAY_REMOVED, SDL_EVENT_DISPLAY_MOVED, SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED, - SDL_EVENT_DISPLAY_HDR_STATE_CHANGED, SDL_EVENT_DISPLAY_FIRST = SDL_EVENT_DISPLAY_ORIENTATION, - SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_HDR_STATE_CHANGED, + SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED, SDL_EVENT_WINDOW_SHOWN = 0x202, SDL_EVENT_WINDOW_HIDDEN, SDL_EVENT_WINDOW_EXPOSED, @@ -74,6 +73,7 @@ namespace SDL SDL_EVENT_WINDOW_DESTROYED, SDL_EVENT_WINDOW_PEN_ENTER, SDL_EVENT_WINDOW_PEN_LEAVE, + SDL_EVENT_WINDOW_HDR_STATE_CHANGED, SDL_EVENT_WINDOW_FIRST = SDL_EVENT_WINDOW_SHOWN, SDL_EVENT_WINDOW_LAST = SDL_EVENT_WINDOW_PEN_LEAVE, SDL_EVENT_KEY_DOWN = 0x300, @@ -214,19 +214,20 @@ namespace SDL public SDL_KeyboardID which; + public SDL_Scancode scancode; + + public SDL_Keycode key; + + public SDL_Keymod mod; + + [NativeTypeName("Uint16")] + public ushort raw; + [NativeTypeName("Uint8")] public byte state; [NativeTypeName("Uint8")] public byte repeat; - - [NativeTypeName("Uint8")] - public byte padding2; - - [NativeTypeName("Uint8")] - public byte padding3; - - public SDL_Keysym keysym; } public unsafe partial struct SDL_TextEditingEvent @@ -241,7 +242,7 @@ namespace SDL public SDL_WindowID windowID; - [NativeTypeName("char *")] + [NativeTypeName("const char *")] public byte* text; [NativeTypeName("Sint32")] @@ -263,7 +264,7 @@ namespace SDL public SDL_WindowID windowID; - [NativeTypeName("char *")] + [NativeTypeName("const char *")] public byte* text; } @@ -294,7 +295,7 @@ namespace SDL public SDL_MouseID which; - [NativeTypeName("Uint32")] + [NativeTypeName("SDL_MouseButtonFlags")] public uint state; public float x; @@ -639,7 +640,7 @@ namespace SDL public SDL_AudioDeviceID which; [NativeTypeName("Uint8")] - public byte iscapture; + public byte recording; [NativeTypeName("Uint8")] public byte padding1; @@ -818,10 +819,10 @@ namespace SDL public float y; - [NativeTypeName("char *")] + [NativeTypeName("const char *")] public byte* source; - [NativeTypeName("char *")] + [NativeTypeName("const char *")] public byte* data; } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs index 99b1439..c43cc0a 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs @@ -117,12 +117,12 @@ namespace SDL { public SDL_GamepadBindingType input_type; - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L229_C5")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L245_C5")] public _input_e__Union input; public SDL_GamepadBindingType output_type; - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L249_C5")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L265_C5")] public _output_e__Union output; [StructLayout(LayoutKind.Explicit)] @@ -132,11 +132,11 @@ namespace SDL public int button; [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L233_C9")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L249_C9")] public _axis_e__Struct axis; [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L240_C9")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L256_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_L253_C9")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L269_C9")] public _axis_e__Struct axis; public partial struct _axis_e__Struct diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs index e5a4dce..ba1059a 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs @@ -380,6 +380,9 @@ namespace SDL [NativeTypeName("#define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES \"SDL_JOYSTICK_ZERO_CENTERED_DEVICES\"")] public static ReadOnlySpan SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES => "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"u8; + [NativeTypeName("#define SDL_HINT_KEYCODE_OPTIONS \"SDL_KEYCODE_OPTIONS\"")] + public static ReadOnlySpan SDL_HINT_KEYCODE_OPTIONS => "SDL_KEYCODE_OPTIONS"u8; + [NativeTypeName("#define SDL_HINT_KMSDRM_DEVICE_INDEX \"SDL_KMSDRM_DEVICE_INDEX\"")] public static ReadOnlySpan SDL_HINT_KMSDRM_DEVICE_INDEX => "SDL_KMSDRM_DEVICE_INDEX"u8; @@ -431,6 +434,12 @@ namespace SDL [NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION \"SDL_MOUSE_RELATIVE_WARP_MOTION\"")] public static ReadOnlySpan SDL_HINT_MOUSE_RELATIVE_WARP_MOTION => "SDL_MOUSE_RELATIVE_WARP_MOTION"u8; + [NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE \"SDL_MOUSE_RELATIVE_CURSOR_VISIBLE\"")] + public static ReadOnlySpan SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE => "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"u8; + + [NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL \"SDL_MOUSE_RELATIVE_CLIP_INTERVAL\"")] + public static ReadOnlySpan SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL => "SDL_MOUSE_RELATIVE_CLIP_INTERVAL"u8; + [NativeTypeName("#define SDL_HINT_MOUSE_TOUCH_EVENTS \"SDL_MOUSE_TOUCH_EVENTS\"")] public static ReadOnlySpan SDL_HINT_MOUSE_TOUCH_EVENTS => "SDL_MOUSE_TOUCH_EVENTS"u8; @@ -632,6 +641,9 @@ namespace SDL [NativeTypeName("#define SDL_HINT_WINDOWS_USE_D3D9EX \"SDL_WINDOWS_USE_D3D9EX\"")] public static ReadOnlySpan SDL_HINT_WINDOWS_USE_D3D9EX => "SDL_WINDOWS_USE_D3D9EX"u8; + [NativeTypeName("#define SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE \"SDL_WINDOWS_ERASE_BACKGROUND_MODE\"")] + public static ReadOnlySpan SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE => "SDL_WINDOWS_ERASE_BACKGROUND_MODE"u8; + [NativeTypeName("#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON \"SDL_WINRT_HANDLE_BACK_BUTTON\"")] public static ReadOnlySpan SDL_HINT_WINRT_HANDLE_BACK_BUTTON => "SDL_WINRT_HANDLE_BACK_BUTTON"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs index abf3a55..9cd8436 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs @@ -38,13 +38,20 @@ namespace SDL SDL_IO_STATUS_WRITEONLY, } + public enum SDL_IOWhence + { + SDL_IO_SEEK_SET, + SDL_IO_SEEK_CUR, + SDL_IO_SEEK_END, + } + public unsafe partial struct SDL_IOStreamInterface { [NativeTypeName("Sint64 (*)(void *)")] public delegate* unmanaged[Cdecl] size; - [NativeTypeName("Sint64 (*)(void *, Sint64, int)")] - public delegate* unmanaged[Cdecl] seek; + [NativeTypeName("Sint64 (*)(void *, Sint64, SDL_IOWhence)")] + public delegate* unmanaged[Cdecl] seek; [NativeTypeName("size_t (*)(void *, void *, size_t, SDL_IOStatus *)")] public delegate* unmanaged[Cdecl] read; @@ -92,7 +99,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Sint64")] - public static extern long SDL_SeekIO(SDL_IOStream* context, [NativeTypeName("Sint64")] long offset, int whence); + public static extern long SDL_SeekIO(SDL_IOStream* context, [NativeTypeName("Sint64")] long offset, SDL_IOWhence whence); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Sint64")] @@ -125,6 +132,9 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_ReadU8(SDL_IOStream* src, [NativeTypeName("Uint8 *")] byte* value); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_bool SDL_ReadS8(SDL_IOStream* src, [NativeTypeName("Sint8 *")] sbyte* value); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_ReadU16LE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); @@ -164,6 +174,9 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_WriteU8(SDL_IOStream* dst, [NativeTypeName("Uint8")] byte value); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_bool SDL_WriteS8(SDL_IOStream* dst, [NativeTypeName("Sint8")] sbyte value); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_WriteU16LE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); @@ -214,14 +227,5 @@ namespace SDL [NativeTypeName("#define SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER \"SDL.iostream.dynamic.chunksize\"")] public static ReadOnlySpan SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER => "SDL.iostream.dynamic.chunksize"u8; - - [NativeTypeName("#define SDL_IO_SEEK_SET 0")] - public const int SDL_IO_SEEK_SET = 0; - - [NativeTypeName("#define SDL_IO_SEEK_CUR 1")] - public const int SDL_IO_SEEK_CUR = 1; - - [NativeTypeName("#define SDL_IO_SEEK_END 2")] - public const int SDL_IO_SEEK_END = 2; } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs index 367466c..b9eb53b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs @@ -27,18 +27,6 @@ using System.Runtime.InteropServices; namespace SDL { - public partial struct SDL_Keysym - { - public SDL_Scancode scancode; - - public SDL_Keycode sym; - - public SDL_Keymod mod; - - [NativeTypeName("Uint16")] - public ushort unused; - } - public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] @@ -68,10 +56,19 @@ namespace SDL public static extern void SDL_SetModState(SDL_Keymod modstate); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode); + public static extern SDL_Keycode SDL_GetDefaultKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key); + public static extern SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Scancode SDL_GetDefaultScancodeFromKey(SDL_Keycode key, SDL_Keymod* modstate); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key, SDL_Keymod* modstate); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_SetScancodeName(SDL_Scancode scancode, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetScancodeName", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -88,19 +85,19 @@ namespace SDL public static extern SDL_Keycode SDL_GetKeyFromName([NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_StartTextInput(); + public static extern int SDL_StartTextInput(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_TextInputActive(); + public static extern SDL_bool SDL_TextInputActive(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_StopTextInput(); + public static extern int SDL_StopTextInput(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_ClearComposition(); + public static extern int SDL_ClearComposition(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_SetTextInputRect([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + public static extern int SDL_SetTextInputRect(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_HasScreenKeyboardSupport(); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs index 173cf61..9e0ac35 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs @@ -23,8 +23,6 @@ 3. This notice may not be removed or altered from any source distribution. */ -using static SDL.SDL_Scancode; - namespace SDL { public static partial class SDL3 @@ -32,737 +30,827 @@ namespace SDL [NativeTypeName("#define SDLK_SCANCODE_MASK (1u<<30)")] public const uint SDLK_SCANCODE_MASK = (1U << 30); - [NativeTypeName("#define SDLK_UNKNOWN 0")] - public const int SDLK_UNKNOWN = 0; + [NativeTypeName("#define SDLK_UNKNOWN 0x00000000u")] + public const uint SDLK_UNKNOWN = 0x00000000U; - [NativeTypeName("#define SDLK_RETURN '\r'")] - public const byte SDLK_RETURN = (byte)('\r'); + [NativeTypeName("#define SDLK_RETURN 0x0000000du")] + public const uint SDLK_RETURN = 0x0000000dU; - [NativeTypeName("#define SDLK_ESCAPE '\\x1B'")] - public const byte SDLK_ESCAPE = (byte)(''); + [NativeTypeName("#define SDLK_ESCAPE 0x0000001bu")] + public const uint SDLK_ESCAPE = 0x0000001bU; - [NativeTypeName("#define SDLK_BACKSPACE '\\b'")] - public const byte SDLK_BACKSPACE = (byte)(''); + [NativeTypeName("#define SDLK_BACKSPACE 0x00000008u")] + public const uint SDLK_BACKSPACE = 0x00000008U; - [NativeTypeName("#define SDLK_TAB '\t'")] - public const byte SDLK_TAB = (byte)('\t'); + [NativeTypeName("#define SDLK_TAB 0x00000009u")] + public const uint SDLK_TAB = 0x00000009U; - [NativeTypeName("#define SDLK_SPACE ' '")] - public const byte SDLK_SPACE = (byte)(' '); + [NativeTypeName("#define SDLK_SPACE 0x00000020u")] + public const uint SDLK_SPACE = 0x00000020U; - [NativeTypeName("#define SDLK_EXCLAIM '!'")] - public const byte SDLK_EXCLAIM = (byte)('!'); + [NativeTypeName("#define SDLK_EXCLAIM 0x00000021u")] + public const uint SDLK_EXCLAIM = 0x00000021U; - [NativeTypeName("#define SDLK_DBLAPOSTROPHE '\"'")] - public const byte SDLK_DBLAPOSTROPHE = (byte)('"'); + [NativeTypeName("#define SDLK_DBLAPOSTROPHE 0x00000022u")] + public const uint SDLK_DBLAPOSTROPHE = 0x00000022U; - [NativeTypeName("#define SDLK_HASH '#'")] - public const byte SDLK_HASH = (byte)('#'); + [NativeTypeName("#define SDLK_HASH 0x00000023u")] + public const uint SDLK_HASH = 0x00000023U; - [NativeTypeName("#define SDLK_PERCENT '%'")] - public const byte SDLK_PERCENT = (byte)('%'); + [NativeTypeName("#define SDLK_DOLLAR 0x00000024u")] + public const uint SDLK_DOLLAR = 0x00000024U; - [NativeTypeName("#define SDLK_DOLLAR '$'")] - public const byte SDLK_DOLLAR = (byte)('$'); + [NativeTypeName("#define SDLK_PERCENT 0x00000025u")] + public const uint SDLK_PERCENT = 0x00000025U; - [NativeTypeName("#define SDLK_AMPERSAND '&'")] - public const byte SDLK_AMPERSAND = (byte)('&'); + [NativeTypeName("#define SDLK_AMPERSAND 0x00000026u")] + public const uint SDLK_AMPERSAND = 0x00000026U; - [NativeTypeName("#define SDLK_APOSTROPHE '\\''")] - public const byte SDLK_APOSTROPHE = (byte)('\''); + [NativeTypeName("#define SDLK_APOSTROPHE 0x00000027u")] + public const uint SDLK_APOSTROPHE = 0x00000027U; - [NativeTypeName("#define SDLK_LEFTPAREN '('")] - public const byte SDLK_LEFTPAREN = (byte)('('); + [NativeTypeName("#define SDLK_LEFTPAREN 0x00000028u")] + public const uint SDLK_LEFTPAREN = 0x00000028U; - [NativeTypeName("#define SDLK_RIGHTPAREN ')'")] - public const byte SDLK_RIGHTPAREN = (byte)(')'); + [NativeTypeName("#define SDLK_RIGHTPAREN 0x00000029u")] + public const uint SDLK_RIGHTPAREN = 0x00000029U; - [NativeTypeName("#define SDLK_ASTERISK '*'")] - public const byte SDLK_ASTERISK = (byte)('*'); + [NativeTypeName("#define SDLK_ASTERISK 0x0000002au")] + public const uint SDLK_ASTERISK = 0x0000002aU; - [NativeTypeName("#define SDLK_PLUS '+'")] - public const byte SDLK_PLUS = (byte)('+'); + [NativeTypeName("#define SDLK_PLUS 0x0000002bu")] + public const uint SDLK_PLUS = 0x0000002bU; - [NativeTypeName("#define SDLK_COMMA ','")] - public const byte SDLK_COMMA = (byte)(','); + [NativeTypeName("#define SDLK_COMMA 0x0000002cu")] + public const uint SDLK_COMMA = 0x0000002cU; - [NativeTypeName("#define SDLK_MINUS '-'")] - public const byte SDLK_MINUS = (byte)('-'); + [NativeTypeName("#define SDLK_MINUS 0x0000002du")] + public const uint SDLK_MINUS = 0x0000002dU; - [NativeTypeName("#define SDLK_PERIOD '.'")] - public const byte SDLK_PERIOD = (byte)('.'); + [NativeTypeName("#define SDLK_PERIOD 0x0000002eu")] + public const uint SDLK_PERIOD = 0x0000002eU; - [NativeTypeName("#define SDLK_SLASH '/'")] - public const byte SDLK_SLASH = (byte)('/'); + [NativeTypeName("#define SDLK_SLASH 0x0000002fu")] + public const uint SDLK_SLASH = 0x0000002fU; - [NativeTypeName("#define SDLK_0 '0'")] - public const byte SDLK_0 = (byte)('0'); + [NativeTypeName("#define SDLK_0 0x00000030u")] + public const uint SDLK_0 = 0x00000030U; - [NativeTypeName("#define SDLK_1 '1'")] - public const byte SDLK_1 = (byte)('1'); + [NativeTypeName("#define SDLK_1 0x00000031u")] + public const uint SDLK_1 = 0x00000031U; - [NativeTypeName("#define SDLK_2 '2'")] - public const byte SDLK_2 = (byte)('2'); + [NativeTypeName("#define SDLK_2 0x00000032u")] + public const uint SDLK_2 = 0x00000032U; - [NativeTypeName("#define SDLK_3 '3'")] - public const byte SDLK_3 = (byte)('3'); + [NativeTypeName("#define SDLK_3 0x00000033u")] + public const uint SDLK_3 = 0x00000033U; - [NativeTypeName("#define SDLK_4 '4'")] - public const byte SDLK_4 = (byte)('4'); + [NativeTypeName("#define SDLK_4 0x00000034u")] + public const uint SDLK_4 = 0x00000034U; - [NativeTypeName("#define SDLK_5 '5'")] - public const byte SDLK_5 = (byte)('5'); + [NativeTypeName("#define SDLK_5 0x00000035u")] + public const uint SDLK_5 = 0x00000035U; - [NativeTypeName("#define SDLK_6 '6'")] - public const byte SDLK_6 = (byte)('6'); + [NativeTypeName("#define SDLK_6 0x00000036u")] + public const uint SDLK_6 = 0x00000036U; - [NativeTypeName("#define SDLK_7 '7'")] - public const byte SDLK_7 = (byte)('7'); + [NativeTypeName("#define SDLK_7 0x00000037u")] + public const uint SDLK_7 = 0x00000037U; - [NativeTypeName("#define SDLK_8 '8'")] - public const byte SDLK_8 = (byte)('8'); + [NativeTypeName("#define SDLK_8 0x00000038u")] + public const uint SDLK_8 = 0x00000038U; - [NativeTypeName("#define SDLK_9 '9'")] - public const byte SDLK_9 = (byte)('9'); + [NativeTypeName("#define SDLK_9 0x00000039u")] + public const uint SDLK_9 = 0x00000039U; - [NativeTypeName("#define SDLK_COLON ':'")] - public const byte SDLK_COLON = (byte)(':'); + [NativeTypeName("#define SDLK_COLON 0x0000003au")] + public const uint SDLK_COLON = 0x0000003aU; - [NativeTypeName("#define SDLK_SEMICOLON ';'")] - public const byte SDLK_SEMICOLON = (byte)(';'); + [NativeTypeName("#define SDLK_SEMICOLON 0x0000003bu")] + public const uint SDLK_SEMICOLON = 0x0000003bU; - [NativeTypeName("#define SDLK_LESS '<'")] - public const byte SDLK_LESS = (byte)('<'); + [NativeTypeName("#define SDLK_LESS 0x0000003cu")] + public const uint SDLK_LESS = 0x0000003cU; - [NativeTypeName("#define SDLK_EQUALS '='")] - public const byte SDLK_EQUALS = (byte)('='); + [NativeTypeName("#define SDLK_EQUALS 0x0000003du")] + public const uint SDLK_EQUALS = 0x0000003dU; - [NativeTypeName("#define SDLK_GREATER '>'")] - public const byte SDLK_GREATER = (byte)('>'); + [NativeTypeName("#define SDLK_GREATER 0x0000003eu")] + public const uint SDLK_GREATER = 0x0000003eU; - [NativeTypeName("#define SDLK_QUESTION '?'")] - public const byte SDLK_QUESTION = (byte)('?'); + [NativeTypeName("#define SDLK_QUESTION 0x0000003fu")] + public const uint SDLK_QUESTION = 0x0000003fU; - [NativeTypeName("#define SDLK_AT '@'")] - public const byte SDLK_AT = (byte)('@'); + [NativeTypeName("#define SDLK_AT 0x00000040u")] + public const uint SDLK_AT = 0x00000040U; - [NativeTypeName("#define SDLK_LEFTBRACKET '['")] - public const byte SDLK_LEFTBRACKET = (byte)('['); + [NativeTypeName("#define SDLK_A 0x00000041u")] + public const uint SDLK_A = 0x00000041U; - [NativeTypeName("#define SDLK_BACKSLASH '\\'")] - public const byte SDLK_BACKSLASH = (byte)('\\'); + [NativeTypeName("#define SDLK_B 0x00000042u")] + public const uint SDLK_B = 0x00000042U; - [NativeTypeName("#define SDLK_RIGHTBRACKET ']'")] - public const byte SDLK_RIGHTBRACKET = (byte)(']'); + [NativeTypeName("#define SDLK_C 0x00000043u")] + public const uint SDLK_C = 0x00000043U; - [NativeTypeName("#define SDLK_CARET '^'")] - public const byte SDLK_CARET = (byte)('^'); + [NativeTypeName("#define SDLK_D 0x00000044u")] + public const uint SDLK_D = 0x00000044U; - [NativeTypeName("#define SDLK_UNDERSCORE '_'")] - public const byte SDLK_UNDERSCORE = (byte)('_'); + [NativeTypeName("#define SDLK_E 0x00000045u")] + public const uint SDLK_E = 0x00000045U; - [NativeTypeName("#define SDLK_GRAVE '`'")] - public const byte SDLK_GRAVE = (byte)('`'); + [NativeTypeName("#define SDLK_F 0x00000046u")] + public const uint SDLK_F = 0x00000046U; - [NativeTypeName("#define SDLK_a 'a'")] - public const byte SDLK_a = (byte)('a'); + [NativeTypeName("#define SDLK_G 0x00000047u")] + public const uint SDLK_G = 0x00000047U; - [NativeTypeName("#define SDLK_b 'b'")] - public const byte SDLK_b = (byte)('b'); + [NativeTypeName("#define SDLK_H 0x00000048u")] + public const uint SDLK_H = 0x00000048U; - [NativeTypeName("#define SDLK_c 'c'")] - public const byte SDLK_c = (byte)('c'); + [NativeTypeName("#define SDLK_I 0x00000049u")] + public const uint SDLK_I = 0x00000049U; - [NativeTypeName("#define SDLK_d 'd'")] - public const byte SDLK_d = (byte)('d'); + [NativeTypeName("#define SDLK_J 0x0000004au")] + public const uint SDLK_J = 0x0000004aU; - [NativeTypeName("#define SDLK_e 'e'")] - public const byte SDLK_e = (byte)('e'); + [NativeTypeName("#define SDLK_K 0x0000004bu")] + public const uint SDLK_K = 0x0000004bU; - [NativeTypeName("#define SDLK_f 'f'")] - public const byte SDLK_f = (byte)('f'); + [NativeTypeName("#define SDLK_L 0x0000004cu")] + public const uint SDLK_L = 0x0000004cU; - [NativeTypeName("#define SDLK_g 'g'")] - public const byte SDLK_g = (byte)('g'); + [NativeTypeName("#define SDLK_M 0x0000004du")] + public const uint SDLK_M = 0x0000004dU; - [NativeTypeName("#define SDLK_h 'h'")] - public const byte SDLK_h = (byte)('h'); + [NativeTypeName("#define SDLK_N 0x0000004eu")] + public const uint SDLK_N = 0x0000004eU; - [NativeTypeName("#define SDLK_i 'i'")] - public const byte SDLK_i = (byte)('i'); + [NativeTypeName("#define SDLK_O 0x0000004fu")] + public const uint SDLK_O = 0x0000004fU; - [NativeTypeName("#define SDLK_j 'j'")] - public const byte SDLK_j = (byte)('j'); + [NativeTypeName("#define SDLK_P 0x00000050u")] + public const uint SDLK_P = 0x00000050U; - [NativeTypeName("#define SDLK_k 'k'")] - public const byte SDLK_k = (byte)('k'); + [NativeTypeName("#define SDLK_Q 0x00000051u")] + public const uint SDLK_Q = 0x00000051U; - [NativeTypeName("#define SDLK_l 'l'")] - public const byte SDLK_l = (byte)('l'); + [NativeTypeName("#define SDLK_R 0x00000052u")] + public const uint SDLK_R = 0x00000052U; - [NativeTypeName("#define SDLK_m 'm'")] - public const byte SDLK_m = (byte)('m'); + [NativeTypeName("#define SDLK_S 0x00000053u")] + public const uint SDLK_S = 0x00000053U; - [NativeTypeName("#define SDLK_n 'n'")] - public const byte SDLK_n = (byte)('n'); + [NativeTypeName("#define SDLK_T 0x00000054u")] + public const uint SDLK_T = 0x00000054U; - [NativeTypeName("#define SDLK_o 'o'")] - public const byte SDLK_o = (byte)('o'); + [NativeTypeName("#define SDLK_U 0x00000055u")] + public const uint SDLK_U = 0x00000055U; - [NativeTypeName("#define SDLK_p 'p'")] - public const byte SDLK_p = (byte)('p'); + [NativeTypeName("#define SDLK_V 0x00000056u")] + public const uint SDLK_V = 0x00000056U; - [NativeTypeName("#define SDLK_q 'q'")] - public const byte SDLK_q = (byte)('q'); + [NativeTypeName("#define SDLK_W 0x00000057u")] + public const uint SDLK_W = 0x00000057U; - [NativeTypeName("#define SDLK_r 'r'")] - public const byte SDLK_r = (byte)('r'); + [NativeTypeName("#define SDLK_X 0x00000058u")] + public const uint SDLK_X = 0x00000058U; - [NativeTypeName("#define SDLK_s 's'")] - public const byte SDLK_s = (byte)('s'); + [NativeTypeName("#define SDLK_Y 0x00000059u")] + public const uint SDLK_Y = 0x00000059U; - [NativeTypeName("#define SDLK_t 't'")] - public const byte SDLK_t = (byte)('t'); + [NativeTypeName("#define SDLK_Z 0x0000005au")] + public const uint SDLK_Z = 0x0000005aU; - [NativeTypeName("#define SDLK_u 'u'")] - public const byte SDLK_u = (byte)('u'); + [NativeTypeName("#define SDLK_LEFTBRACKET 0x0000005bu")] + public const uint SDLK_LEFTBRACKET = 0x0000005bU; - [NativeTypeName("#define SDLK_v 'v'")] - public const byte SDLK_v = (byte)('v'); + [NativeTypeName("#define SDLK_BACKSLASH 0x0000005cu")] + public const uint SDLK_BACKSLASH = 0x0000005cU; - [NativeTypeName("#define SDLK_w 'w'")] - public const byte SDLK_w = (byte)('w'); + [NativeTypeName("#define SDLK_RIGHTBRACKET 0x0000005du")] + public const uint SDLK_RIGHTBRACKET = 0x0000005dU; - [NativeTypeName("#define SDLK_x 'x'")] - public const byte SDLK_x = (byte)('x'); + [NativeTypeName("#define SDLK_CARET 0x0000005eu")] + public const uint SDLK_CARET = 0x0000005eU; - [NativeTypeName("#define SDLK_y 'y'")] - public const byte SDLK_y = (byte)('y'); + [NativeTypeName("#define SDLK_UNDERSCORE 0x0000005fu")] + public const uint SDLK_UNDERSCORE = 0x0000005fU; - [NativeTypeName("#define SDLK_z 'z'")] - public const byte SDLK_z = (byte)('z'); + [NativeTypeName("#define SDLK_GRAVE 0x00000060u")] + public const uint SDLK_GRAVE = 0x00000060U; - [NativeTypeName("#define SDLK_CAPSLOCK SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK)")] - public const uint SDLK_CAPSLOCK = ((uint)(SDL_SCANCODE_CAPSLOCK) | (1U << 30)); + [NativeTypeName("#define SDLK_a 0x00000061u")] + public const uint SDLK_a = 0x00000061U; - [NativeTypeName("#define SDLK_F1 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1)")] - public const uint SDLK_F1 = ((uint)(SDL_SCANCODE_F1) | (1U << 30)); + [NativeTypeName("#define SDLK_b 0x00000062u")] + public const uint SDLK_b = 0x00000062U; - [NativeTypeName("#define SDLK_F2 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2)")] - public const uint SDLK_F2 = ((uint)(SDL_SCANCODE_F2) | (1U << 30)); + [NativeTypeName("#define SDLK_c 0x00000063u")] + public const uint SDLK_c = 0x00000063U; - [NativeTypeName("#define SDLK_F3 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3)")] - public const uint SDLK_F3 = ((uint)(SDL_SCANCODE_F3) | (1U << 30)); + [NativeTypeName("#define SDLK_d 0x00000064u")] + public const uint SDLK_d = 0x00000064U; - [NativeTypeName("#define SDLK_F4 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4)")] - public const uint SDLK_F4 = ((uint)(SDL_SCANCODE_F4) | (1U << 30)); + [NativeTypeName("#define SDLK_e 0x00000065u")] + public const uint SDLK_e = 0x00000065U; - [NativeTypeName("#define SDLK_F5 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5)")] - public const uint SDLK_F5 = ((uint)(SDL_SCANCODE_F5) | (1U << 30)); + [NativeTypeName("#define SDLK_f 0x00000066u")] + public const uint SDLK_f = 0x00000066U; - [NativeTypeName("#define SDLK_F6 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6)")] - public const uint SDLK_F6 = ((uint)(SDL_SCANCODE_F6) | (1U << 30)); + [NativeTypeName("#define SDLK_g 0x00000067u")] + public const uint SDLK_g = 0x00000067U; - [NativeTypeName("#define SDLK_F7 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7)")] - public const uint SDLK_F7 = ((uint)(SDL_SCANCODE_F7) | (1U << 30)); + [NativeTypeName("#define SDLK_h 0x00000068u")] + public const uint SDLK_h = 0x00000068U; - [NativeTypeName("#define SDLK_F8 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8)")] - public const uint SDLK_F8 = ((uint)(SDL_SCANCODE_F8) | (1U << 30)); + [NativeTypeName("#define SDLK_i 0x00000069u")] + public const uint SDLK_i = 0x00000069U; - [NativeTypeName("#define SDLK_F9 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9)")] - public const uint SDLK_F9 = ((uint)(SDL_SCANCODE_F9) | (1U << 30)); + [NativeTypeName("#define SDLK_j 0x0000006au")] + public const uint SDLK_j = 0x0000006aU; - [NativeTypeName("#define SDLK_F10 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10)")] - public const uint SDLK_F10 = ((uint)(SDL_SCANCODE_F10) | (1U << 30)); + [NativeTypeName("#define SDLK_k 0x0000006bu")] + public const uint SDLK_k = 0x0000006bU; - [NativeTypeName("#define SDLK_F11 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11)")] - public const uint SDLK_F11 = ((uint)(SDL_SCANCODE_F11) | (1U << 30)); + [NativeTypeName("#define SDLK_l 0x0000006cu")] + public const uint SDLK_l = 0x0000006cU; - [NativeTypeName("#define SDLK_F12 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12)")] - public const uint SDLK_F12 = ((uint)(SDL_SCANCODE_F12) | (1U << 30)); + [NativeTypeName("#define SDLK_m 0x0000006du")] + public const uint SDLK_m = 0x0000006dU; - [NativeTypeName("#define SDLK_PRINTSCREEN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN)")] - public const uint SDLK_PRINTSCREEN = ((uint)(SDL_SCANCODE_PRINTSCREEN) | (1U << 30)); + [NativeTypeName("#define SDLK_n 0x0000006eu")] + public const uint SDLK_n = 0x0000006eU; - [NativeTypeName("#define SDLK_SCROLLLOCK SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK)")] - public const uint SDLK_SCROLLLOCK = ((uint)(SDL_SCANCODE_SCROLLLOCK) | (1U << 30)); + [NativeTypeName("#define SDLK_o 0x0000006fu")] + public const uint SDLK_o = 0x0000006fU; - [NativeTypeName("#define SDLK_PAUSE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE)")] - public const uint SDLK_PAUSE = ((uint)(SDL_SCANCODE_PAUSE) | (1U << 30)); + [NativeTypeName("#define SDLK_p 0x00000070u")] + public const uint SDLK_p = 0x00000070U; - [NativeTypeName("#define SDLK_INSERT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT)")] - public const uint SDLK_INSERT = ((uint)(SDL_SCANCODE_INSERT) | (1U << 30)); + [NativeTypeName("#define SDLK_q 0x00000071u")] + public const uint SDLK_q = 0x00000071U; - [NativeTypeName("#define SDLK_HOME SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME)")] - public const uint SDLK_HOME = ((uint)(SDL_SCANCODE_HOME) | (1U << 30)); + [NativeTypeName("#define SDLK_r 0x00000072u")] + public const uint SDLK_r = 0x00000072U; - [NativeTypeName("#define SDLK_PAGEUP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP)")] - public const uint SDLK_PAGEUP = ((uint)(SDL_SCANCODE_PAGEUP) | (1U << 30)); + [NativeTypeName("#define SDLK_s 0x00000073u")] + public const uint SDLK_s = 0x00000073U; - [NativeTypeName("#define SDLK_DELETE '\\x7F'")] - public const byte SDLK_DELETE = (byte)(''); + [NativeTypeName("#define SDLK_t 0x00000074u")] + public const uint SDLK_t = 0x00000074U; - [NativeTypeName("#define SDLK_END SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END)")] - public const uint SDLK_END = ((uint)(SDL_SCANCODE_END) | (1U << 30)); + [NativeTypeName("#define SDLK_u 0x00000075u")] + public const uint SDLK_u = 0x00000075U; - [NativeTypeName("#define SDLK_PAGEDOWN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN)")] - public const uint SDLK_PAGEDOWN = ((uint)(SDL_SCANCODE_PAGEDOWN) | (1U << 30)); + [NativeTypeName("#define SDLK_v 0x00000076u")] + public const uint SDLK_v = 0x00000076U; - [NativeTypeName("#define SDLK_RIGHT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT)")] - public const uint SDLK_RIGHT = ((uint)(SDL_SCANCODE_RIGHT) | (1U << 30)); + [NativeTypeName("#define SDLK_w 0x00000077u")] + public const uint SDLK_w = 0x00000077U; - [NativeTypeName("#define SDLK_LEFT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT)")] - public const uint SDLK_LEFT = ((uint)(SDL_SCANCODE_LEFT) | (1U << 30)); + [NativeTypeName("#define SDLK_x 0x00000078u")] + public const uint SDLK_x = 0x00000078U; - [NativeTypeName("#define SDLK_DOWN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN)")] - public const uint SDLK_DOWN = ((uint)(SDL_SCANCODE_DOWN) | (1U << 30)); + [NativeTypeName("#define SDLK_y 0x00000079u")] + public const uint SDLK_y = 0x00000079U; - [NativeTypeName("#define SDLK_UP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP)")] - public const uint SDLK_UP = ((uint)(SDL_SCANCODE_UP) | (1U << 30)); + [NativeTypeName("#define SDLK_z 0x0000007au")] + public const uint SDLK_z = 0x0000007aU; - [NativeTypeName("#define SDLK_NUMLOCKCLEAR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR)")] - public const uint SDLK_NUMLOCKCLEAR = ((uint)(SDL_SCANCODE_NUMLOCKCLEAR) | (1U << 30)); + [NativeTypeName("#define SDLK_LEFTBRACE 0x0000007bu")] + public const uint SDLK_LEFTBRACE = 0x0000007bU; - [NativeTypeName("#define SDLK_KP_DIVIDE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE)")] - public const uint SDLK_KP_DIVIDE = ((uint)(SDL_SCANCODE_KP_DIVIDE) | (1U << 30)); + [NativeTypeName("#define SDLK_PIPE 0x0000007cu")] + public const uint SDLK_PIPE = 0x0000007cU; - [NativeTypeName("#define SDLK_KP_MULTIPLY SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY)")] - public const uint SDLK_KP_MULTIPLY = ((uint)(SDL_SCANCODE_KP_MULTIPLY) | (1U << 30)); + [NativeTypeName("#define SDLK_RIGHTBRACE 0x0000007du")] + public const uint SDLK_RIGHTBRACE = 0x0000007dU; - [NativeTypeName("#define SDLK_KP_MINUS SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS)")] - public const uint SDLK_KP_MINUS = ((uint)(SDL_SCANCODE_KP_MINUS) | (1U << 30)); + [NativeTypeName("#define SDLK_TILDE 0x0000007eu")] + public const uint SDLK_TILDE = 0x0000007eU; - [NativeTypeName("#define SDLK_KP_PLUS SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS)")] - public const uint SDLK_KP_PLUS = ((uint)(SDL_SCANCODE_KP_PLUS) | (1U << 30)); + [NativeTypeName("#define SDLK_DELETE 0x0000007fu")] + public const uint SDLK_DELETE = 0x0000007fU; - [NativeTypeName("#define SDLK_KP_ENTER SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER)")] - public const uint SDLK_KP_ENTER = ((uint)(SDL_SCANCODE_KP_ENTER) | (1U << 30)); + [NativeTypeName("#define SDLK_CAPSLOCK 0x40000039u")] + public const uint SDLK_CAPSLOCK = 0x40000039U; - [NativeTypeName("#define SDLK_KP_1 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1)")] - public const uint SDLK_KP_1 = ((uint)(SDL_SCANCODE_KP_1) | (1U << 30)); + [NativeTypeName("#define SDLK_F1 0x4000003au")] + public const uint SDLK_F1 = 0x4000003aU; - [NativeTypeName("#define SDLK_KP_2 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2)")] - public const uint SDLK_KP_2 = ((uint)(SDL_SCANCODE_KP_2) | (1U << 30)); + [NativeTypeName("#define SDLK_F2 0x4000003bu")] + public const uint SDLK_F2 = 0x4000003bU; - [NativeTypeName("#define SDLK_KP_3 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3)")] - public const uint SDLK_KP_3 = ((uint)(SDL_SCANCODE_KP_3) | (1U << 30)); + [NativeTypeName("#define SDLK_F3 0x4000003cu")] + public const uint SDLK_F3 = 0x4000003cU; - [NativeTypeName("#define SDLK_KP_4 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4)")] - public const uint SDLK_KP_4 = ((uint)(SDL_SCANCODE_KP_4) | (1U << 30)); + [NativeTypeName("#define SDLK_F4 0x4000003du")] + public const uint SDLK_F4 = 0x4000003dU; - [NativeTypeName("#define SDLK_KP_5 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5)")] - public const uint SDLK_KP_5 = ((uint)(SDL_SCANCODE_KP_5) | (1U << 30)); + [NativeTypeName("#define SDLK_F5 0x4000003eu")] + public const uint SDLK_F5 = 0x4000003eU; - [NativeTypeName("#define SDLK_KP_6 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6)")] - public const uint SDLK_KP_6 = ((uint)(SDL_SCANCODE_KP_6) | (1U << 30)); + [NativeTypeName("#define SDLK_F6 0x4000003fu")] + public const uint SDLK_F6 = 0x4000003fU; - [NativeTypeName("#define SDLK_KP_7 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7)")] - public const uint SDLK_KP_7 = ((uint)(SDL_SCANCODE_KP_7) | (1U << 30)); + [NativeTypeName("#define SDLK_F7 0x40000040u")] + public const uint SDLK_F7 = 0x40000040U; - [NativeTypeName("#define SDLK_KP_8 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8)")] - public const uint SDLK_KP_8 = ((uint)(SDL_SCANCODE_KP_8) | (1U << 30)); + [NativeTypeName("#define SDLK_F8 0x40000041u")] + public const uint SDLK_F8 = 0x40000041U; - [NativeTypeName("#define SDLK_KP_9 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9)")] - public const uint SDLK_KP_9 = ((uint)(SDL_SCANCODE_KP_9) | (1U << 30)); + [NativeTypeName("#define SDLK_F9 0x40000042u")] + public const uint SDLK_F9 = 0x40000042U; - [NativeTypeName("#define SDLK_KP_0 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0)")] - public const uint SDLK_KP_0 = ((uint)(SDL_SCANCODE_KP_0) | (1U << 30)); + [NativeTypeName("#define SDLK_F10 0x40000043u")] + public const uint SDLK_F10 = 0x40000043U; - [NativeTypeName("#define SDLK_KP_PERIOD SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD)")] - public const uint SDLK_KP_PERIOD = ((uint)(SDL_SCANCODE_KP_PERIOD) | (1U << 30)); + [NativeTypeName("#define SDLK_F11 0x40000044u")] + public const uint SDLK_F11 = 0x40000044U; - [NativeTypeName("#define SDLK_APPLICATION SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION)")] - public const uint SDLK_APPLICATION = ((uint)(SDL_SCANCODE_APPLICATION) | (1U << 30)); + [NativeTypeName("#define SDLK_F12 0x40000045u")] + public const uint SDLK_F12 = 0x40000045U; - [NativeTypeName("#define SDLK_POWER SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER)")] - public const uint SDLK_POWER = ((uint)(SDL_SCANCODE_POWER) | (1U << 30)); + [NativeTypeName("#define SDLK_PRINTSCREEN 0x40000046u")] + public const uint SDLK_PRINTSCREEN = 0x40000046U; - [NativeTypeName("#define SDLK_KP_EQUALS SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS)")] - public const uint SDLK_KP_EQUALS = ((uint)(SDL_SCANCODE_KP_EQUALS) | (1U << 30)); + [NativeTypeName("#define SDLK_SCROLLLOCK 0x40000047u")] + public const uint SDLK_SCROLLLOCK = 0x40000047U; - [NativeTypeName("#define SDLK_F13 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13)")] - public const uint SDLK_F13 = ((uint)(SDL_SCANCODE_F13) | (1U << 30)); + [NativeTypeName("#define SDLK_PAUSE 0x40000048u")] + public const uint SDLK_PAUSE = 0x40000048U; - [NativeTypeName("#define SDLK_F14 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14)")] - public const uint SDLK_F14 = ((uint)(SDL_SCANCODE_F14) | (1U << 30)); + [NativeTypeName("#define SDLK_INSERT 0x40000049u")] + public const uint SDLK_INSERT = 0x40000049U; - [NativeTypeName("#define SDLK_F15 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15)")] - public const uint SDLK_F15 = ((uint)(SDL_SCANCODE_F15) | (1U << 30)); + [NativeTypeName("#define SDLK_HOME 0x4000004au")] + public const uint SDLK_HOME = 0x4000004aU; - [NativeTypeName("#define SDLK_F16 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16)")] - public const uint SDLK_F16 = ((uint)(SDL_SCANCODE_F16) | (1U << 30)); + [NativeTypeName("#define SDLK_PAGEUP 0x4000004bu")] + public const uint SDLK_PAGEUP = 0x4000004bU; - [NativeTypeName("#define SDLK_F17 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17)")] - public const uint SDLK_F17 = ((uint)(SDL_SCANCODE_F17) | (1U << 30)); + [NativeTypeName("#define SDLK_END 0x4000004du")] + public const uint SDLK_END = 0x4000004dU; - [NativeTypeName("#define SDLK_F18 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18)")] - public const uint SDLK_F18 = ((uint)(SDL_SCANCODE_F18) | (1U << 30)); + [NativeTypeName("#define SDLK_PAGEDOWN 0x4000004eu")] + public const uint SDLK_PAGEDOWN = 0x4000004eU; - [NativeTypeName("#define SDLK_F19 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19)")] - public const uint SDLK_F19 = ((uint)(SDL_SCANCODE_F19) | (1U << 30)); + [NativeTypeName("#define SDLK_RIGHT 0x4000004fu")] + public const uint SDLK_RIGHT = 0x4000004fU; - [NativeTypeName("#define SDLK_F20 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20)")] - public const uint SDLK_F20 = ((uint)(SDL_SCANCODE_F20) | (1U << 30)); + [NativeTypeName("#define SDLK_LEFT 0x40000050u")] + public const uint SDLK_LEFT = 0x40000050U; - [NativeTypeName("#define SDLK_F21 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21)")] - public const uint SDLK_F21 = ((uint)(SDL_SCANCODE_F21) | (1U << 30)); + [NativeTypeName("#define SDLK_DOWN 0x40000051u")] + public const uint SDLK_DOWN = 0x40000051U; - [NativeTypeName("#define SDLK_F22 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22)")] - public const uint SDLK_F22 = ((uint)(SDL_SCANCODE_F22) | (1U << 30)); + [NativeTypeName("#define SDLK_UP 0x40000052u")] + public const uint SDLK_UP = 0x40000052U; - [NativeTypeName("#define SDLK_F23 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23)")] - public const uint SDLK_F23 = ((uint)(SDL_SCANCODE_F23) | (1U << 30)); + [NativeTypeName("#define SDLK_NUMLOCKCLEAR 0x40000053u")] + public const uint SDLK_NUMLOCKCLEAR = 0x40000053U; - [NativeTypeName("#define SDLK_F24 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24)")] - public const uint SDLK_F24 = ((uint)(SDL_SCANCODE_F24) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_DIVIDE 0x40000054u")] + public const uint SDLK_KP_DIVIDE = 0x40000054U; - [NativeTypeName("#define SDLK_EXECUTE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE)")] - public const uint SDLK_EXECUTE = ((uint)(SDL_SCANCODE_EXECUTE) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_MULTIPLY 0x40000055u")] + public const uint SDLK_KP_MULTIPLY = 0x40000055U; - [NativeTypeName("#define SDLK_HELP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP)")] - public const uint SDLK_HELP = ((uint)(SDL_SCANCODE_HELP) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_MINUS 0x40000056u")] + public const uint SDLK_KP_MINUS = 0x40000056U; - [NativeTypeName("#define SDLK_MENU SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU)")] - public const uint SDLK_MENU = ((uint)(SDL_SCANCODE_MENU) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_PLUS 0x40000057u")] + public const uint SDLK_KP_PLUS = 0x40000057U; - [NativeTypeName("#define SDLK_SELECT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT)")] - public const uint SDLK_SELECT = ((uint)(SDL_SCANCODE_SELECT) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_ENTER 0x40000058u")] + public const uint SDLK_KP_ENTER = 0x40000058U; - [NativeTypeName("#define SDLK_STOP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP)")] - public const uint SDLK_STOP = ((uint)(SDL_SCANCODE_STOP) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_1 0x40000059u")] + public const uint SDLK_KP_1 = 0x40000059U; - [NativeTypeName("#define SDLK_AGAIN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN)")] - public const uint SDLK_AGAIN = ((uint)(SDL_SCANCODE_AGAIN) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_2 0x4000005au")] + public const uint SDLK_KP_2 = 0x4000005aU; - [NativeTypeName("#define SDLK_UNDO SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO)")] - public const uint SDLK_UNDO = ((uint)(SDL_SCANCODE_UNDO) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_3 0x4000005bu")] + public const uint SDLK_KP_3 = 0x4000005bU; - [NativeTypeName("#define SDLK_CUT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT)")] - public const uint SDLK_CUT = ((uint)(SDL_SCANCODE_CUT) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_4 0x4000005cu")] + public const uint SDLK_KP_4 = 0x4000005cU; - [NativeTypeName("#define SDLK_COPY SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY)")] - public const uint SDLK_COPY = ((uint)(SDL_SCANCODE_COPY) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_5 0x4000005du")] + public const uint SDLK_KP_5 = 0x4000005dU; - [NativeTypeName("#define SDLK_PASTE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE)")] - public const uint SDLK_PASTE = ((uint)(SDL_SCANCODE_PASTE) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_6 0x4000005eu")] + public const uint SDLK_KP_6 = 0x4000005eU; - [NativeTypeName("#define SDLK_FIND SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND)")] - public const uint SDLK_FIND = ((uint)(SDL_SCANCODE_FIND) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_7 0x4000005fu")] + public const uint SDLK_KP_7 = 0x4000005fU; - [NativeTypeName("#define SDLK_MUTE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE)")] - public const uint SDLK_MUTE = ((uint)(SDL_SCANCODE_MUTE) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_8 0x40000060u")] + public const uint SDLK_KP_8 = 0x40000060U; - [NativeTypeName("#define SDLK_VOLUMEUP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP)")] - public const uint SDLK_VOLUMEUP = ((uint)(SDL_SCANCODE_VOLUMEUP) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_9 0x40000061u")] + public const uint SDLK_KP_9 = 0x40000061U; - [NativeTypeName("#define SDLK_VOLUMEDOWN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN)")] - public const uint SDLK_VOLUMEDOWN = ((uint)(SDL_SCANCODE_VOLUMEDOWN) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_0 0x40000062u")] + public const uint SDLK_KP_0 = 0x40000062U; - [NativeTypeName("#define SDLK_KP_COMMA SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA)")] - public const uint SDLK_KP_COMMA = ((uint)(SDL_SCANCODE_KP_COMMA) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_PERIOD 0x40000063u")] + public const uint SDLK_KP_PERIOD = 0x40000063U; - [NativeTypeName("#define SDLK_KP_EQUALSAS400 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400)")] - public const uint SDLK_KP_EQUALSAS400 = ((uint)(SDL_SCANCODE_KP_EQUALSAS400) | (1U << 30)); + [NativeTypeName("#define SDLK_APPLICATION 0x40000065u")] + public const uint SDLK_APPLICATION = 0x40000065U; - [NativeTypeName("#define SDLK_ALTERASE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE)")] - public const uint SDLK_ALTERASE = ((uint)(SDL_SCANCODE_ALTERASE) | (1U << 30)); + [NativeTypeName("#define SDLK_POWER 0x40000066u")] + public const uint SDLK_POWER = 0x40000066U; - [NativeTypeName("#define SDLK_SYSREQ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ)")] - public const uint SDLK_SYSREQ = ((uint)(SDL_SCANCODE_SYSREQ) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_EQUALS 0x40000067u")] + public const uint SDLK_KP_EQUALS = 0x40000067U; - [NativeTypeName("#define SDLK_CANCEL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL)")] - public const uint SDLK_CANCEL = ((uint)(SDL_SCANCODE_CANCEL) | (1U << 30)); + [NativeTypeName("#define SDLK_F13 0x40000068u")] + public const uint SDLK_F13 = 0x40000068U; - [NativeTypeName("#define SDLK_CLEAR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR)")] - public const uint SDLK_CLEAR = ((uint)(SDL_SCANCODE_CLEAR) | (1U << 30)); + [NativeTypeName("#define SDLK_F14 0x40000069u")] + public const uint SDLK_F14 = 0x40000069U; - [NativeTypeName("#define SDLK_PRIOR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR)")] - public const uint SDLK_PRIOR = ((uint)(SDL_SCANCODE_PRIOR) | (1U << 30)); + [NativeTypeName("#define SDLK_F15 0x4000006au")] + public const uint SDLK_F15 = 0x4000006aU; - [NativeTypeName("#define SDLK_RETURN2 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2)")] - public const uint SDLK_RETURN2 = ((uint)(SDL_SCANCODE_RETURN2) | (1U << 30)); + [NativeTypeName("#define SDLK_F16 0x4000006bu")] + public const uint SDLK_F16 = 0x4000006bU; - [NativeTypeName("#define SDLK_SEPARATOR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR)")] - public const uint SDLK_SEPARATOR = ((uint)(SDL_SCANCODE_SEPARATOR) | (1U << 30)); + [NativeTypeName("#define SDLK_F17 0x4000006cu")] + public const uint SDLK_F17 = 0x4000006cU; - [NativeTypeName("#define SDLK_OUT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT)")] - public const uint SDLK_OUT = ((uint)(SDL_SCANCODE_OUT) | (1U << 30)); + [NativeTypeName("#define SDLK_F18 0x4000006du")] + public const uint SDLK_F18 = 0x4000006dU; - [NativeTypeName("#define SDLK_OPER SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER)")] - public const uint SDLK_OPER = ((uint)(SDL_SCANCODE_OPER) | (1U << 30)); + [NativeTypeName("#define SDLK_F19 0x4000006eu")] + public const uint SDLK_F19 = 0x4000006eU; - [NativeTypeName("#define SDLK_CLEARAGAIN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN)")] - public const uint SDLK_CLEARAGAIN = ((uint)(SDL_SCANCODE_CLEARAGAIN) | (1U << 30)); + [NativeTypeName("#define SDLK_F20 0x4000006fu")] + public const uint SDLK_F20 = 0x4000006fU; - [NativeTypeName("#define SDLK_CRSEL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL)")] - public const uint SDLK_CRSEL = ((uint)(SDL_SCANCODE_CRSEL) | (1U << 30)); + [NativeTypeName("#define SDLK_F21 0x40000070u")] + public const uint SDLK_F21 = 0x40000070U; - [NativeTypeName("#define SDLK_EXSEL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL)")] - public const uint SDLK_EXSEL = ((uint)(SDL_SCANCODE_EXSEL) | (1U << 30)); + [NativeTypeName("#define SDLK_F22 0x40000071u")] + public const uint SDLK_F22 = 0x40000071U; - [NativeTypeName("#define SDLK_KP_00 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00)")] - public const uint SDLK_KP_00 = ((uint)(SDL_SCANCODE_KP_00) | (1U << 30)); + [NativeTypeName("#define SDLK_F23 0x40000072u")] + public const uint SDLK_F23 = 0x40000072U; - [NativeTypeName("#define SDLK_KP_000 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000)")] - public const uint SDLK_KP_000 = ((uint)(SDL_SCANCODE_KP_000) | (1U << 30)); + [NativeTypeName("#define SDLK_F24 0x40000073u")] + public const uint SDLK_F24 = 0x40000073U; - [NativeTypeName("#define SDLK_THOUSANDSSEPARATOR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR)")] - public const uint SDLK_THOUSANDSSEPARATOR = ((uint)(SDL_SCANCODE_THOUSANDSSEPARATOR) | (1U << 30)); + [NativeTypeName("#define SDLK_EXECUTE 0x40000074u")] + public const uint SDLK_EXECUTE = 0x40000074U; - [NativeTypeName("#define SDLK_DECIMALSEPARATOR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR)")] - public const uint SDLK_DECIMALSEPARATOR = ((uint)(SDL_SCANCODE_DECIMALSEPARATOR) | (1U << 30)); + [NativeTypeName("#define SDLK_HELP 0x40000075u")] + public const uint SDLK_HELP = 0x40000075U; - [NativeTypeName("#define SDLK_CURRENCYUNIT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT)")] - public const uint SDLK_CURRENCYUNIT = ((uint)(SDL_SCANCODE_CURRENCYUNIT) | (1U << 30)); + [NativeTypeName("#define SDLK_MENU 0x40000076u")] + public const uint SDLK_MENU = 0x40000076U; - [NativeTypeName("#define SDLK_CURRENCYSUBUNIT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT)")] - public const uint SDLK_CURRENCYSUBUNIT = ((uint)(SDL_SCANCODE_CURRENCYSUBUNIT) | (1U << 30)); + [NativeTypeName("#define SDLK_SELECT 0x40000077u")] + public const uint SDLK_SELECT = 0x40000077U; - [NativeTypeName("#define SDLK_KP_LEFTPAREN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN)")] - public const uint SDLK_KP_LEFTPAREN = ((uint)(SDL_SCANCODE_KP_LEFTPAREN) | (1U << 30)); + [NativeTypeName("#define SDLK_STOP 0x40000078u")] + public const uint SDLK_STOP = 0x40000078U; - [NativeTypeName("#define SDLK_KP_RIGHTPAREN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN)")] - public const uint SDLK_KP_RIGHTPAREN = ((uint)(SDL_SCANCODE_KP_RIGHTPAREN) | (1U << 30)); + [NativeTypeName("#define SDLK_AGAIN 0x40000079u")] + public const uint SDLK_AGAIN = 0x40000079U; - [NativeTypeName("#define SDLK_KP_LEFTBRACE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE)")] - public const uint SDLK_KP_LEFTBRACE = ((uint)(SDL_SCANCODE_KP_LEFTBRACE) | (1U << 30)); + [NativeTypeName("#define SDLK_UNDO 0x4000007au")] + public const uint SDLK_UNDO = 0x4000007aU; - [NativeTypeName("#define SDLK_KP_RIGHTBRACE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE)")] - public const uint SDLK_KP_RIGHTBRACE = ((uint)(SDL_SCANCODE_KP_RIGHTBRACE) | (1U << 30)); + [NativeTypeName("#define SDLK_CUT 0x4000007bu")] + public const uint SDLK_CUT = 0x4000007bU; - [NativeTypeName("#define SDLK_KP_TAB SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB)")] - public const uint SDLK_KP_TAB = ((uint)(SDL_SCANCODE_KP_TAB) | (1U << 30)); + [NativeTypeName("#define SDLK_COPY 0x4000007cu")] + public const uint SDLK_COPY = 0x4000007cU; - [NativeTypeName("#define SDLK_KP_BACKSPACE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE)")] - public const uint SDLK_KP_BACKSPACE = ((uint)(SDL_SCANCODE_KP_BACKSPACE) | (1U << 30)); + [NativeTypeName("#define SDLK_PASTE 0x4000007du")] + public const uint SDLK_PASTE = 0x4000007dU; - [NativeTypeName("#define SDLK_KP_A SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A)")] - public const uint SDLK_KP_A = ((uint)(SDL_SCANCODE_KP_A) | (1U << 30)); + [NativeTypeName("#define SDLK_FIND 0x4000007eu")] + public const uint SDLK_FIND = 0x4000007eU; - [NativeTypeName("#define SDLK_KP_B SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B)")] - public const uint SDLK_KP_B = ((uint)(SDL_SCANCODE_KP_B) | (1U << 30)); + [NativeTypeName("#define SDLK_MUTE 0x4000007fu")] + public const uint SDLK_MUTE = 0x4000007fU; - [NativeTypeName("#define SDLK_KP_C SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C)")] - public const uint SDLK_KP_C = ((uint)(SDL_SCANCODE_KP_C) | (1U << 30)); + [NativeTypeName("#define SDLK_VOLUMEUP 0x40000080u")] + public const uint SDLK_VOLUMEUP = 0x40000080U; - [NativeTypeName("#define SDLK_KP_D SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D)")] - public const uint SDLK_KP_D = ((uint)(SDL_SCANCODE_KP_D) | (1U << 30)); + [NativeTypeName("#define SDLK_VOLUMEDOWN 0x40000081u")] + public const uint SDLK_VOLUMEDOWN = 0x40000081U; - [NativeTypeName("#define SDLK_KP_E SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E)")] - public const uint SDLK_KP_E = ((uint)(SDL_SCANCODE_KP_E) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_COMMA 0x40000085u")] + public const uint SDLK_KP_COMMA = 0x40000085U; - [NativeTypeName("#define SDLK_KP_F SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F)")] - public const uint SDLK_KP_F = ((uint)(SDL_SCANCODE_KP_F) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_EQUALSAS400 0x40000086u")] + public const uint SDLK_KP_EQUALSAS400 = 0x40000086U; - [NativeTypeName("#define SDLK_KP_XOR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR)")] - public const uint SDLK_KP_XOR = ((uint)(SDL_SCANCODE_KP_XOR) | (1U << 30)); + [NativeTypeName("#define SDLK_ALTERASE 0x40000099u")] + public const uint SDLK_ALTERASE = 0x40000099U; - [NativeTypeName("#define SDLK_KP_POWER SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER)")] - public const uint SDLK_KP_POWER = ((uint)(SDL_SCANCODE_KP_POWER) | (1U << 30)); + [NativeTypeName("#define SDLK_SYSREQ 0x4000009au")] + public const uint SDLK_SYSREQ = 0x4000009aU; - [NativeTypeName("#define SDLK_KP_PERCENT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT)")] - public const uint SDLK_KP_PERCENT = ((uint)(SDL_SCANCODE_KP_PERCENT) | (1U << 30)); + [NativeTypeName("#define SDLK_CANCEL 0x4000009bu")] + public const uint SDLK_CANCEL = 0x4000009bU; - [NativeTypeName("#define SDLK_KP_LESS SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS)")] - public const uint SDLK_KP_LESS = ((uint)(SDL_SCANCODE_KP_LESS) | (1U << 30)); + [NativeTypeName("#define SDLK_CLEAR 0x4000009cu")] + public const uint SDLK_CLEAR = 0x4000009cU; - [NativeTypeName("#define SDLK_KP_GREATER SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER)")] - public const uint SDLK_KP_GREATER = ((uint)(SDL_SCANCODE_KP_GREATER) | (1U << 30)); + [NativeTypeName("#define SDLK_PRIOR 0x4000009du")] + public const uint SDLK_PRIOR = 0x4000009dU; - [NativeTypeName("#define SDLK_KP_AMPERSAND SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND)")] - public const uint SDLK_KP_AMPERSAND = ((uint)(SDL_SCANCODE_KP_AMPERSAND) | (1U << 30)); + [NativeTypeName("#define SDLK_RETURN2 0x4000009eu")] + public const uint SDLK_RETURN2 = 0x4000009eU; - [NativeTypeName("#define SDLK_KP_DBLAMPERSAND SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND)")] - public const uint SDLK_KP_DBLAMPERSAND = ((uint)(SDL_SCANCODE_KP_DBLAMPERSAND) | (1U << 30)); + [NativeTypeName("#define SDLK_SEPARATOR 0x4000009fu")] + public const uint SDLK_SEPARATOR = 0x4000009fU; - [NativeTypeName("#define SDLK_KP_VERTICALBAR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR)")] - public const uint SDLK_KP_VERTICALBAR = ((uint)(SDL_SCANCODE_KP_VERTICALBAR) | (1U << 30)); + [NativeTypeName("#define SDLK_OUT 0x400000a0u")] + public const uint SDLK_OUT = 0x400000a0U; - [NativeTypeName("#define SDLK_KP_DBLVERTICALBAR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR)")] - public const uint SDLK_KP_DBLVERTICALBAR = ((uint)(SDL_SCANCODE_KP_DBLVERTICALBAR) | (1U << 30)); + [NativeTypeName("#define SDLK_OPER 0x400000a1u")] + public const uint SDLK_OPER = 0x400000a1U; - [NativeTypeName("#define SDLK_KP_COLON SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON)")] - public const uint SDLK_KP_COLON = ((uint)(SDL_SCANCODE_KP_COLON) | (1U << 30)); + [NativeTypeName("#define SDLK_CLEARAGAIN 0x400000a2u")] + public const uint SDLK_CLEARAGAIN = 0x400000a2U; - [NativeTypeName("#define SDLK_KP_HASH SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH)")] - public const uint SDLK_KP_HASH = ((uint)(SDL_SCANCODE_KP_HASH) | (1U << 30)); + [NativeTypeName("#define SDLK_CRSEL 0x400000a3u")] + public const uint SDLK_CRSEL = 0x400000a3U; - [NativeTypeName("#define SDLK_KP_SPACE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE)")] - public const uint SDLK_KP_SPACE = ((uint)(SDL_SCANCODE_KP_SPACE) | (1U << 30)); + [NativeTypeName("#define SDLK_EXSEL 0x400000a4u")] + public const uint SDLK_EXSEL = 0x400000a4U; - [NativeTypeName("#define SDLK_KP_AT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT)")] - public const uint SDLK_KP_AT = ((uint)(SDL_SCANCODE_KP_AT) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_00 0x400000b0u")] + public const uint SDLK_KP_00 = 0x400000b0U; - [NativeTypeName("#define SDLK_KP_EXCLAM SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM)")] - public const uint SDLK_KP_EXCLAM = ((uint)(SDL_SCANCODE_KP_EXCLAM) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_000 0x400000b1u")] + public const uint SDLK_KP_000 = 0x400000b1U; - [NativeTypeName("#define SDLK_KP_MEMSTORE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE)")] - public const uint SDLK_KP_MEMSTORE = ((uint)(SDL_SCANCODE_KP_MEMSTORE) | (1U << 30)); + [NativeTypeName("#define SDLK_THOUSANDSSEPARATOR 0x400000b2u")] + public const uint SDLK_THOUSANDSSEPARATOR = 0x400000b2U; - [NativeTypeName("#define SDLK_KP_MEMRECALL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL)")] - public const uint SDLK_KP_MEMRECALL = ((uint)(SDL_SCANCODE_KP_MEMRECALL) | (1U << 30)); + [NativeTypeName("#define SDLK_DECIMALSEPARATOR 0x400000b3u")] + public const uint SDLK_DECIMALSEPARATOR = 0x400000b3U; - [NativeTypeName("#define SDLK_KP_MEMCLEAR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR)")] - public const uint SDLK_KP_MEMCLEAR = ((uint)(SDL_SCANCODE_KP_MEMCLEAR) | (1U << 30)); + [NativeTypeName("#define SDLK_CURRENCYUNIT 0x400000b4u")] + public const uint SDLK_CURRENCYUNIT = 0x400000b4U; - [NativeTypeName("#define SDLK_KP_MEMADD SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD)")] - public const uint SDLK_KP_MEMADD = ((uint)(SDL_SCANCODE_KP_MEMADD) | (1U << 30)); + [NativeTypeName("#define SDLK_CURRENCYSUBUNIT 0x400000b5u")] + public const uint SDLK_CURRENCYSUBUNIT = 0x400000b5U; - [NativeTypeName("#define SDLK_KP_MEMSUBTRACT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT)")] - public const uint SDLK_KP_MEMSUBTRACT = ((uint)(SDL_SCANCODE_KP_MEMSUBTRACT) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_LEFTPAREN 0x400000b6u")] + public const uint SDLK_KP_LEFTPAREN = 0x400000b6U; - [NativeTypeName("#define SDLK_KP_MEMMULTIPLY SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY)")] - public const uint SDLK_KP_MEMMULTIPLY = ((uint)(SDL_SCANCODE_KP_MEMMULTIPLY) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_RIGHTPAREN 0x400000b7u")] + public const uint SDLK_KP_RIGHTPAREN = 0x400000b7U; - [NativeTypeName("#define SDLK_KP_MEMDIVIDE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE)")] - public const uint SDLK_KP_MEMDIVIDE = ((uint)(SDL_SCANCODE_KP_MEMDIVIDE) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_LEFTBRACE 0x400000b8u")] + public const uint SDLK_KP_LEFTBRACE = 0x400000b8U; - [NativeTypeName("#define SDLK_KP_PLUSMINUS SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS)")] - public const uint SDLK_KP_PLUSMINUS = ((uint)(SDL_SCANCODE_KP_PLUSMINUS) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_RIGHTBRACE 0x400000b9u")] + public const uint SDLK_KP_RIGHTBRACE = 0x400000b9U; - [NativeTypeName("#define SDLK_KP_CLEAR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR)")] - public const uint SDLK_KP_CLEAR = ((uint)(SDL_SCANCODE_KP_CLEAR) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_TAB 0x400000bau")] + public const uint SDLK_KP_TAB = 0x400000baU; - [NativeTypeName("#define SDLK_KP_CLEARENTRY SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY)")] - public const uint SDLK_KP_CLEARENTRY = ((uint)(SDL_SCANCODE_KP_CLEARENTRY) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_BACKSPACE 0x400000bbu")] + public const uint SDLK_KP_BACKSPACE = 0x400000bbU; - [NativeTypeName("#define SDLK_KP_BINARY SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY)")] - public const uint SDLK_KP_BINARY = ((uint)(SDL_SCANCODE_KP_BINARY) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_A 0x400000bcu")] + public const uint SDLK_KP_A = 0x400000bcU; - [NativeTypeName("#define SDLK_KP_OCTAL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL)")] - public const uint SDLK_KP_OCTAL = ((uint)(SDL_SCANCODE_KP_OCTAL) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_B 0x400000bdu")] + public const uint SDLK_KP_B = 0x400000bdU; - [NativeTypeName("#define SDLK_KP_DECIMAL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL)")] - public const uint SDLK_KP_DECIMAL = ((uint)(SDL_SCANCODE_KP_DECIMAL) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_C 0x400000beu")] + public const uint SDLK_KP_C = 0x400000beU; - [NativeTypeName("#define SDLK_KP_HEXADECIMAL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL)")] - public const uint SDLK_KP_HEXADECIMAL = ((uint)(SDL_SCANCODE_KP_HEXADECIMAL) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_D 0x400000bfu")] + public const uint SDLK_KP_D = 0x400000bfU; - [NativeTypeName("#define SDLK_LCTRL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL)")] - public const uint SDLK_LCTRL = ((uint)(SDL_SCANCODE_LCTRL) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_E 0x400000c0u")] + public const uint SDLK_KP_E = 0x400000c0U; - [NativeTypeName("#define SDLK_LSHIFT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT)")] - public const uint SDLK_LSHIFT = ((uint)(SDL_SCANCODE_LSHIFT) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_F 0x400000c1u")] + public const uint SDLK_KP_F = 0x400000c1U; - [NativeTypeName("#define SDLK_LALT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT)")] - public const uint SDLK_LALT = ((uint)(SDL_SCANCODE_LALT) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_XOR 0x400000c2u")] + public const uint SDLK_KP_XOR = 0x400000c2U; - [NativeTypeName("#define SDLK_LGUI SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI)")] - public const uint SDLK_LGUI = ((uint)(SDL_SCANCODE_LGUI) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_POWER 0x400000c3u")] + public const uint SDLK_KP_POWER = 0x400000c3U; - [NativeTypeName("#define SDLK_RCTRL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL)")] - public const uint SDLK_RCTRL = ((uint)(SDL_SCANCODE_RCTRL) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_PERCENT 0x400000c4u")] + public const uint SDLK_KP_PERCENT = 0x400000c4U; - [NativeTypeName("#define SDLK_RSHIFT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT)")] - public const uint SDLK_RSHIFT = ((uint)(SDL_SCANCODE_RSHIFT) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_LESS 0x400000c5u")] + public const uint SDLK_KP_LESS = 0x400000c5U; - [NativeTypeName("#define SDLK_RALT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT)")] - public const uint SDLK_RALT = ((uint)(SDL_SCANCODE_RALT) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_GREATER 0x400000c6u")] + public const uint SDLK_KP_GREATER = 0x400000c6U; - [NativeTypeName("#define SDLK_RGUI SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI)")] - public const uint SDLK_RGUI = ((uint)(SDL_SCANCODE_RGUI) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_AMPERSAND 0x400000c7u")] + public const uint SDLK_KP_AMPERSAND = 0x400000c7U; - [NativeTypeName("#define SDLK_MODE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE)")] - public const uint SDLK_MODE = ((uint)(SDL_SCANCODE_MODE) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_DBLAMPERSAND 0x400000c8u")] + public const uint SDLK_KP_DBLAMPERSAND = 0x400000c8U; - [NativeTypeName("#define SDLK_AUDIONEXT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT)")] - public const uint SDLK_AUDIONEXT = ((uint)(SDL_SCANCODE_AUDIONEXT) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_VERTICALBAR 0x400000c9u")] + public const uint SDLK_KP_VERTICALBAR = 0x400000c9U; - [NativeTypeName("#define SDLK_AUDIOPREV SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV)")] - public const uint SDLK_AUDIOPREV = ((uint)(SDL_SCANCODE_AUDIOPREV) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_DBLVERTICALBAR 0x400000cau")] + public const uint SDLK_KP_DBLVERTICALBAR = 0x400000caU; - [NativeTypeName("#define SDLK_AUDIOSTOP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP)")] - public const uint SDLK_AUDIOSTOP = ((uint)(SDL_SCANCODE_AUDIOSTOP) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_COLON 0x400000cbu")] + public const uint SDLK_KP_COLON = 0x400000cbU; - [NativeTypeName("#define SDLK_AUDIOPLAY SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY)")] - public const uint SDLK_AUDIOPLAY = ((uint)(SDL_SCANCODE_AUDIOPLAY) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_HASH 0x400000ccu")] + public const uint SDLK_KP_HASH = 0x400000ccU; - [NativeTypeName("#define SDLK_AUDIOMUTE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE)")] - public const uint SDLK_AUDIOMUTE = ((uint)(SDL_SCANCODE_AUDIOMUTE) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_SPACE 0x400000cdu")] + public const uint SDLK_KP_SPACE = 0x400000cdU; - [NativeTypeName("#define SDLK_MEDIASELECT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT)")] - public const uint SDLK_MEDIASELECT = ((uint)(SDL_SCANCODE_MEDIASELECT) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_AT 0x400000ceu")] + public const uint SDLK_KP_AT = 0x400000ceU; - [NativeTypeName("#define SDLK_WWW SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW)")] - public const uint SDLK_WWW = ((uint)(SDL_SCANCODE_WWW) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_EXCLAM 0x400000cfu")] + public const uint SDLK_KP_EXCLAM = 0x400000cfU; - [NativeTypeName("#define SDLK_MAIL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL)")] - public const uint SDLK_MAIL = ((uint)(SDL_SCANCODE_MAIL) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_MEMSTORE 0x400000d0u")] + public const uint SDLK_KP_MEMSTORE = 0x400000d0U; - [NativeTypeName("#define SDLK_CALCULATOR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR)")] - public const uint SDLK_CALCULATOR = ((uint)(SDL_SCANCODE_CALCULATOR) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_MEMRECALL 0x400000d1u")] + public const uint SDLK_KP_MEMRECALL = 0x400000d1U; - [NativeTypeName("#define SDLK_COMPUTER SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER)")] - public const uint SDLK_COMPUTER = ((uint)(SDL_SCANCODE_COMPUTER) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_MEMCLEAR 0x400000d2u")] + public const uint SDLK_KP_MEMCLEAR = 0x400000d2U; - [NativeTypeName("#define SDLK_AC_SEARCH SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH)")] - public const uint SDLK_AC_SEARCH = ((uint)(SDL_SCANCODE_AC_SEARCH) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_MEMADD 0x400000d3u")] + public const uint SDLK_KP_MEMADD = 0x400000d3U; - [NativeTypeName("#define SDLK_AC_HOME SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME)")] - public const uint SDLK_AC_HOME = ((uint)(SDL_SCANCODE_AC_HOME) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_MEMSUBTRACT 0x400000d4u")] + public const uint SDLK_KP_MEMSUBTRACT = 0x400000d4U; - [NativeTypeName("#define SDLK_AC_BACK SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK)")] - public const uint SDLK_AC_BACK = ((uint)(SDL_SCANCODE_AC_BACK) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_MEMMULTIPLY 0x400000d5u")] + public const uint SDLK_KP_MEMMULTIPLY = 0x400000d5U; - [NativeTypeName("#define SDLK_AC_FORWARD SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD)")] - public const uint SDLK_AC_FORWARD = ((uint)(SDL_SCANCODE_AC_FORWARD) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_MEMDIVIDE 0x400000d6u")] + public const uint SDLK_KP_MEMDIVIDE = 0x400000d6U; - [NativeTypeName("#define SDLK_AC_STOP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP)")] - public const uint SDLK_AC_STOP = ((uint)(SDL_SCANCODE_AC_STOP) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_PLUSMINUS 0x400000d7u")] + public const uint SDLK_KP_PLUSMINUS = 0x400000d7U; - [NativeTypeName("#define SDLK_AC_REFRESH SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH)")] - public const uint SDLK_AC_REFRESH = ((uint)(SDL_SCANCODE_AC_REFRESH) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_CLEAR 0x400000d8u")] + public const uint SDLK_KP_CLEAR = 0x400000d8U; - [NativeTypeName("#define SDLK_AC_BOOKMARKS SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS)")] - public const uint SDLK_AC_BOOKMARKS = ((uint)(SDL_SCANCODE_AC_BOOKMARKS) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_CLEARENTRY 0x400000d9u")] + public const uint SDLK_KP_CLEARENTRY = 0x400000d9U; - [NativeTypeName("#define SDLK_BRIGHTNESSDOWN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN)")] - public const uint SDLK_BRIGHTNESSDOWN = ((uint)(SDL_SCANCODE_BRIGHTNESSDOWN) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_BINARY 0x400000dau")] + public const uint SDLK_KP_BINARY = 0x400000daU; - [NativeTypeName("#define SDLK_BRIGHTNESSUP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP)")] - public const uint SDLK_BRIGHTNESSUP = ((uint)(SDL_SCANCODE_BRIGHTNESSUP) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_OCTAL 0x400000dbu")] + public const uint SDLK_KP_OCTAL = 0x400000dbU; - [NativeTypeName("#define SDLK_DISPLAYSWITCH SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH)")] - public const uint SDLK_DISPLAYSWITCH = ((uint)(SDL_SCANCODE_DISPLAYSWITCH) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_DECIMAL 0x400000dcu")] + public const uint SDLK_KP_DECIMAL = 0x400000dcU; - [NativeTypeName("#define SDLK_KBDILLUMTOGGLE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE)")] - public const uint SDLK_KBDILLUMTOGGLE = ((uint)(SDL_SCANCODE_KBDILLUMTOGGLE) | (1U << 30)); + [NativeTypeName("#define SDLK_KP_HEXADECIMAL 0x400000ddu")] + public const uint SDLK_KP_HEXADECIMAL = 0x400000ddU; - [NativeTypeName("#define SDLK_KBDILLUMDOWN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN)")] - public const uint SDLK_KBDILLUMDOWN = ((uint)(SDL_SCANCODE_KBDILLUMDOWN) | (1U << 30)); + [NativeTypeName("#define SDLK_LCTRL 0x400000e0u")] + public const uint SDLK_LCTRL = 0x400000e0U; - [NativeTypeName("#define SDLK_KBDILLUMUP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP)")] - public const uint SDLK_KBDILLUMUP = ((uint)(SDL_SCANCODE_KBDILLUMUP) | (1U << 30)); + [NativeTypeName("#define SDLK_LSHIFT 0x400000e1u")] + public const uint SDLK_LSHIFT = 0x400000e1U; - [NativeTypeName("#define SDLK_EJECT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT)")] - public const uint SDLK_EJECT = ((uint)(SDL_SCANCODE_EJECT) | (1U << 30)); + [NativeTypeName("#define SDLK_LALT 0x400000e2u")] + public const uint SDLK_LALT = 0x400000e2U; - [NativeTypeName("#define SDLK_SLEEP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)")] - public const uint SDLK_SLEEP = ((uint)(SDL_SCANCODE_SLEEP) | (1U << 30)); + [NativeTypeName("#define SDLK_LGUI 0x400000e3u")] + public const uint SDLK_LGUI = 0x400000e3U; - [NativeTypeName("#define SDLK_APP1 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1)")] - public const uint SDLK_APP1 = ((uint)(SDL_SCANCODE_APP1) | (1U << 30)); + [NativeTypeName("#define SDLK_RCTRL 0x400000e4u")] + public const uint SDLK_RCTRL = 0x400000e4U; - [NativeTypeName("#define SDLK_APP2 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2)")] - public const uint SDLK_APP2 = ((uint)(SDL_SCANCODE_APP2) | (1U << 30)); + [NativeTypeName("#define SDLK_RSHIFT 0x400000e5u")] + public const uint SDLK_RSHIFT = 0x400000e5U; - [NativeTypeName("#define SDLK_AUDIOREWIND SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND)")] - public const uint SDLK_AUDIOREWIND = ((uint)(SDL_SCANCODE_AUDIOREWIND) | (1U << 30)); + [NativeTypeName("#define SDLK_RALT 0x400000e6u")] + public const uint SDLK_RALT = 0x400000e6U; - [NativeTypeName("#define SDLK_AUDIOFASTFORWARD SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)")] - public const uint SDLK_AUDIOFASTFORWARD = ((uint)(SDL_SCANCODE_AUDIOFASTFORWARD) | (1U << 30)); + [NativeTypeName("#define SDLK_RGUI 0x400000e7u")] + public const uint SDLK_RGUI = 0x400000e7U; - [NativeTypeName("#define SDLK_SOFTLEFT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTLEFT)")] - public const uint SDLK_SOFTLEFT = ((uint)(SDL_SCANCODE_SOFTLEFT) | (1U << 30)); + [NativeTypeName("#define SDLK_MODE 0x40000101u")] + public const uint SDLK_MODE = 0x40000101U; - [NativeTypeName("#define SDLK_SOFTRIGHT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT)")] - public const uint SDLK_SOFTRIGHT = ((uint)(SDL_SCANCODE_SOFTRIGHT) | (1U << 30)); + [NativeTypeName("#define SDLK_SLEEP 0x40000102u")] + public const uint SDLK_SLEEP = 0x40000102U; - [NativeTypeName("#define SDLK_CALL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL)")] - public const uint SDLK_CALL = ((uint)(SDL_SCANCODE_CALL) | (1U << 30)); + [NativeTypeName("#define SDLK_WAKE 0x40000103u")] + public const uint SDLK_WAKE = 0x40000103U; - [NativeTypeName("#define SDLK_ENDCALL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL)")] - public const uint SDLK_ENDCALL = ((uint)(SDL_SCANCODE_ENDCALL) | (1U << 30)); + [NativeTypeName("#define SDLK_CHANNEL_INCREMENT 0x40000104u")] + public const uint SDLK_CHANNEL_INCREMENT = 0x40000104U; + + [NativeTypeName("#define SDLK_CHANNEL_DECREMENT 0x40000105u")] + public const uint SDLK_CHANNEL_DECREMENT = 0x40000105U; + + [NativeTypeName("#define SDLK_MEDIA_PLAY 0x40000106u")] + public const uint SDLK_MEDIA_PLAY = 0x40000106U; + + [NativeTypeName("#define SDLK_MEDIA_PAUSE 0x40000107u")] + public const uint SDLK_MEDIA_PAUSE = 0x40000107U; + + [NativeTypeName("#define SDLK_MEDIA_RECORD 0x40000108u")] + public const uint SDLK_MEDIA_RECORD = 0x40000108U; + + [NativeTypeName("#define SDLK_MEDIA_FAST_FORWARD 0x40000109u")] + public const uint SDLK_MEDIA_FAST_FORWARD = 0x40000109U; + + [NativeTypeName("#define SDLK_MEDIA_REWIND 0x4000010au")] + public const uint SDLK_MEDIA_REWIND = 0x4000010aU; + + [NativeTypeName("#define SDLK_MEDIA_NEXT_TRACK 0x4000010bu")] + public const uint SDLK_MEDIA_NEXT_TRACK = 0x4000010bU; + + [NativeTypeName("#define SDLK_MEDIA_PREVIOUS_TRACK 0x4000010cu")] + public const uint SDLK_MEDIA_PREVIOUS_TRACK = 0x4000010cU; + + [NativeTypeName("#define SDLK_MEDIA_STOP 0x4000010du")] + public const uint SDLK_MEDIA_STOP = 0x4000010dU; + + [NativeTypeName("#define SDLK_MEDIA_EJECT 0x4000010eu")] + public const uint SDLK_MEDIA_EJECT = 0x4000010eU; + + [NativeTypeName("#define SDLK_MEDIA_PLAY_PAUSE 0x4000010fu")] + public const uint SDLK_MEDIA_PLAY_PAUSE = 0x4000010fU; + + [NativeTypeName("#define SDLK_MEDIA_SELECT 0x40000110u")] + public const uint SDLK_MEDIA_SELECT = 0x40000110U; + + [NativeTypeName("#define SDLK_AC_NEW 0x40000111u")] + public const uint SDLK_AC_NEW = 0x40000111U; + + [NativeTypeName("#define SDLK_AC_OPEN 0x40000112u")] + public const uint SDLK_AC_OPEN = 0x40000112U; + + [NativeTypeName("#define SDLK_AC_CLOSE 0x40000113u")] + public const uint SDLK_AC_CLOSE = 0x40000113U; + + [NativeTypeName("#define SDLK_AC_EXIT 0x40000114u")] + public const uint SDLK_AC_EXIT = 0x40000114U; + + [NativeTypeName("#define SDLK_AC_SAVE 0x40000115u")] + public const uint SDLK_AC_SAVE = 0x40000115U; + + [NativeTypeName("#define SDLK_AC_PRINT 0x40000116u")] + public const uint SDLK_AC_PRINT = 0x40000116U; + + [NativeTypeName("#define SDLK_AC_PROPERTIES 0x40000117u")] + public const uint SDLK_AC_PROPERTIES = 0x40000117U; + + [NativeTypeName("#define SDLK_AC_SEARCH 0x40000118u")] + public const uint SDLK_AC_SEARCH = 0x40000118U; + + [NativeTypeName("#define SDLK_AC_HOME 0x40000119u")] + public const uint SDLK_AC_HOME = 0x40000119U; + + [NativeTypeName("#define SDLK_AC_BACK 0x4000011au")] + public const uint SDLK_AC_BACK = 0x4000011aU; + + [NativeTypeName("#define SDLK_AC_FORWARD 0x4000011bu")] + public const uint SDLK_AC_FORWARD = 0x4000011bU; + + [NativeTypeName("#define SDLK_AC_STOP 0x4000011cu")] + public const uint SDLK_AC_STOP = 0x4000011cU; + + [NativeTypeName("#define SDLK_AC_REFRESH 0x4000011du")] + public const uint SDLK_AC_REFRESH = 0x4000011dU; + + [NativeTypeName("#define SDLK_AC_BOOKMARKS 0x4000011eu")] + public const uint SDLK_AC_BOOKMARKS = 0x4000011eU; + + [NativeTypeName("#define SDLK_SOFTLEFT 0x4000011fu")] + public const uint SDLK_SOFTLEFT = 0x4000011fU; + + [NativeTypeName("#define SDLK_SOFTRIGHT 0x40000120u")] + public const uint SDLK_SOFTRIGHT = 0x40000120U; + + [NativeTypeName("#define SDLK_CALL 0x40000121u")] + public const uint SDLK_CALL = 0x40000121U; + + [NativeTypeName("#define SDLK_ENDCALL 0x40000122u")] + public const uint SDLK_ENDCALL = 0x40000122U; [NativeTypeName("#define SDL_KMOD_NONE 0x0000u")] public const uint SDL_KMOD_NONE = 0x0000U; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs index 5082862..0b06a25 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs @@ -33,26 +33,26 @@ namespace SDL public enum SDL_SystemCursor { - SDL_SYSTEM_CURSOR_ARROW, - SDL_SYSTEM_CURSOR_IBEAM, + SDL_SYSTEM_CURSOR_DEFAULT, + SDL_SYSTEM_CURSOR_TEXT, SDL_SYSTEM_CURSOR_WAIT, SDL_SYSTEM_CURSOR_CROSSHAIR, - SDL_SYSTEM_CURSOR_WAITARROW, - SDL_SYSTEM_CURSOR_SIZENWSE, - SDL_SYSTEM_CURSOR_SIZENESW, - SDL_SYSTEM_CURSOR_SIZEWE, - SDL_SYSTEM_CURSOR_SIZENS, - SDL_SYSTEM_CURSOR_SIZEALL, - SDL_SYSTEM_CURSOR_NO, - SDL_SYSTEM_CURSOR_HAND, - SDL_SYSTEM_CURSOR_WINDOW_TOPLEFT, - SDL_SYSTEM_CURSOR_WINDOW_TOP, - SDL_SYSTEM_CURSOR_WINDOW_TOPRIGHT, - SDL_SYSTEM_CURSOR_WINDOW_RIGHT, - SDL_SYSTEM_CURSOR_WINDOW_BOTTOMRIGHT, - SDL_SYSTEM_CURSOR_WINDOW_BOTTOM, - SDL_SYSTEM_CURSOR_WINDOW_BOTTOMLEFT, - SDL_SYSTEM_CURSOR_WINDOW_LEFT, + SDL_SYSTEM_CURSOR_PROGRESS, + SDL_SYSTEM_CURSOR_NWSE_RESIZE, + SDL_SYSTEM_CURSOR_NESW_RESIZE, + SDL_SYSTEM_CURSOR_EW_RESIZE, + SDL_SYSTEM_CURSOR_NS_RESIZE, + SDL_SYSTEM_CURSOR_MOVE, + SDL_SYSTEM_CURSOR_NOT_ALLOWED, + SDL_SYSTEM_CURSOR_POINTER, + SDL_SYSTEM_CURSOR_NW_RESIZE, + SDL_SYSTEM_CURSOR_N_RESIZE, + SDL_SYSTEM_CURSOR_NE_RESIZE, + SDL_SYSTEM_CURSOR_E_RESIZE, + SDL_SYSTEM_CURSOR_SE_RESIZE, + SDL_SYSTEM_CURSOR_S_RESIZE, + SDL_SYSTEM_CURSOR_SW_RESIZE, + SDL_SYSTEM_CURSOR_W_RESIZE, SDL_NUM_SYSTEM_CURSORS, } @@ -78,15 +78,15 @@ namespace SDL public static extern SDL_Window* SDL_GetMouseFocus(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("Uint32")] + [return: NativeTypeName("SDL_MouseButtonFlags")] public static extern uint SDL_GetMouseState(float* x, float* y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("Uint32")] + [return: NativeTypeName("SDL_MouseButtonFlags")] public static extern uint SDL_GetGlobalMouseState(float* x, float* y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("Uint32")] + [return: NativeTypeName("SDL_MouseButtonFlags")] public static extern uint SDL_GetRelativeMouseState(float* x, float* y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs index 9fc75f3..22c061f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs @@ -85,7 +85,7 @@ namespace SDL public static extern byte* Unsafe_SDL_GetPenName(SDL_PenID instance_id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("Uint32")] + [return: NativeTypeName("SDL_PenCapabilityFlags")] public static extern uint SDL_GetPenCapabilities(SDL_PenID instance_id, SDL_PenCapabilityInfo* capabilities); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs index 76d04ce..9c09858 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs @@ -113,13 +113,9 @@ namespace SDL SDL_PIXELFORMAT_INDEX8 = ((1 << 28) | ((SDL_PIXELTYPE_INDEX8) << 24) | ((0) << 20) | ((0) << 16) | ((8) << 8) | ((1) << 0)), SDL_PIXELFORMAT_RGB332 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED8) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_332) << 16) | ((8) << 8) | ((1) << 0)), SDL_PIXELFORMAT_XRGB4444 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_4444) << 16) | ((12) << 8) | ((2) << 0)), - SDL_PIXELFORMAT_RGB444 = SDL_PIXELFORMAT_XRGB4444, SDL_PIXELFORMAT_XBGR4444 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XBGR) << 20) | ((SDL_PACKEDLAYOUT_4444) << 16) | ((12) << 8) | ((2) << 0)), - SDL_PIXELFORMAT_BGR444 = SDL_PIXELFORMAT_XBGR4444, SDL_PIXELFORMAT_XRGB1555 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((15) << 8) | ((2) << 0)), - SDL_PIXELFORMAT_RGB555 = SDL_PIXELFORMAT_XRGB1555, SDL_PIXELFORMAT_XBGR1555 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XBGR) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((15) << 8) | ((2) << 0)), - SDL_PIXELFORMAT_BGR555 = SDL_PIXELFORMAT_XBGR1555, SDL_PIXELFORMAT_ARGB4444 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_ARGB) << 20) | ((SDL_PACKEDLAYOUT_4444) << 16) | ((16) << 8) | ((2) << 0)), SDL_PIXELFORMAT_RGBA4444 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_RGBA) << 20) | ((SDL_PACKEDLAYOUT_4444) << 16) | ((16) << 8) | ((2) << 0)), SDL_PIXELFORMAT_ABGR4444 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_ABGR) << 20) | ((SDL_PACKEDLAYOUT_4444) << 16) | ((16) << 8) | ((2) << 0)), diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs index 20172d2..d3086f9 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs @@ -56,7 +56,7 @@ namespace SDL public static extern void SDL_UnlockProperties(SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_SetPropertyWithCleanup(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value, [NativeTypeName("void (*)(void *, void *)")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata); + public static extern int SDL_SetPropertyWithCleanup(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value, [NativeTypeName("SDL_CleanupPropertyCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_SetProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs index ce1670d..0deb096 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs @@ -28,17 +28,6 @@ using System.Runtime.InteropServices; namespace SDL { - public unsafe partial struct SDL_RendererInfo - { - [NativeTypeName("const char *")] - public byte* name; - - public int num_texture_formats; - - [NativeTypeName("const SDL_PixelFormatEnum *")] - public SDL_PixelFormatEnum* texture_formats; - } - public partial struct SDL_Vertex { public SDL_FPoint position; @@ -99,8 +88,9 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Window* SDL_GetRenderWindow(SDL_Renderer* renderer); - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_GetRendererInfo(SDL_Renderer* renderer, SDL_RendererInfo* info); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetRendererName", ExactSpelling = true)] + [return: NativeTypeName("const char *")] + public static extern byte* Unsafe_SDL_GetRendererName(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_PropertiesID SDL_GetRendererProperties(SDL_Renderer* renderer); @@ -127,7 +117,7 @@ namespace SDL public static extern SDL_Renderer* SDL_GetRendererFromTexture(SDL_Texture* texture); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_QueryTexture(SDL_Texture* texture, SDL_PixelFormatEnum* format, int* access, int* w, int* h); + public static extern int SDL_GetTextureSize(SDL_Texture* texture, float* w, float* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_SetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); @@ -377,6 +367,9 @@ namespace SDL [NativeTypeName("#define SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER \"SDL.renderer.max_texture_size\"")] public static ReadOnlySpan SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER => "SDL.renderer.max_texture_size"u8; + [NativeTypeName("#define SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER \"SDL.renderer.texture_formats\"")] + public static ReadOnlySpan SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER => "SDL.renderer.texture_formats"u8; + [NativeTypeName("#define SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER \"SDL.renderer.output_colorspace\"")] public static ReadOnlySpan SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER => "SDL.renderer.output_colorspace"u8; @@ -500,6 +493,18 @@ namespace SDL [NativeTypeName("#define SDL_PROP_TEXTURE_COLORSPACE_NUMBER \"SDL.texture.colorspace\"")] public static ReadOnlySpan SDL_PROP_TEXTURE_COLORSPACE_NUMBER => "SDL.texture.colorspace"u8; + [NativeTypeName("#define SDL_PROP_TEXTURE_FORMAT_NUMBER \"SDL.texture.format\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_FORMAT_NUMBER => "SDL.texture.format"u8; + + [NativeTypeName("#define SDL_PROP_TEXTURE_ACCESS_NUMBER \"SDL.texture.access\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_ACCESS_NUMBER => "SDL.texture.access"u8; + + [NativeTypeName("#define SDL_PROP_TEXTURE_WIDTH_NUMBER \"SDL.texture.width\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_WIDTH_NUMBER => "SDL.texture.width"u8; + + [NativeTypeName("#define SDL_PROP_TEXTURE_HEIGHT_NUMBER \"SDL.texture.height\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_HEIGHT_NUMBER => "SDL.texture.height"u8; + [NativeTypeName("#define SDL_PROP_TEXTURE_SDR_WHITE_POINT_FLOAT \"SDL.texture.SDR_white_point\"")] public static ReadOnlySpan SDL_PROP_TEXTURE_SDR_WHITE_POINT_FLOAT => "SDL.texture.SDR_white_point"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs index 76b414c..487ad49 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs @@ -241,35 +241,35 @@ namespace SDL SDL_SCANCODE_RALT = 230, SDL_SCANCODE_RGUI = 231, SDL_SCANCODE_MODE = 257, - SDL_SCANCODE_AUDIONEXT = 258, - SDL_SCANCODE_AUDIOPREV = 259, - SDL_SCANCODE_AUDIOSTOP = 260, - SDL_SCANCODE_AUDIOPLAY = 261, - SDL_SCANCODE_AUDIOMUTE = 262, - SDL_SCANCODE_MEDIASELECT = 263, - SDL_SCANCODE_WWW = 264, - SDL_SCANCODE_MAIL = 265, - SDL_SCANCODE_CALCULATOR = 266, - SDL_SCANCODE_COMPUTER = 267, - SDL_SCANCODE_AC_SEARCH = 268, - SDL_SCANCODE_AC_HOME = 269, - SDL_SCANCODE_AC_BACK = 270, - SDL_SCANCODE_AC_FORWARD = 271, - SDL_SCANCODE_AC_STOP = 272, - SDL_SCANCODE_AC_REFRESH = 273, - SDL_SCANCODE_AC_BOOKMARKS = 274, - SDL_SCANCODE_BRIGHTNESSDOWN = 275, - SDL_SCANCODE_BRIGHTNESSUP = 276, - SDL_SCANCODE_DISPLAYSWITCH = 277, - SDL_SCANCODE_KBDILLUMTOGGLE = 278, - SDL_SCANCODE_KBDILLUMDOWN = 279, - SDL_SCANCODE_KBDILLUMUP = 280, - SDL_SCANCODE_EJECT = 281, - SDL_SCANCODE_SLEEP = 282, - SDL_SCANCODE_APP1 = 283, - SDL_SCANCODE_APP2 = 284, - SDL_SCANCODE_AUDIOREWIND = 285, - SDL_SCANCODE_AUDIOFASTFORWARD = 286, + SDL_SCANCODE_SLEEP = 258, + SDL_SCANCODE_WAKE = 259, + SDL_SCANCODE_CHANNEL_INCREMENT = 260, + SDL_SCANCODE_CHANNEL_DECREMENT = 261, + SDL_SCANCODE_MEDIA_PLAY = 262, + SDL_SCANCODE_MEDIA_PAUSE = 263, + SDL_SCANCODE_MEDIA_RECORD = 264, + SDL_SCANCODE_MEDIA_FAST_FORWARD = 265, + SDL_SCANCODE_MEDIA_REWIND = 266, + SDL_SCANCODE_MEDIA_NEXT_TRACK = 267, + SDL_SCANCODE_MEDIA_PREVIOUS_TRACK = 268, + SDL_SCANCODE_MEDIA_STOP = 269, + SDL_SCANCODE_MEDIA_EJECT = 270, + SDL_SCANCODE_MEDIA_PLAY_PAUSE = 271, + SDL_SCANCODE_MEDIA_SELECT = 272, + SDL_SCANCODE_AC_NEW = 273, + SDL_SCANCODE_AC_OPEN = 274, + SDL_SCANCODE_AC_CLOSE = 275, + SDL_SCANCODE_AC_EXIT = 276, + SDL_SCANCODE_AC_SAVE = 277, + SDL_SCANCODE_AC_PRINT = 278, + SDL_SCANCODE_AC_PROPERTIES = 279, + SDL_SCANCODE_AC_SEARCH = 280, + SDL_SCANCODE_AC_HOME = 281, + SDL_SCANCODE_AC_BACK = 282, + SDL_SCANCODE_AC_FORWARD = 283, + SDL_SCANCODE_AC_STOP = 284, + SDL_SCANCODE_AC_REFRESH = 285, + SDL_SCANCODE_AC_BOOKMARKS = 286, SDL_SCANCODE_SOFTLEFT = 287, SDL_SCANCODE_SOFTRIGHT = 288, SDL_SCANCODE_CALL = 289, diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs index ef258ca..afcf52f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs @@ -81,18 +81,18 @@ namespace SDL public static extern int SDL_setenv([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, int overwrite); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_qsort([NativeTypeName("void*")] IntPtr @base, [NativeTypeName("size_t")] nuint nmemb, [NativeTypeName("size_t")] nuint size, [NativeTypeName("int (*)(const void *, const void *)")] delegate* unmanaged[Cdecl] compare); + public static extern void SDL_qsort([NativeTypeName("void*")] IntPtr @base, [NativeTypeName("size_t")] nuint nmemb, [NativeTypeName("size_t")] nuint size, [NativeTypeName("SDL_CompareCallback")] delegate* unmanaged[Cdecl] compare); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] - public static extern IntPtr SDL_bsearch([NativeTypeName("const void *")] IntPtr key, [NativeTypeName("const void *")] IntPtr @base, [NativeTypeName("size_t")] nuint nmemb, [NativeTypeName("size_t")] nuint size, [NativeTypeName("int (*)(const void *, const void *)")] delegate* unmanaged[Cdecl] compare); + public static extern IntPtr SDL_bsearch([NativeTypeName("const void *")] IntPtr key, [NativeTypeName("const void *")] IntPtr @base, [NativeTypeName("size_t")] nuint nmemb, [NativeTypeName("size_t")] nuint size, [NativeTypeName("SDL_CompareCallback")] delegate* unmanaged[Cdecl] compare); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_qsort_r([NativeTypeName("void*")] IntPtr @base, [NativeTypeName("size_t")] nuint nmemb, [NativeTypeName("size_t")] nuint size, [NativeTypeName("int (*)(void *, const void *, const void *)")] delegate* unmanaged[Cdecl] compare, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_qsort_r([NativeTypeName("void*")] IntPtr @base, [NativeTypeName("size_t")] nuint nmemb, [NativeTypeName("size_t")] nuint size, [NativeTypeName("SDL_CompareCallback_r")] delegate* unmanaged[Cdecl] compare, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] - public static extern IntPtr SDL_bsearch_r([NativeTypeName("const void *")] IntPtr key, [NativeTypeName("const void *")] IntPtr @base, [NativeTypeName("size_t")] nuint nmemb, [NativeTypeName("size_t")] nuint size, [NativeTypeName("int (*)(void *, const void *, const void *)")] delegate* unmanaged[Cdecl] compare, [NativeTypeName("void*")] IntPtr userdata); + public static extern IntPtr SDL_bsearch_r([NativeTypeName("const void *")] IntPtr key, [NativeTypeName("const void *")] IntPtr @base, [NativeTypeName("size_t")] nuint nmemb, [NativeTypeName("size_t")] nuint size, [NativeTypeName("SDL_CompareCallback_r")] delegate* unmanaged[Cdecl] compare, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_abs(int x); @@ -367,6 +367,31 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_vasprintf([NativeTypeName("char **")] byte** strp, [NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] byte* ap); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void SDL_srand([NativeTypeName("Uint64")] ulong seed); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("Sint32")] + public static extern int SDL_rand([NativeTypeName("Sint32")] int n); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern float SDL_randf(); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("Uint32")] + public static extern uint SDL_rand_bits(); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("Sint32")] + public static extern int SDL_rand_r([NativeTypeName("Uint64 *")] ulong* state, [NativeTypeName("Sint32")] int n); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern float SDL_randf_r([NativeTypeName("Uint64 *")] ulong* state); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("Uint32")] + public static extern uint SDL_rand_bits_r([NativeTypeName("Uint64 *")] ulong* state); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern double SDL_acos(double x); @@ -439,6 +464,18 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern float SDL_fmodf(float x, float y); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_isinf(double x); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_isinff(float x); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_isnan(double x); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_isnanf(float x); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern double SDL_log(double x); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs index c39bdac..dc62e29 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs @@ -33,7 +33,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("iOS")] - public static extern int SDL_iOSSetAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("void (*)(void *)")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callbackParam); + public static extern int SDL_iOSSetAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("SDL_iOSAnimationCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callbackParam); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("iOS")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs index 4fd87ca..9345415 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs @@ -25,7 +25,6 @@ using System; using System.Runtime.InteropServices; -using System.Runtime.Versioning; namespace SDL { @@ -44,12 +43,10 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [UnsupportedOSPlatform("windows")] - public static extern SDL_Thread* SDL_CreateThread([NativeTypeName("SDL_ThreadFunction")] delegate* unmanaged[Cdecl] fn, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr data); + public static extern SDL_Thread* SDL_CreateThreadRuntime([NativeTypeName("SDL_ThreadFunction")] delegate* unmanaged[Cdecl] fn, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr data, [NativeTypeName("SDL_FunctionPointer")] IntPtr pfnBeginThread, [NativeTypeName("SDL_FunctionPointer")] IntPtr pfnEndThread); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [UnsupportedOSPlatform("windows")] - public static extern SDL_Thread* SDL_CreateThreadWithStackSize([NativeTypeName("SDL_ThreadFunction")] delegate* unmanaged[Cdecl] fn, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const size_t")] nuint stacksize, [NativeTypeName("void*")] IntPtr data); + public static extern SDL_Thread* SDL_CreateThreadWithPropertiesRuntime(SDL_PropertiesID props, [NativeTypeName("SDL_FunctionPointer")] IntPtr pfnBeginThread, [NativeTypeName("SDL_FunctionPointer")] IntPtr pfnEndThread); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetThreadName", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -78,9 +75,27 @@ namespace SDL public static extern IntPtr SDL_GetTLS(SDL_TLSID id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_SetTLS(SDL_TLSID id, [NativeTypeName("const void *")] IntPtr value, [NativeTypeName("void (*)(void *)")] delegate* unmanaged[Cdecl] destructor); + public static extern int SDL_SetTLS(SDL_TLSID id, [NativeTypeName("const void *")] IntPtr value, [NativeTypeName("SDL_TLSDestructorCallback")] delegate* unmanaged[Cdecl] destructor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CleanupTLS(); + + [NativeTypeName("#define SDL_BeginThreadFunction NULL")] + public const int SDL_BeginThreadFunction = 0; + + [NativeTypeName("#define SDL_EndThreadFunction NULL")] + public const int SDL_EndThreadFunction = 0; + + [NativeTypeName("#define SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER \"entry_function\"")] + public static ReadOnlySpan SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER => "entry_function"u8; + + [NativeTypeName("#define SDL_PROP_THREAD_CREATE_NAME_STRING \"name\"")] + public static ReadOnlySpan SDL_PROP_THREAD_CREATE_NAME_STRING => "name"u8; + + [NativeTypeName("#define SDL_PROP_THREAD_CREATE_USERDATA_POINTER \"userdata\"")] + public static ReadOnlySpan SDL_PROP_THREAD_CREATE_USERDATA_POINTER => "userdata"u8; + + [NativeTypeName("#define SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER \"stacksize\"")] + public static ReadOnlySpan SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER => "stacksize"u8; } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs index 48ad867..a94b63c 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs @@ -53,10 +53,13 @@ namespace SDL public static extern void SDL_DelayNS([NativeTypeName("Uint64")] ulong ns); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_TimerID SDL_AddTimer([NativeTypeName("Uint32")] uint interval, [NativeTypeName("SDL_TimerCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr param2); + public static extern SDL_TimerID SDL_AddTimer([NativeTypeName("Uint32")] uint interval, [NativeTypeName("SDL_TimerCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RemoveTimer(SDL_TimerID id); + public static extern SDL_TimerID SDL_AddTimerNS([NativeTypeName("Uint64")] ulong interval, [NativeTypeName("SDL_NSTimerCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_RemoveTimer(SDL_TimerID id); [NativeTypeName("#define SDL_MS_PER_SECOND 1000")] public const int SDL_MS_PER_SECOND = 1000; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs index e687c4b..dab4213 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs @@ -73,6 +73,10 @@ namespace SDL SDL_FLASH_UNTIL_FOCUSED, } + public partial struct SDL_GLContextState + { + } + public enum SDL_GLattr { SDL_GL_RED_SIZE, @@ -236,6 +240,9 @@ namespace SDL [return: NativeTypeName("Uint32")] public static extern uint SDL_GetWindowPixelFormat(SDL_Window* window); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Window** SDL_GetWindows(int* count); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Window* SDL_CreateWindow([NativeTypeName("const char *")] byte* title, int w, int h, SDL_WindowFlags flags); @@ -282,6 +289,12 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_GetWindowSize(SDL_Window* window, int* w, int* h); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_SetWindowAspectRatio(SDL_Window* window, float min_aspect, float max_aspect); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_GetWindowAspectRatio(SDL_Window* window, float* min_aspect, float* max_aspect); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_GetWindowBordersSize(SDL_Window* window, int* top, int* left, int* bottom, int* right); @@ -339,6 +352,12 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_GetWindowSurface(SDL_Window* window); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_SetWindowSurfaceVSync(SDL_Window* window, int vsync); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_GetWindowSurfaceVSync(SDL_Window* window, int* vsync); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_UpdateWindowSurface(SDL_Window* window); @@ -437,17 +456,17 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_GLContext")] - public static extern IntPtr SDL_GL_CreateContext(SDL_Window* window); + public static extern SDL_GLContextState* SDL_GL_CreateContext(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_GL_MakeCurrent(SDL_Window* window, [NativeTypeName("SDL_GLContext")] IntPtr context); + public static extern int SDL_GL_MakeCurrent(SDL_Window* window, [NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Window* SDL_GL_GetCurrentWindow(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_GLContext")] - public static extern IntPtr SDL_GL_GetCurrentContext(); + public static extern SDL_GLContextState* SDL_GL_GetCurrentContext(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_EGLDisplay")] @@ -474,7 +493,7 @@ namespace SDL public static extern int SDL_GL_SwapWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_GL_DeleteContext([NativeTypeName("SDL_GLContext")] IntPtr context); + public static extern int SDL_GL_DeleteContext([NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); [NativeTypeName("#define SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER \"SDL.video.wayland.wl_display\"")] public static ReadOnlySpan SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER => "SDL.video.wayland.wl_display"u8; @@ -566,12 +585,6 @@ namespace SDL [NativeTypeName("#define SDL_PROP_DISPLAY_HDR_ENABLED_BOOLEAN \"SDL.display.HDR_enabled\"")] public static ReadOnlySpan SDL_PROP_DISPLAY_HDR_ENABLED_BOOLEAN => "SDL.display.HDR_enabled"u8; - [NativeTypeName("#define SDL_PROP_DISPLAY_SDR_WHITE_POINT_FLOAT \"SDL.display.SDR_white_point\"")] - public static ReadOnlySpan SDL_PROP_DISPLAY_SDR_WHITE_POINT_FLOAT => "SDL.display.SDR_white_point"u8; - - [NativeTypeName("#define SDL_PROP_DISPLAY_HDR_HEADROOM_FLOAT \"SDL.display.HDR_headroom\"")] - public static ReadOnlySpan SDL_PROP_DISPLAY_HDR_HEADROOM_FLOAT => "SDL.display.HDR_headroom"u8; - [NativeTypeName("#define SDL_PROP_DISPLAY_KMSDRM_PANEL_ORIENTATION_NUMBER \"SDL.display.KMSDRM.panel_orientation\"")] public static ReadOnlySpan SDL_PROP_DISPLAY_KMSDRM_PANEL_ORIENTATION_NUMBER => "SDL.display.KMSDRM.panel_orientation"u8; @@ -677,6 +690,15 @@ namespace SDL [NativeTypeName("#define SDL_PROP_WINDOW_SHAPE_POINTER \"SDL.window.shape\"")] public static ReadOnlySpan SDL_PROP_WINDOW_SHAPE_POINTER => "SDL.window.shape"u8; + [NativeTypeName("#define SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN \"SDL.window.HDR_enabled\"")] + public static ReadOnlySpan SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN => "SDL.window.HDR_enabled"u8; + + [NativeTypeName("#define SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT \"SDL.window.SDR_white_level\"")] + public static ReadOnlySpan SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT => "SDL.window.SDR_white_level"u8; + + [NativeTypeName("#define SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT \"SDL.window.HDR_headroom\"")] + public static ReadOnlySpan SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT => "SDL.window.HDR_headroom"u8; + [NativeTypeName("#define SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER \"SDL.window.android.window\"")] public static ReadOnlySpan SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER => "SDL.window.android.window"u8; @@ -689,6 +711,15 @@ namespace SDL [NativeTypeName("#define SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER \"SDL.window.uikit.metal_view_tag\"")] public static ReadOnlySpan SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER => "SDL.window.uikit.metal_view_tag"u8; + [NativeTypeName("#define SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER \"SDL.window.uikit.opengl.framebuffer\"")] + public static ReadOnlySpan SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER => "SDL.window.uikit.opengl.framebuffer"u8; + + [NativeTypeName("#define SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER \"SDL.window.uikit.opengl.renderbuffer\"")] + public static ReadOnlySpan SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER => "SDL.window.uikit.opengl.renderbuffer"u8; + + [NativeTypeName("#define SDL_PROP_WINDOW_UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER \"SDL.window.uikit.opengl.resolve_framebuffer\"")] + public static ReadOnlySpan SDL_PROP_WINDOW_UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER => "SDL.window.uikit.opengl.resolve_framebuffer"u8; + [NativeTypeName("#define SDL_PROP_WINDOW_KMSDRM_DEVICE_INDEX_NUMBER \"SDL.window.kmsdrm.dev_index\"")] public static ReadOnlySpan SDL_PROP_WINDOW_KMSDRM_DEVICE_INDEX_NUMBER => "SDL.window.kmsdrm.dev_index"u8; @@ -757,5 +788,11 @@ namespace SDL [NativeTypeName("#define SDL_PROP_WINDOW_X11_WINDOW_NUMBER \"SDL.window.x11.window\"")] public static ReadOnlySpan SDL_PROP_WINDOW_X11_WINDOW_NUMBER => "SDL.window.x11.window"u8; + + [NativeTypeName("#define SDL_WINDOW_SURFACE_VSYNC_DISABLED 0")] + public const int SDL_WINDOW_SURFACE_VSYNC_DISABLED = 0; + + [NativeTypeName("#define SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE (-1)")] + public const int SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE = (-1); } } diff --git a/SDL3-CS/SDL3/SDL_audio.cs b/SDL3-CS/SDL3/SDL_audio.cs index b7ee7e6..52f0b88 100644 --- a/SDL3-CS/SDL3/SDL_audio.cs +++ b/SDL3-CS/SDL3/SDL_audio.cs @@ -61,18 +61,18 @@ namespace SDL public static int SDL_AUDIO_FRAMESIZE(SDL_AudioSpec x) => SDL_AUDIO_BYTESIZE((x).format) * (x).channels; [MustDisposeResource] - public static unsafe SDLArray? SDL_GetAudioOutputDevices() + public static unsafe SDLArray? SDL_GetAudioPlaybackDevices() { int count; - var array = SDL_GetAudioOutputDevices(&count); + var array = SDL_GetAudioPlaybackDevices(&count); return SDLArray.Create(array, count); } [MustDisposeResource] - public static unsafe SDLArray? SDL_GetAudioCaptureDevices() + public static unsafe SDLArray? SDL_GetAudioRecordingDevices() { int count; - var array = SDL_GetAudioCaptureDevices(&count); + var array = SDL_GetAudioRecordingDevices(&count); return SDLArray.Create(array, count); } } diff --git a/SDL3-CS/SDL3/SDL_keycode.cs b/SDL3-CS/SDL3/SDL_keycode.cs index bbb7c36..325a2c2 100644 --- a/SDL3-CS/SDL3/SDL_keycode.cs +++ b/SDL3-CS/SDL3/SDL_keycode.cs @@ -17,8 +17,8 @@ namespace SDL SDLK_EXCLAIM = SDL3.SDLK_EXCLAIM, SDLK_DBLAPOSTROPHE = SDL3.SDLK_DBLAPOSTROPHE, SDLK_HASH = SDL3.SDLK_HASH, - SDLK_PERCENT = SDL3.SDLK_PERCENT, SDLK_DOLLAR = SDL3.SDLK_DOLLAR, + SDLK_PERCENT = SDL3.SDLK_PERCENT, SDLK_AMPERSAND = SDL3.SDLK_AMPERSAND, SDLK_APOSTROPHE = SDL3.SDLK_APOSTROPHE, SDLK_LEFTPAREN = SDL3.SDLK_LEFTPAREN, @@ -46,6 +46,32 @@ namespace SDL SDLK_GREATER = SDL3.SDLK_GREATER, SDLK_QUESTION = SDL3.SDLK_QUESTION, SDLK_AT = SDL3.SDLK_AT, + SDLK_A = SDL3.SDLK_A, + SDLK_B = SDL3.SDLK_B, + SDLK_C = SDL3.SDLK_C, + SDLK_D = SDL3.SDLK_D, + SDLK_E = SDL3.SDLK_E, + SDLK_F = SDL3.SDLK_F, + SDLK_G = SDL3.SDLK_G, + SDLK_H = SDL3.SDLK_H, + SDLK_I = SDL3.SDLK_I, + SDLK_J = SDL3.SDLK_J, + SDLK_K = SDL3.SDLK_K, + SDLK_L = SDL3.SDLK_L, + SDLK_M = SDL3.SDLK_M, + SDLK_N = SDL3.SDLK_N, + SDLK_O = SDL3.SDLK_O, + SDLK_P = SDL3.SDLK_P, + SDLK_Q = SDL3.SDLK_Q, + SDLK_R = SDL3.SDLK_R, + SDLK_S = SDL3.SDLK_S, + SDLK_T = SDL3.SDLK_T, + SDLK_U = SDL3.SDLK_U, + SDLK_V = SDL3.SDLK_V, + SDLK_W = SDL3.SDLK_W, + SDLK_X = SDL3.SDLK_X, + SDLK_Y = SDL3.SDLK_Y, + SDLK_Z = SDL3.SDLK_Z, SDLK_LEFTBRACKET = SDL3.SDLK_LEFTBRACKET, SDLK_BACKSLASH = SDL3.SDLK_BACKSLASH, SDLK_RIGHTBRACKET = SDL3.SDLK_RIGHTBRACKET, @@ -78,6 +104,11 @@ namespace SDL SDLK_x = SDL3.SDLK_x, SDLK_y = SDL3.SDLK_y, SDLK_z = SDL3.SDLK_z, + SDLK_LEFTBRACE = SDL3.SDLK_LEFTBRACE, + SDLK_PIPE = SDL3.SDLK_PIPE, + SDLK_RIGHTBRACE = SDL3.SDLK_RIGHTBRACE, + SDLK_TILDE = SDL3.SDLK_TILDE, + SDLK_DELETE = SDL3.SDLK_DELETE, SDLK_CAPSLOCK = SDL3.SDLK_CAPSLOCK, SDLK_F1 = SDL3.SDLK_F1, SDLK_F2 = SDL3.SDLK_F2, @@ -97,7 +128,6 @@ namespace SDL SDLK_INSERT = SDL3.SDLK_INSERT, SDLK_HOME = SDL3.SDLK_HOME, SDLK_PAGEUP = SDL3.SDLK_PAGEUP, - SDLK_DELETE = SDL3.SDLK_DELETE, SDLK_END = SDL3.SDLK_END, SDLK_PAGEDOWN = SDL3.SDLK_PAGEDOWN, SDLK_RIGHT = SDL3.SDLK_RIGHT, @@ -219,16 +249,28 @@ namespace SDL SDLK_RALT = SDL3.SDLK_RALT, SDLK_RGUI = SDL3.SDLK_RGUI, SDLK_MODE = SDL3.SDLK_MODE, - SDLK_AUDIONEXT = SDL3.SDLK_AUDIONEXT, - SDLK_AUDIOPREV = SDL3.SDLK_AUDIOPREV, - SDLK_AUDIOSTOP = SDL3.SDLK_AUDIOSTOP, - SDLK_AUDIOPLAY = SDL3.SDLK_AUDIOPLAY, - SDLK_AUDIOMUTE = SDL3.SDLK_AUDIOMUTE, - SDLK_MEDIASELECT = SDL3.SDLK_MEDIASELECT, - SDLK_WWW = SDL3.SDLK_WWW, - SDLK_MAIL = SDL3.SDLK_MAIL, - SDLK_CALCULATOR = SDL3.SDLK_CALCULATOR, - SDLK_COMPUTER = SDL3.SDLK_COMPUTER, + SDLK_SLEEP = SDL3.SDLK_SLEEP, + SDLK_WAKE = SDL3.SDLK_WAKE, + SDLK_CHANNEL_INCREMENT = SDL3.SDLK_CHANNEL_INCREMENT, + SDLK_CHANNEL_DECREMENT = SDL3.SDLK_CHANNEL_DECREMENT, + SDLK_MEDIA_PLAY = SDL3.SDLK_MEDIA_PLAY, + SDLK_MEDIA_PAUSE = SDL3.SDLK_MEDIA_PAUSE, + SDLK_MEDIA_RECORD = SDL3.SDLK_MEDIA_RECORD, + SDLK_MEDIA_FAST_FORWARD = SDL3.SDLK_MEDIA_FAST_FORWARD, + SDLK_MEDIA_REWIND = SDL3.SDLK_MEDIA_REWIND, + SDLK_MEDIA_NEXT_TRACK = SDL3.SDLK_MEDIA_NEXT_TRACK, + SDLK_MEDIA_PREVIOUS_TRACK = SDL3.SDLK_MEDIA_PREVIOUS_TRACK, + SDLK_MEDIA_STOP = SDL3.SDLK_MEDIA_STOP, + SDLK_MEDIA_EJECT = SDL3.SDLK_MEDIA_EJECT, + SDLK_MEDIA_PLAY_PAUSE = SDL3.SDLK_MEDIA_PLAY_PAUSE, + SDLK_MEDIA_SELECT = SDL3.SDLK_MEDIA_SELECT, + SDLK_AC_NEW = SDL3.SDLK_AC_NEW, + SDLK_AC_OPEN = SDL3.SDLK_AC_OPEN, + SDLK_AC_CLOSE = SDL3.SDLK_AC_CLOSE, + SDLK_AC_EXIT = SDL3.SDLK_AC_EXIT, + SDLK_AC_SAVE = SDL3.SDLK_AC_SAVE, + SDLK_AC_PRINT = SDL3.SDLK_AC_PRINT, + SDLK_AC_PROPERTIES = SDL3.SDLK_AC_PROPERTIES, SDLK_AC_SEARCH = SDL3.SDLK_AC_SEARCH, SDLK_AC_HOME = SDL3.SDLK_AC_HOME, SDLK_AC_BACK = SDL3.SDLK_AC_BACK, @@ -236,22 +278,10 @@ namespace SDL SDLK_AC_STOP = SDL3.SDLK_AC_STOP, SDLK_AC_REFRESH = SDL3.SDLK_AC_REFRESH, SDLK_AC_BOOKMARKS = SDL3.SDLK_AC_BOOKMARKS, - SDLK_BRIGHTNESSDOWN = SDL3.SDLK_BRIGHTNESSDOWN, - SDLK_BRIGHTNESSUP = SDL3.SDLK_BRIGHTNESSUP, - SDLK_DISPLAYSWITCH = SDL3.SDLK_DISPLAYSWITCH, - SDLK_KBDILLUMTOGGLE = SDL3.SDLK_KBDILLUMTOGGLE, - SDLK_KBDILLUMDOWN = SDL3.SDLK_KBDILLUMDOWN, - SDLK_KBDILLUMUP = SDL3.SDLK_KBDILLUMUP, - SDLK_EJECT = SDL3.SDLK_EJECT, - SDLK_SLEEP = SDL3.SDLK_SLEEP, - SDLK_APP1 = SDL3.SDLK_APP1, - SDLK_APP2 = SDL3.SDLK_APP2, - SDLK_AUDIOREWIND = SDL3.SDLK_AUDIOREWIND, - SDLK_AUDIOFASTFORWARD = SDL3.SDLK_AUDIOFASTFORWARD, SDLK_SOFTLEFT = SDL3.SDLK_SOFTLEFT, SDLK_SOFTRIGHT = SDL3.SDLK_SOFTRIGHT, SDLK_CALL = SDL3.SDLK_CALL, - SDLK_ENDCALL = SDL3.SDLK_ENDCALL, + SDLK_ENDCALL = SDL3.SDLK_ENDCALL } [Flags] @@ -274,7 +304,7 @@ namespace SDL SDL_KMOD_CTRL = (UInt16)SDL3.SDL_KMOD_CTRL, SDL_KMOD_SHIFT = (UInt16)SDL3.SDL_KMOD_SHIFT, SDL_KMOD_ALT = (UInt16)SDL3.SDL_KMOD_ALT, - SDL_KMOD_GUI = (UInt16)SDL3.SDL_KMOD_GUI, + SDL_KMOD_GUI = (UInt16)SDL3.SDL_KMOD_GUI } public static partial class SDL3 From 69a12ff56bab29d33e378bd923ad441e2bc3fd98 Mon Sep 17 00:00:00 2001 From: hwsmm Date: Tue, 2 Jul 2024 21:55:34 +0900 Subject: [PATCH 2/5] Apply suggestions from Susko3 --- SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs | 3 +-- SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs | 9 +++------ SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs | 3 +-- SDL3-CS/SDL3/SDL_mouse.cs | 5 +++-- SDL3-CS/SDL3/SDL_pen.cs | 7 ++++--- SDL3-CS/SDL3/SDL_video.cs | 8 ++++++++ 6 files changed, 20 insertions(+), 15 deletions(-) diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs index 911e05f..ade922b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs @@ -295,8 +295,7 @@ namespace SDL public SDL_MouseID which; - [NativeTypeName("SDL_MouseButtonFlags")] - public uint state; + public SDL_MouseButtonFlags state; public float x; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs index 0b06a25..38ba273 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs @@ -78,16 +78,13 @@ namespace SDL public static extern SDL_Window* SDL_GetMouseFocus(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("SDL_MouseButtonFlags")] - public static extern uint SDL_GetMouseState(float* x, float* y); + public static extern SDL_MouseButtonFlags SDL_GetMouseState(float* x, float* y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("SDL_MouseButtonFlags")] - public static extern uint SDL_GetGlobalMouseState(float* x, float* y); + public static extern SDL_MouseButtonFlags SDL_GetGlobalMouseState(float* x, float* y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("SDL_MouseButtonFlags")] - public static extern uint SDL_GetRelativeMouseState(float* x, float* y); + public static extern SDL_MouseButtonFlags SDL_GetRelativeMouseState(float* x, float* y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_WarpMouseInWindow(SDL_Window* window, float x, float y); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs index 22c061f..210a25b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs @@ -85,8 +85,7 @@ namespace SDL public static extern byte* Unsafe_SDL_GetPenName(SDL_PenID instance_id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("SDL_PenCapabilityFlags")] - public static extern uint SDL_GetPenCapabilities(SDL_PenID instance_id, SDL_PenCapabilityInfo* capabilities); + public static extern SDL_PenCapabilityFlags SDL_GetPenCapabilities(SDL_PenID instance_id, SDL_PenCapabilityInfo* capabilities); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_PenSubtype SDL_GetPenType(SDL_PenID instance_id); diff --git a/SDL3-CS/SDL3/SDL_mouse.cs b/SDL3-CS/SDL3/SDL_mouse.cs index 88f9129..4128182 100644 --- a/SDL3-CS/SDL3/SDL_mouse.cs +++ b/SDL3-CS/SDL3/SDL_mouse.cs @@ -19,7 +19,8 @@ namespace SDL } [Flags] - public enum SDLButtonMask : uint + [Typedef] + public enum SDL_MouseButtonFlags : uint { SDL_BUTTON_LMASK = SDL3.SDL_BUTTON_LMASK, SDL_BUTTON_MMASK = SDL3.SDL_BUTTON_MMASK, @@ -31,7 +32,7 @@ namespace SDL public static partial class SDL3 { [Macro] - public static SDLButtonMask SDL_BUTTON(SDLButton button) => (SDLButtonMask)(1 << ((int)button - 1)); + public static SDL_MouseButtonFlags SDL_BUTTON(SDLButton button) => (SDL_MouseButtonFlags)(1 << ((int)button - 1)); [MustDisposeResource] public static unsafe SDLArray? SDL_GetMice() diff --git a/SDL3-CS/SDL3/SDL_pen.cs b/SDL3-CS/SDL3/SDL_pen.cs index aab107e..dddfe91 100644 --- a/SDL3-CS/SDL3/SDL_pen.cs +++ b/SDL3-CS/SDL3/SDL_pen.cs @@ -10,7 +10,8 @@ namespace SDL public enum SDL_PenID : UInt32; [Flags] - public enum SDL_PEN_CAPABILITIES : uint + [Typedef] + public enum SDL_PenCapabilityFlags : uint { SDL_PEN_DOWN_MASK = SDL3.SDL_PEN_DOWN_MASK, SDL_PEN_INK_MASK = SDL3.SDL_PEN_INK_MASK, @@ -30,10 +31,10 @@ namespace SDL public const SDL_MouseID SDL_PEN_MOUSEID = unchecked((SDL_MouseID)(-2)); [Macro] - public static SDL_PEN_CAPABILITIES SDL_PEN_CAPABILITY(int capbit) => (SDL_PEN_CAPABILITIES)(1ul << (capbit)); + public static SDL_PenCapabilityFlags SDL_PEN_CAPABILITY(int capbit) => (SDL_PenCapabilityFlags)(1ul << (capbit)); [Macro] - public static SDL_PEN_CAPABILITIES SDL_PEN_AXIS_CAPABILITY(SDL_PenAxis axis) => SDL_PEN_CAPABILITY((int)axis + SDL_PEN_FLAG_AXIS_BIT_OFFSET); + public static SDL_PenCapabilityFlags SDL_PEN_AXIS_CAPABILITY(SDL_PenAxis axis) => SDL_PEN_CAPABILITY((int)axis + SDL_PEN_FLAG_AXIS_BIT_OFFSET); [MustDisposeResource] public static unsafe SDLArray? SDL_GetPens() diff --git a/SDL3-CS/SDL3/SDL_video.cs b/SDL3-CS/SDL3/SDL_video.cs index 98bfad3..37d99d1 100644 --- a/SDL3-CS/SDL3/SDL_video.cs +++ b/SDL3-CS/SDL3/SDL_video.cs @@ -70,5 +70,13 @@ namespace SDL var array = SDL_GetFullscreenDisplayModes(displayID, &count); return SDLArray.Create(array, count); } + + [MustDisposeResource] + public static unsafe SDLPointerArray? SDL_GetWindows() + { + int count; + var array = SDL_GetWindows(&count); + return SDLArray.Create(array, count); + } } } From 25defdb451f2f396ded3341b002718a5bbb38152 Mon Sep 17 00:00:00 2001 From: hwsmm Date: Tue, 2 Jul 2024 22:05:05 +0900 Subject: [PATCH 3/5] Update bindings to f7877902436eae72e3931b2d9ab9d213e095baab --- SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs | 28 ++ SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs | 7 +- SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs | 5 +- SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs | 308 ++++------------------ SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs | 8 +- SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs | 1 + SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs | 7 + SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs | 2 +- SDL3-CS/SDL3/SDL_keycode.cs | 85 +----- 9 files changed, 112 insertions(+), 339 deletions(-) diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs index ade922b..0dade2f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs @@ -83,6 +83,7 @@ namespace SDL SDL_EVENT_KEYMAP_CHANGED, SDL_EVENT_KEYBOARD_ADDED, SDL_EVENT_KEYBOARD_REMOVED, + SDL_EVENT_TEXT_EDITING_CANDIDATES, SDL_EVENT_MOUSE_MOTION = 0x400, SDL_EVENT_MOUSE_BUTTON_DOWN, SDL_EVENT_MOUSE_BUTTON_UP, @@ -252,6 +253,30 @@ namespace SDL public int length; } + public unsafe partial struct SDL_TextEditingCandidatesEvent + { + public SDL_EventType type; + + [NativeTypeName("Uint32")] + public uint reserved; + + [NativeTypeName("Uint64")] + public ulong timestamp; + + public SDL_WindowID windowID; + + [NativeTypeName("const char *const *")] + public byte** candidates; + + [NativeTypeName("Sint32")] + public int num_candidates; + + [NativeTypeName("Sint32")] + public int selected_candidate; + + public SDL_bool horizontal; + } + public unsafe partial struct SDL_TextInputEvent { public SDL_EventType type; @@ -920,6 +945,9 @@ namespace SDL [FieldOffset(0)] public SDL_TextEditingEvent edit; + [FieldOffset(0)] + public SDL_TextEditingCandidatesEvent edit_candidates; + [FieldOffset(0)] public SDL_TextInputEvent text; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs index ba1059a..92cd771 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs @@ -197,11 +197,8 @@ namespace SDL [NativeTypeName("#define SDL_HINT_HIDAPI_IGNORE_DEVICES \"SDL_HIDAPI_IGNORE_DEVICES\"")] public static ReadOnlySpan SDL_HINT_HIDAPI_IGNORE_DEVICES => "SDL_HIDAPI_IGNORE_DEVICES"u8; - [NativeTypeName("#define SDL_HINT_IME_INTERNAL_EDITING \"SDL_IME_INTERNAL_EDITING\"")] - public static ReadOnlySpan SDL_HINT_IME_INTERNAL_EDITING => "SDL_IME_INTERNAL_EDITING"u8; - - [NativeTypeName("#define SDL_HINT_IME_SHOW_UI \"SDL_IME_SHOW_UI\"")] - public static ReadOnlySpan SDL_HINT_IME_SHOW_UI => "SDL_IME_SHOW_UI"u8; + [NativeTypeName("#define SDL_HINT_IME_IMPLEMENTED_UI \"SDL_IME_IMPLEMENTED_UI\"")] + public static ReadOnlySpan SDL_HINT_IME_IMPLEMENTED_UI => "SDL_IME_IMPLEMENTED_UI"u8; [NativeTypeName("#define SDL_HINT_IOS_HIDE_HOME_INDICATOR \"SDL_IOS_HIDE_HOME_INDICATOR\"")] public static ReadOnlySpan SDL_HINT_IOS_HIDE_HOME_INDICATOR => "SDL_IOS_HIDE_HOME_INDICATOR"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs index b9eb53b..25acad7 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs @@ -97,7 +97,10 @@ namespace SDL public static extern int SDL_ClearComposition(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_SetTextInputRect(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + public static extern int SDL_SetTextInputArea(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int cursor); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_GetTextInputArea(SDL_Window* window, SDL_Rect* rect, int* cursor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_HasScreenKeyboardSupport(); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs index 9e0ac35..3d4e512 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs @@ -144,84 +144,6 @@ namespace SDL [NativeTypeName("#define SDLK_AT 0x00000040u")] public const uint SDLK_AT = 0x00000040U; - [NativeTypeName("#define SDLK_A 0x00000041u")] - public const uint SDLK_A = 0x00000041U; - - [NativeTypeName("#define SDLK_B 0x00000042u")] - public const uint SDLK_B = 0x00000042U; - - [NativeTypeName("#define SDLK_C 0x00000043u")] - public const uint SDLK_C = 0x00000043U; - - [NativeTypeName("#define SDLK_D 0x00000044u")] - public const uint SDLK_D = 0x00000044U; - - [NativeTypeName("#define SDLK_E 0x00000045u")] - public const uint SDLK_E = 0x00000045U; - - [NativeTypeName("#define SDLK_F 0x00000046u")] - public const uint SDLK_F = 0x00000046U; - - [NativeTypeName("#define SDLK_G 0x00000047u")] - public const uint SDLK_G = 0x00000047U; - - [NativeTypeName("#define SDLK_H 0x00000048u")] - public const uint SDLK_H = 0x00000048U; - - [NativeTypeName("#define SDLK_I 0x00000049u")] - public const uint SDLK_I = 0x00000049U; - - [NativeTypeName("#define SDLK_J 0x0000004au")] - public const uint SDLK_J = 0x0000004aU; - - [NativeTypeName("#define SDLK_K 0x0000004bu")] - public const uint SDLK_K = 0x0000004bU; - - [NativeTypeName("#define SDLK_L 0x0000004cu")] - public const uint SDLK_L = 0x0000004cU; - - [NativeTypeName("#define SDLK_M 0x0000004du")] - public const uint SDLK_M = 0x0000004dU; - - [NativeTypeName("#define SDLK_N 0x0000004eu")] - public const uint SDLK_N = 0x0000004eU; - - [NativeTypeName("#define SDLK_O 0x0000004fu")] - public const uint SDLK_O = 0x0000004fU; - - [NativeTypeName("#define SDLK_P 0x00000050u")] - public const uint SDLK_P = 0x00000050U; - - [NativeTypeName("#define SDLK_Q 0x00000051u")] - public const uint SDLK_Q = 0x00000051U; - - [NativeTypeName("#define SDLK_R 0x00000052u")] - public const uint SDLK_R = 0x00000052U; - - [NativeTypeName("#define SDLK_S 0x00000053u")] - public const uint SDLK_S = 0x00000053U; - - [NativeTypeName("#define SDLK_T 0x00000054u")] - public const uint SDLK_T = 0x00000054U; - - [NativeTypeName("#define SDLK_U 0x00000055u")] - public const uint SDLK_U = 0x00000055U; - - [NativeTypeName("#define SDLK_V 0x00000056u")] - public const uint SDLK_V = 0x00000056U; - - [NativeTypeName("#define SDLK_W 0x00000057u")] - public const uint SDLK_W = 0x00000057U; - - [NativeTypeName("#define SDLK_X 0x00000058u")] - public const uint SDLK_X = 0x00000058U; - - [NativeTypeName("#define SDLK_Y 0x00000059u")] - public const uint SDLK_Y = 0x00000059U; - - [NativeTypeName("#define SDLK_Z 0x0000005au")] - public const uint SDLK_Z = 0x0000005aU; - [NativeTypeName("#define SDLK_LEFTBRACKET 0x0000005bu")] public const uint SDLK_LEFTBRACKET = 0x0000005bU; @@ -240,83 +162,83 @@ namespace SDL [NativeTypeName("#define SDLK_GRAVE 0x00000060u")] public const uint SDLK_GRAVE = 0x00000060U; - [NativeTypeName("#define SDLK_a 0x00000061u")] - public const uint SDLK_a = 0x00000061U; + [NativeTypeName("#define SDLK_A 0x00000061u")] + public const uint SDLK_A = 0x00000061U; - [NativeTypeName("#define SDLK_b 0x00000062u")] - public const uint SDLK_b = 0x00000062U; + [NativeTypeName("#define SDLK_B 0x00000062u")] + public const uint SDLK_B = 0x00000062U; - [NativeTypeName("#define SDLK_c 0x00000063u")] - public const uint SDLK_c = 0x00000063U; + [NativeTypeName("#define SDLK_C 0x00000063u")] + public const uint SDLK_C = 0x00000063U; - [NativeTypeName("#define SDLK_d 0x00000064u")] - public const uint SDLK_d = 0x00000064U; + [NativeTypeName("#define SDLK_D 0x00000064u")] + public const uint SDLK_D = 0x00000064U; - [NativeTypeName("#define SDLK_e 0x00000065u")] - public const uint SDLK_e = 0x00000065U; + [NativeTypeName("#define SDLK_E 0x00000065u")] + public const uint SDLK_E = 0x00000065U; - [NativeTypeName("#define SDLK_f 0x00000066u")] - public const uint SDLK_f = 0x00000066U; + [NativeTypeName("#define SDLK_F 0x00000066u")] + public const uint SDLK_F = 0x00000066U; - [NativeTypeName("#define SDLK_g 0x00000067u")] - public const uint SDLK_g = 0x00000067U; + [NativeTypeName("#define SDLK_G 0x00000067u")] + public const uint SDLK_G = 0x00000067U; - [NativeTypeName("#define SDLK_h 0x00000068u")] - public const uint SDLK_h = 0x00000068U; + [NativeTypeName("#define SDLK_H 0x00000068u")] + public const uint SDLK_H = 0x00000068U; - [NativeTypeName("#define SDLK_i 0x00000069u")] - public const uint SDLK_i = 0x00000069U; + [NativeTypeName("#define SDLK_I 0x00000069u")] + public const uint SDLK_I = 0x00000069U; - [NativeTypeName("#define SDLK_j 0x0000006au")] - public const uint SDLK_j = 0x0000006aU; + [NativeTypeName("#define SDLK_J 0x0000006au")] + public const uint SDLK_J = 0x0000006aU; - [NativeTypeName("#define SDLK_k 0x0000006bu")] - public const uint SDLK_k = 0x0000006bU; + [NativeTypeName("#define SDLK_K 0x0000006bu")] + public const uint SDLK_K = 0x0000006bU; - [NativeTypeName("#define SDLK_l 0x0000006cu")] - public const uint SDLK_l = 0x0000006cU; + [NativeTypeName("#define SDLK_L 0x0000006cu")] + public const uint SDLK_L = 0x0000006cU; - [NativeTypeName("#define SDLK_m 0x0000006du")] - public const uint SDLK_m = 0x0000006dU; + [NativeTypeName("#define SDLK_M 0x0000006du")] + public const uint SDLK_M = 0x0000006dU; - [NativeTypeName("#define SDLK_n 0x0000006eu")] - public const uint SDLK_n = 0x0000006eU; + [NativeTypeName("#define SDLK_N 0x0000006eu")] + public const uint SDLK_N = 0x0000006eU; - [NativeTypeName("#define SDLK_o 0x0000006fu")] - public const uint SDLK_o = 0x0000006fU; + [NativeTypeName("#define SDLK_O 0x0000006fu")] + public const uint SDLK_O = 0x0000006fU; - [NativeTypeName("#define SDLK_p 0x00000070u")] - public const uint SDLK_p = 0x00000070U; + [NativeTypeName("#define SDLK_P 0x00000070u")] + public const uint SDLK_P = 0x00000070U; - [NativeTypeName("#define SDLK_q 0x00000071u")] - public const uint SDLK_q = 0x00000071U; + [NativeTypeName("#define SDLK_Q 0x00000071u")] + public const uint SDLK_Q = 0x00000071U; - [NativeTypeName("#define SDLK_r 0x00000072u")] - public const uint SDLK_r = 0x00000072U; + [NativeTypeName("#define SDLK_R 0x00000072u")] + public const uint SDLK_R = 0x00000072U; - [NativeTypeName("#define SDLK_s 0x00000073u")] - public const uint SDLK_s = 0x00000073U; + [NativeTypeName("#define SDLK_S 0x00000073u")] + public const uint SDLK_S = 0x00000073U; - [NativeTypeName("#define SDLK_t 0x00000074u")] - public const uint SDLK_t = 0x00000074U; + [NativeTypeName("#define SDLK_T 0x00000074u")] + public const uint SDLK_T = 0x00000074U; - [NativeTypeName("#define SDLK_u 0x00000075u")] - public const uint SDLK_u = 0x00000075U; + [NativeTypeName("#define SDLK_U 0x00000075u")] + public const uint SDLK_U = 0x00000075U; - [NativeTypeName("#define SDLK_v 0x00000076u")] - public const uint SDLK_v = 0x00000076U; + [NativeTypeName("#define SDLK_V 0x00000076u")] + public const uint SDLK_V = 0x00000076U; - [NativeTypeName("#define SDLK_w 0x00000077u")] - public const uint SDLK_w = 0x00000077U; + [NativeTypeName("#define SDLK_W 0x00000077u")] + public const uint SDLK_W = 0x00000077U; - [NativeTypeName("#define SDLK_x 0x00000078u")] - public const uint SDLK_x = 0x00000078U; + [NativeTypeName("#define SDLK_X 0x00000078u")] + public const uint SDLK_X = 0x00000078U; - [NativeTypeName("#define SDLK_y 0x00000079u")] - public const uint SDLK_y = 0x00000079U; + [NativeTypeName("#define SDLK_Y 0x00000079u")] + public const uint SDLK_Y = 0x00000079U; - [NativeTypeName("#define SDLK_z 0x0000007au")] - public const uint SDLK_z = 0x0000007aU; + [NativeTypeName("#define SDLK_Z 0x0000007au")] + public const uint SDLK_Z = 0x0000007aU; [NativeTypeName("#define SDLK_LEFTBRACE 0x0000007bu")] public const uint SDLK_LEFTBRACE = 0x0000007bU; @@ -333,6 +255,9 @@ namespace SDL [NativeTypeName("#define SDLK_DELETE 0x0000007fu")] public const uint SDLK_DELETE = 0x0000007fU; + [NativeTypeName("#define SDLK_PLUSMINUS 0x000000b1u")] + public const uint SDLK_PLUSMINUS = 0x000000b1U; + [NativeTypeName("#define SDLK_CAPSLOCK 0x40000039u")] public const uint SDLK_CAPSLOCK = 0x40000039U; @@ -411,63 +336,12 @@ namespace SDL [NativeTypeName("#define SDLK_NUMLOCKCLEAR 0x40000053u")] public const uint SDLK_NUMLOCKCLEAR = 0x40000053U; - [NativeTypeName("#define SDLK_KP_DIVIDE 0x40000054u")] - public const uint SDLK_KP_DIVIDE = 0x40000054U; - - [NativeTypeName("#define SDLK_KP_MULTIPLY 0x40000055u")] - public const uint SDLK_KP_MULTIPLY = 0x40000055U; - - [NativeTypeName("#define SDLK_KP_MINUS 0x40000056u")] - public const uint SDLK_KP_MINUS = 0x40000056U; - - [NativeTypeName("#define SDLK_KP_PLUS 0x40000057u")] - public const uint SDLK_KP_PLUS = 0x40000057U; - - [NativeTypeName("#define SDLK_KP_ENTER 0x40000058u")] - public const uint SDLK_KP_ENTER = 0x40000058U; - - [NativeTypeName("#define SDLK_KP_1 0x40000059u")] - public const uint SDLK_KP_1 = 0x40000059U; - - [NativeTypeName("#define SDLK_KP_2 0x4000005au")] - public const uint SDLK_KP_2 = 0x4000005aU; - - [NativeTypeName("#define SDLK_KP_3 0x4000005bu")] - public const uint SDLK_KP_3 = 0x4000005bU; - - [NativeTypeName("#define SDLK_KP_4 0x4000005cu")] - public const uint SDLK_KP_4 = 0x4000005cU; - - [NativeTypeName("#define SDLK_KP_5 0x4000005du")] - public const uint SDLK_KP_5 = 0x4000005dU; - - [NativeTypeName("#define SDLK_KP_6 0x4000005eu")] - public const uint SDLK_KP_6 = 0x4000005eU; - - [NativeTypeName("#define SDLK_KP_7 0x4000005fu")] - public const uint SDLK_KP_7 = 0x4000005fU; - - [NativeTypeName("#define SDLK_KP_8 0x40000060u")] - public const uint SDLK_KP_8 = 0x40000060U; - - [NativeTypeName("#define SDLK_KP_9 0x40000061u")] - public const uint SDLK_KP_9 = 0x40000061U; - - [NativeTypeName("#define SDLK_KP_0 0x40000062u")] - public const uint SDLK_KP_0 = 0x40000062U; - - [NativeTypeName("#define SDLK_KP_PERIOD 0x40000063u")] - public const uint SDLK_KP_PERIOD = 0x40000063U; - [NativeTypeName("#define SDLK_APPLICATION 0x40000065u")] public const uint SDLK_APPLICATION = 0x40000065U; [NativeTypeName("#define SDLK_POWER 0x40000066u")] public const uint SDLK_POWER = 0x40000066U; - [NativeTypeName("#define SDLK_KP_EQUALS 0x40000067u")] - public const uint SDLK_KP_EQUALS = 0x40000067U; - [NativeTypeName("#define SDLK_F13 0x40000068u")] public const uint SDLK_F13 = 0x40000068U; @@ -546,12 +420,6 @@ namespace SDL [NativeTypeName("#define SDLK_VOLUMEDOWN 0x40000081u")] public const uint SDLK_VOLUMEDOWN = 0x40000081U; - [NativeTypeName("#define SDLK_KP_COMMA 0x40000085u")] - public const uint SDLK_KP_COMMA = 0x40000085U; - - [NativeTypeName("#define SDLK_KP_EQUALSAS400 0x40000086u")] - public const uint SDLK_KP_EQUALSAS400 = 0x40000086U; - [NativeTypeName("#define SDLK_ALTERASE 0x40000099u")] public const uint SDLK_ALTERASE = 0x40000099U; @@ -606,60 +474,12 @@ namespace SDL [NativeTypeName("#define SDLK_CURRENCYSUBUNIT 0x400000b5u")] public const uint SDLK_CURRENCYSUBUNIT = 0x400000b5U; - [NativeTypeName("#define SDLK_KP_LEFTPAREN 0x400000b6u")] - public const uint SDLK_KP_LEFTPAREN = 0x400000b6U; - - [NativeTypeName("#define SDLK_KP_RIGHTPAREN 0x400000b7u")] - public const uint SDLK_KP_RIGHTPAREN = 0x400000b7U; - - [NativeTypeName("#define SDLK_KP_LEFTBRACE 0x400000b8u")] - public const uint SDLK_KP_LEFTBRACE = 0x400000b8U; - - [NativeTypeName("#define SDLK_KP_RIGHTBRACE 0x400000b9u")] - public const uint SDLK_KP_RIGHTBRACE = 0x400000b9U; - - [NativeTypeName("#define SDLK_KP_TAB 0x400000bau")] - public const uint SDLK_KP_TAB = 0x400000baU; - - [NativeTypeName("#define SDLK_KP_BACKSPACE 0x400000bbu")] - public const uint SDLK_KP_BACKSPACE = 0x400000bbU; - - [NativeTypeName("#define SDLK_KP_A 0x400000bcu")] - public const uint SDLK_KP_A = 0x400000bcU; - - [NativeTypeName("#define SDLK_KP_B 0x400000bdu")] - public const uint SDLK_KP_B = 0x400000bdU; - - [NativeTypeName("#define SDLK_KP_C 0x400000beu")] - public const uint SDLK_KP_C = 0x400000beU; - - [NativeTypeName("#define SDLK_KP_D 0x400000bfu")] - public const uint SDLK_KP_D = 0x400000bfU; - - [NativeTypeName("#define SDLK_KP_E 0x400000c0u")] - public const uint SDLK_KP_E = 0x400000c0U; - - [NativeTypeName("#define SDLK_KP_F 0x400000c1u")] - public const uint SDLK_KP_F = 0x400000c1U; - [NativeTypeName("#define SDLK_KP_XOR 0x400000c2u")] public const uint SDLK_KP_XOR = 0x400000c2U; [NativeTypeName("#define SDLK_KP_POWER 0x400000c3u")] public const uint SDLK_KP_POWER = 0x400000c3U; - [NativeTypeName("#define SDLK_KP_PERCENT 0x400000c4u")] - public const uint SDLK_KP_PERCENT = 0x400000c4U; - - [NativeTypeName("#define SDLK_KP_LESS 0x400000c5u")] - public const uint SDLK_KP_LESS = 0x400000c5U; - - [NativeTypeName("#define SDLK_KP_GREATER 0x400000c6u")] - public const uint SDLK_KP_GREATER = 0x400000c6U; - - [NativeTypeName("#define SDLK_KP_AMPERSAND 0x400000c7u")] - public const uint SDLK_KP_AMPERSAND = 0x400000c7U; - [NativeTypeName("#define SDLK_KP_DBLAMPERSAND 0x400000c8u")] public const uint SDLK_KP_DBLAMPERSAND = 0x400000c8U; @@ -669,21 +489,6 @@ namespace SDL [NativeTypeName("#define SDLK_KP_DBLVERTICALBAR 0x400000cau")] public const uint SDLK_KP_DBLVERTICALBAR = 0x400000caU; - [NativeTypeName("#define SDLK_KP_COLON 0x400000cbu")] - public const uint SDLK_KP_COLON = 0x400000cbU; - - [NativeTypeName("#define SDLK_KP_HASH 0x400000ccu")] - public const uint SDLK_KP_HASH = 0x400000ccU; - - [NativeTypeName("#define SDLK_KP_SPACE 0x400000cdu")] - public const uint SDLK_KP_SPACE = 0x400000cdU; - - [NativeTypeName("#define SDLK_KP_AT 0x400000ceu")] - public const uint SDLK_KP_AT = 0x400000ceU; - - [NativeTypeName("#define SDLK_KP_EXCLAM 0x400000cfu")] - public const uint SDLK_KP_EXCLAM = 0x400000cfU; - [NativeTypeName("#define SDLK_KP_MEMSTORE 0x400000d0u")] public const uint SDLK_KP_MEMSTORE = 0x400000d0U; @@ -705,9 +510,6 @@ namespace SDL [NativeTypeName("#define SDLK_KP_MEMDIVIDE 0x400000d6u")] public const uint SDLK_KP_MEMDIVIDE = 0x400000d6U; - [NativeTypeName("#define SDLK_KP_PLUSMINUS 0x400000d7u")] - public const uint SDLK_KP_PLUSMINUS = 0x400000d7U; - [NativeTypeName("#define SDLK_KP_CLEAR 0x400000d8u")] public const uint SDLK_KP_CLEAR = 0x400000d8U; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs index 0deb096..76536fd 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs @@ -185,6 +185,9 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_GetRenderLogicalPresentation(SDL_Renderer* renderer, int* w, int* h, SDL_RendererLogicalPresentation* mode, SDL_ScaleMode* scale_mode); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_GetRenderLogicalPresentationRect(SDL_Renderer* renderer, SDL_FRect* rect); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_RenderCoordinatesFromWindow(SDL_Renderer* renderer, float window_x, float window_y, float* x, float* y); @@ -279,10 +282,7 @@ namespace SDL public static extern int SDL_RenderGeometry(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_Vertex *")] SDL_Vertex* vertices, int num_vertices, [NativeTypeName("const int *")] int* indices, int num_indices); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_RenderGeometryRaw(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const float *")] float* xy, int xy_stride, [NativeTypeName("const SDL_Color *")] SDL_Color* color, int color_stride, [NativeTypeName("const float *")] float* uv, int uv_stride, int num_vertices, [NativeTypeName("const void *")] IntPtr indices, int num_indices, int size_indices); - - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_RenderGeometryRawFloat(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const float *")] float* xy, int xy_stride, [NativeTypeName("const SDL_FColor *")] SDL_FColor* color, int color_stride, [NativeTypeName("const float *")] float* uv, int uv_stride, int num_vertices, [NativeTypeName("const void *")] IntPtr indices, int num_indices, int size_indices); + public static extern int SDL_RenderGeometryRaw(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const float *")] float* xy, int xy_stride, [NativeTypeName("const SDL_FColor *")] SDL_FColor* color, int color_stride, [NativeTypeName("const float *")] float* uv, int uv_stride, int num_vertices, [NativeTypeName("const void *")] IntPtr indices, int num_indices, int size_indices); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_RenderReadPixels(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs index 487ad49..ca1ccd8 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs @@ -274,6 +274,7 @@ namespace SDL SDL_SCANCODE_SOFTRIGHT = 288, SDL_SCANCODE_CALL = 289, SDL_SCANCODE_ENDCALL = 290, + SDL_SCANCODE_RESERVED = 400, SDL_NUM_SCANCODES = 512, } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs index afcf52f..ffb2b86 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs @@ -343,6 +343,10 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_strncasecmp([NativeTypeName("const char *")] byte* str1, [NativeTypeName("const char *")] byte* str2, [NativeTypeName("size_t")] nuint maxlen); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("Uint32")] + public static extern uint SDL_StepUTF8([NativeTypeName("const char **")] byte** pstr, [NativeTypeName("size_t *")] nuint* pslen); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_sscanf([NativeTypeName("const char *")] byte* text, [NativeTypeName("const char *")] byte* fmt, __arglist); @@ -665,6 +669,9 @@ namespace SDL [NativeTypeName("#define SDL_PRIX32 \"X\"")] public static ReadOnlySpan SDL_PRIX32 => "X"u8; + [NativeTypeName("#define SDL_INVALID_UNICODE_CODEPOINT 0xFFFD")] + public const int SDL_INVALID_UNICODE_CODEPOINT = 0xFFFD; + [NativeTypeName("#define SDL_PI_D 3.141592653589793238462643383279502884")] public const double SDL_PI_D = 3.141592653589793238462643383279502884; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs index c759262..00c249f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs @@ -57,7 +57,7 @@ namespace SDL public static extern byte** SDL_Vulkan_GetInstanceExtensions([NativeTypeName("Uint32 *")] uint* count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_Vulkan_CreateSurface(SDL_Window* window, [NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("const struct VkAllocationCallbacks *")] VkAllocationCallbacks* allocator, [NativeTypeName("VkSurfaceKHR *")] VkSurfaceKHR_T** surface); + public static extern int SDL_Vulkan_CreateSurface(SDL_Window* window, [NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("const struct VkAllocationCallbacks *")] VkAllocationCallbacks* allocator, [NativeTypeName("VkSurfaceKHR *")] VkSurfaceKHR_T** surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_Vulkan_DestroySurface([NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("VkSurfaceKHR")] VkSurfaceKHR_T* surface, [NativeTypeName("const struct VkAllocationCallbacks *")] VkAllocationCallbacks* allocator); diff --git a/SDL3-CS/SDL3/SDL_keycode.cs b/SDL3-CS/SDL3/SDL_keycode.cs index 325a2c2..af3a4fa 100644 --- a/SDL3-CS/SDL3/SDL_keycode.cs +++ b/SDL3-CS/SDL3/SDL_keycode.cs @@ -8,6 +8,7 @@ namespace SDL [Typedef] public enum SDL_Keycode : UInt32 { + SDLK_SCANCODE_MASK = SDL3.SDLK_SCANCODE_MASK, SDLK_UNKNOWN = SDL3.SDLK_UNKNOWN, SDLK_RETURN = SDL3.SDLK_RETURN, SDLK_ESCAPE = SDL3.SDLK_ESCAPE, @@ -46,6 +47,12 @@ namespace SDL SDLK_GREATER = SDL3.SDLK_GREATER, SDLK_QUESTION = SDL3.SDLK_QUESTION, SDLK_AT = SDL3.SDLK_AT, + SDLK_LEFTBRACKET = SDL3.SDLK_LEFTBRACKET, + SDLK_BACKSLASH = SDL3.SDLK_BACKSLASH, + SDLK_RIGHTBRACKET = SDL3.SDLK_RIGHTBRACKET, + SDLK_CARET = SDL3.SDLK_CARET, + SDLK_UNDERSCORE = SDL3.SDLK_UNDERSCORE, + SDLK_GRAVE = SDL3.SDLK_GRAVE, SDLK_A = SDL3.SDLK_A, SDLK_B = SDL3.SDLK_B, SDLK_C = SDL3.SDLK_C, @@ -72,43 +79,12 @@ namespace SDL SDLK_X = SDL3.SDLK_X, SDLK_Y = SDL3.SDLK_Y, SDLK_Z = SDL3.SDLK_Z, - SDLK_LEFTBRACKET = SDL3.SDLK_LEFTBRACKET, - SDLK_BACKSLASH = SDL3.SDLK_BACKSLASH, - SDLK_RIGHTBRACKET = SDL3.SDLK_RIGHTBRACKET, - SDLK_CARET = SDL3.SDLK_CARET, - SDLK_UNDERSCORE = SDL3.SDLK_UNDERSCORE, - SDLK_GRAVE = SDL3.SDLK_GRAVE, - SDLK_a = SDL3.SDLK_a, - SDLK_b = SDL3.SDLK_b, - SDLK_c = SDL3.SDLK_c, - SDLK_d = SDL3.SDLK_d, - SDLK_e = SDL3.SDLK_e, - SDLK_f = SDL3.SDLK_f, - SDLK_g = SDL3.SDLK_g, - SDLK_h = SDL3.SDLK_h, - SDLK_i = SDL3.SDLK_i, - SDLK_j = SDL3.SDLK_j, - SDLK_k = SDL3.SDLK_k, - SDLK_l = SDL3.SDLK_l, - SDLK_m = SDL3.SDLK_m, - SDLK_n = SDL3.SDLK_n, - SDLK_o = SDL3.SDLK_o, - SDLK_p = SDL3.SDLK_p, - SDLK_q = SDL3.SDLK_q, - SDLK_r = SDL3.SDLK_r, - SDLK_s = SDL3.SDLK_s, - SDLK_t = SDL3.SDLK_t, - SDLK_u = SDL3.SDLK_u, - SDLK_v = SDL3.SDLK_v, - SDLK_w = SDL3.SDLK_w, - SDLK_x = SDL3.SDLK_x, - SDLK_y = SDL3.SDLK_y, - SDLK_z = SDL3.SDLK_z, SDLK_LEFTBRACE = SDL3.SDLK_LEFTBRACE, SDLK_PIPE = SDL3.SDLK_PIPE, SDLK_RIGHTBRACE = SDL3.SDLK_RIGHTBRACE, SDLK_TILDE = SDL3.SDLK_TILDE, SDLK_DELETE = SDL3.SDLK_DELETE, + SDLK_PLUSMINUS = SDL3.SDLK_PLUSMINUS, SDLK_CAPSLOCK = SDL3.SDLK_CAPSLOCK, SDLK_F1 = SDL3.SDLK_F1, SDLK_F2 = SDL3.SDLK_F2, @@ -135,25 +111,8 @@ namespace SDL SDLK_DOWN = SDL3.SDLK_DOWN, SDLK_UP = SDL3.SDLK_UP, SDLK_NUMLOCKCLEAR = SDL3.SDLK_NUMLOCKCLEAR, - SDLK_KP_DIVIDE = SDL3.SDLK_KP_DIVIDE, - SDLK_KP_MULTIPLY = SDL3.SDLK_KP_MULTIPLY, - SDLK_KP_MINUS = SDL3.SDLK_KP_MINUS, - SDLK_KP_PLUS = SDL3.SDLK_KP_PLUS, - SDLK_KP_ENTER = SDL3.SDLK_KP_ENTER, - SDLK_KP_1 = SDL3.SDLK_KP_1, - SDLK_KP_2 = SDL3.SDLK_KP_2, - SDLK_KP_3 = SDL3.SDLK_KP_3, - SDLK_KP_4 = SDL3.SDLK_KP_4, - SDLK_KP_5 = SDL3.SDLK_KP_5, - SDLK_KP_6 = SDL3.SDLK_KP_6, - SDLK_KP_7 = SDL3.SDLK_KP_7, - SDLK_KP_8 = SDL3.SDLK_KP_8, - SDLK_KP_9 = SDL3.SDLK_KP_9, - SDLK_KP_0 = SDL3.SDLK_KP_0, - SDLK_KP_PERIOD = SDL3.SDLK_KP_PERIOD, SDLK_APPLICATION = SDL3.SDLK_APPLICATION, SDLK_POWER = SDL3.SDLK_POWER, - SDLK_KP_EQUALS = SDL3.SDLK_KP_EQUALS, SDLK_F13 = SDL3.SDLK_F13, SDLK_F14 = SDL3.SDLK_F14, SDLK_F15 = SDL3.SDLK_F15, @@ -180,8 +139,6 @@ namespace SDL SDLK_MUTE = SDL3.SDLK_MUTE, SDLK_VOLUMEUP = SDL3.SDLK_VOLUMEUP, SDLK_VOLUMEDOWN = SDL3.SDLK_VOLUMEDOWN, - SDLK_KP_COMMA = SDL3.SDLK_KP_COMMA, - SDLK_KP_EQUALSAS400 = SDL3.SDLK_KP_EQUALSAS400, SDLK_ALTERASE = SDL3.SDLK_ALTERASE, SDLK_SYSREQ = SDL3.SDLK_SYSREQ, SDLK_CANCEL = SDL3.SDLK_CANCEL, @@ -200,32 +157,11 @@ namespace SDL SDLK_DECIMALSEPARATOR = SDL3.SDLK_DECIMALSEPARATOR, SDLK_CURRENCYUNIT = SDL3.SDLK_CURRENCYUNIT, SDLK_CURRENCYSUBUNIT = SDL3.SDLK_CURRENCYSUBUNIT, - SDLK_KP_LEFTPAREN = SDL3.SDLK_KP_LEFTPAREN, - SDLK_KP_RIGHTPAREN = SDL3.SDLK_KP_RIGHTPAREN, - SDLK_KP_LEFTBRACE = SDL3.SDLK_KP_LEFTBRACE, - SDLK_KP_RIGHTBRACE = SDL3.SDLK_KP_RIGHTBRACE, - SDLK_KP_TAB = SDL3.SDLK_KP_TAB, - SDLK_KP_BACKSPACE = SDL3.SDLK_KP_BACKSPACE, - SDLK_KP_A = SDL3.SDLK_KP_A, - SDLK_KP_B = SDL3.SDLK_KP_B, - SDLK_KP_C = SDL3.SDLK_KP_C, - SDLK_KP_D = SDL3.SDLK_KP_D, - SDLK_KP_E = SDL3.SDLK_KP_E, - SDLK_KP_F = SDL3.SDLK_KP_F, SDLK_KP_XOR = SDL3.SDLK_KP_XOR, SDLK_KP_POWER = SDL3.SDLK_KP_POWER, - SDLK_KP_PERCENT = SDL3.SDLK_KP_PERCENT, - SDLK_KP_LESS = SDL3.SDLK_KP_LESS, - SDLK_KP_GREATER = SDL3.SDLK_KP_GREATER, - SDLK_KP_AMPERSAND = SDL3.SDLK_KP_AMPERSAND, SDLK_KP_DBLAMPERSAND = SDL3.SDLK_KP_DBLAMPERSAND, SDLK_KP_VERTICALBAR = SDL3.SDLK_KP_VERTICALBAR, SDLK_KP_DBLVERTICALBAR = SDL3.SDLK_KP_DBLVERTICALBAR, - SDLK_KP_COLON = SDL3.SDLK_KP_COLON, - SDLK_KP_HASH = SDL3.SDLK_KP_HASH, - SDLK_KP_SPACE = SDL3.SDLK_KP_SPACE, - SDLK_KP_AT = SDL3.SDLK_KP_AT, - SDLK_KP_EXCLAM = SDL3.SDLK_KP_EXCLAM, SDLK_KP_MEMSTORE = SDL3.SDLK_KP_MEMSTORE, SDLK_KP_MEMRECALL = SDL3.SDLK_KP_MEMRECALL, SDLK_KP_MEMCLEAR = SDL3.SDLK_KP_MEMCLEAR, @@ -233,7 +169,6 @@ namespace SDL SDLK_KP_MEMSUBTRACT = SDL3.SDLK_KP_MEMSUBTRACT, SDLK_KP_MEMMULTIPLY = SDL3.SDLK_KP_MEMMULTIPLY, SDLK_KP_MEMDIVIDE = SDL3.SDLK_KP_MEMDIVIDE, - SDLK_KP_PLUSMINUS = SDL3.SDLK_KP_PLUSMINUS, SDLK_KP_CLEAR = SDL3.SDLK_KP_CLEAR, SDLK_KP_CLEARENTRY = SDL3.SDLK_KP_CLEARENTRY, SDLK_KP_BINARY = SDL3.SDLK_KP_BINARY, @@ -281,7 +216,7 @@ namespace SDL SDLK_SOFTLEFT = SDL3.SDLK_SOFTLEFT, SDLK_SOFTRIGHT = SDL3.SDLK_SOFTRIGHT, SDLK_CALL = SDL3.SDLK_CALL, - SDLK_ENDCALL = SDL3.SDLK_ENDCALL + SDLK_ENDCALL = SDL3.SDLK_ENDCALL, } [Flags] @@ -304,7 +239,7 @@ namespace SDL SDL_KMOD_CTRL = (UInt16)SDL3.SDL_KMOD_CTRL, SDL_KMOD_SHIFT = (UInt16)SDL3.SDL_KMOD_SHIFT, SDL_KMOD_ALT = (UInt16)SDL3.SDL_KMOD_ALT, - SDL_KMOD_GUI = (UInt16)SDL3.SDL_KMOD_GUI + SDL_KMOD_GUI = (UInt16)SDL3.SDL_KMOD_GUI, } public static partial class SDL3 From f12c0ae8864eecf9bec1b1ed0136d658ff63e267 Mon Sep 17 00:00:00 2001 From: hwsmm Date: Fri, 12 Jul 2024 00:37:43 +0900 Subject: [PATCH 4/5] Update bindings to b5a7b1ca89f4187641aa25e411e69448a56955f3 --- SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs | 30 ++++++ SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs | 1 - SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs | 123 +++++++++++++++++++++++ SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs | 44 +++----- SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs | 4 + SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs | 77 +++++++------- SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs | 7 +- SDL3-CS/SDL3/SDL_keycode.cs | 41 ++++++++ SDL3-CS/SDL3/SDL_pixels.cs | 36 +++---- SDL3-CS/SDL3/SDL_pixels.rsp | 2 +- SDL3-CS/SDL3/SDL_surface.cs | 11 +- 13 files changed, 278 insertions(+), 102 deletions(-) diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs index ee40b9d..8354c57 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs @@ -67,6 +67,10 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec* spec, int* sample_frames); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("const int *")] + public static extern int* SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID devid, int* count); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_AudioDeviceID SDL_OpenAudioDevice(SDL_AudioDeviceID devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec); @@ -79,6 +83,12 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_AudioDevicePaused(SDL_AudioDeviceID dev); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern float SDL_GetAudioDeviceGain(SDL_AudioDeviceID devid); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_SetAudioDeviceGain(SDL_AudioDeviceID devid, float gain); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CloseAudioDevice(SDL_AudioDeviceID devid); @@ -115,6 +125,26 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream* stream, float ratio); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern float SDL_GetAudioStreamGain(SDL_AudioStream* stream); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_SetAudioStreamGain(SDL_AudioStream* stream, float gain); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("const int *")] + public static extern int* SDL_GetAudioStreamInputChannelMap(SDL_AudioStream* stream, int* count); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("const int *")] + public static extern int* SDL_GetAudioStreamOutputChannelMap(SDL_AudioStream* stream, int* count); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_SetAudioStreamInputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_SetAudioStreamOutputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_PutAudioStreamData(SDL_AudioStream* stream, [NativeTypeName("const void *")] IntPtr buf, int len); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs index 96396f5..de292cd 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs @@ -33,7 +33,7 @@ namespace SDL public partial struct SDL_CameraSpec { - public SDL_PixelFormatEnum format; + public SDL_PixelFormat format; public SDL_Colorspace colorspace; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs index 0dade2f..91f75aa 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs @@ -62,7 +62,6 @@ namespace SDL SDL_EVENT_WINDOW_FOCUS_GAINED, SDL_EVENT_WINDOW_FOCUS_LOST, SDL_EVENT_WINDOW_CLOSE_REQUESTED, - SDL_EVENT_WINDOW_TAKE_FOCUS, SDL_EVENT_WINDOW_HIT_TEST, SDL_EVENT_WINDOW_ICCPROF_CHANGED, SDL_EVENT_WINDOW_DISPLAY_CHANGED, diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs index 3d4e512..f6136de 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_keycode.g.cs @@ -336,12 +336,63 @@ namespace SDL [NativeTypeName("#define SDLK_NUMLOCKCLEAR 0x40000053u")] public const uint SDLK_NUMLOCKCLEAR = 0x40000053U; + [NativeTypeName("#define SDLK_KP_DIVIDE 0x40000054u")] + public const uint SDLK_KP_DIVIDE = 0x40000054U; + + [NativeTypeName("#define SDLK_KP_MULTIPLY 0x40000055u")] + public const uint SDLK_KP_MULTIPLY = 0x40000055U; + + [NativeTypeName("#define SDLK_KP_MINUS 0x40000056u")] + public const uint SDLK_KP_MINUS = 0x40000056U; + + [NativeTypeName("#define SDLK_KP_PLUS 0x40000057u")] + public const uint SDLK_KP_PLUS = 0x40000057U; + + [NativeTypeName("#define SDLK_KP_ENTER 0x40000058u")] + public const uint SDLK_KP_ENTER = 0x40000058U; + + [NativeTypeName("#define SDLK_KP_1 0x40000059u")] + public const uint SDLK_KP_1 = 0x40000059U; + + [NativeTypeName("#define SDLK_KP_2 0x4000005au")] + public const uint SDLK_KP_2 = 0x4000005aU; + + [NativeTypeName("#define SDLK_KP_3 0x4000005bu")] + public const uint SDLK_KP_3 = 0x4000005bU; + + [NativeTypeName("#define SDLK_KP_4 0x4000005cu")] + public const uint SDLK_KP_4 = 0x4000005cU; + + [NativeTypeName("#define SDLK_KP_5 0x4000005du")] + public const uint SDLK_KP_5 = 0x4000005dU; + + [NativeTypeName("#define SDLK_KP_6 0x4000005eu")] + public const uint SDLK_KP_6 = 0x4000005eU; + + [NativeTypeName("#define SDLK_KP_7 0x4000005fu")] + public const uint SDLK_KP_7 = 0x4000005fU; + + [NativeTypeName("#define SDLK_KP_8 0x40000060u")] + public const uint SDLK_KP_8 = 0x40000060U; + + [NativeTypeName("#define SDLK_KP_9 0x40000061u")] + public const uint SDLK_KP_9 = 0x40000061U; + + [NativeTypeName("#define SDLK_KP_0 0x40000062u")] + public const uint SDLK_KP_0 = 0x40000062U; + + [NativeTypeName("#define SDLK_KP_PERIOD 0x40000063u")] + public const uint SDLK_KP_PERIOD = 0x40000063U; + [NativeTypeName("#define SDLK_APPLICATION 0x40000065u")] public const uint SDLK_APPLICATION = 0x40000065U; [NativeTypeName("#define SDLK_POWER 0x40000066u")] public const uint SDLK_POWER = 0x40000066U; + [NativeTypeName("#define SDLK_KP_EQUALS 0x40000067u")] + public const uint SDLK_KP_EQUALS = 0x40000067U; + [NativeTypeName("#define SDLK_F13 0x40000068u")] public const uint SDLK_F13 = 0x40000068U; @@ -420,6 +471,12 @@ namespace SDL [NativeTypeName("#define SDLK_VOLUMEDOWN 0x40000081u")] public const uint SDLK_VOLUMEDOWN = 0x40000081U; + [NativeTypeName("#define SDLK_KP_COMMA 0x40000085u")] + public const uint SDLK_KP_COMMA = 0x40000085U; + + [NativeTypeName("#define SDLK_KP_EQUALSAS400 0x40000086u")] + public const uint SDLK_KP_EQUALSAS400 = 0x40000086U; + [NativeTypeName("#define SDLK_ALTERASE 0x40000099u")] public const uint SDLK_ALTERASE = 0x40000099U; @@ -474,12 +531,60 @@ namespace SDL [NativeTypeName("#define SDLK_CURRENCYSUBUNIT 0x400000b5u")] public const uint SDLK_CURRENCYSUBUNIT = 0x400000b5U; + [NativeTypeName("#define SDLK_KP_LEFTPAREN 0x400000b6u")] + public const uint SDLK_KP_LEFTPAREN = 0x400000b6U; + + [NativeTypeName("#define SDLK_KP_RIGHTPAREN 0x400000b7u")] + public const uint SDLK_KP_RIGHTPAREN = 0x400000b7U; + + [NativeTypeName("#define SDLK_KP_LEFTBRACE 0x400000b8u")] + public const uint SDLK_KP_LEFTBRACE = 0x400000b8U; + + [NativeTypeName("#define SDLK_KP_RIGHTBRACE 0x400000b9u")] + public const uint SDLK_KP_RIGHTBRACE = 0x400000b9U; + + [NativeTypeName("#define SDLK_KP_TAB 0x400000bau")] + public const uint SDLK_KP_TAB = 0x400000baU; + + [NativeTypeName("#define SDLK_KP_BACKSPACE 0x400000bbu")] + public const uint SDLK_KP_BACKSPACE = 0x400000bbU; + + [NativeTypeName("#define SDLK_KP_A 0x400000bcu")] + public const uint SDLK_KP_A = 0x400000bcU; + + [NativeTypeName("#define SDLK_KP_B 0x400000bdu")] + public const uint SDLK_KP_B = 0x400000bdU; + + [NativeTypeName("#define SDLK_KP_C 0x400000beu")] + public const uint SDLK_KP_C = 0x400000beU; + + [NativeTypeName("#define SDLK_KP_D 0x400000bfu")] + public const uint SDLK_KP_D = 0x400000bfU; + + [NativeTypeName("#define SDLK_KP_E 0x400000c0u")] + public const uint SDLK_KP_E = 0x400000c0U; + + [NativeTypeName("#define SDLK_KP_F 0x400000c1u")] + public const uint SDLK_KP_F = 0x400000c1U; + [NativeTypeName("#define SDLK_KP_XOR 0x400000c2u")] public const uint SDLK_KP_XOR = 0x400000c2U; [NativeTypeName("#define SDLK_KP_POWER 0x400000c3u")] public const uint SDLK_KP_POWER = 0x400000c3U; + [NativeTypeName("#define SDLK_KP_PERCENT 0x400000c4u")] + public const uint SDLK_KP_PERCENT = 0x400000c4U; + + [NativeTypeName("#define SDLK_KP_LESS 0x400000c5u")] + public const uint SDLK_KP_LESS = 0x400000c5U; + + [NativeTypeName("#define SDLK_KP_GREATER 0x400000c6u")] + public const uint SDLK_KP_GREATER = 0x400000c6U; + + [NativeTypeName("#define SDLK_KP_AMPERSAND 0x400000c7u")] + public const uint SDLK_KP_AMPERSAND = 0x400000c7U; + [NativeTypeName("#define SDLK_KP_DBLAMPERSAND 0x400000c8u")] public const uint SDLK_KP_DBLAMPERSAND = 0x400000c8U; @@ -489,6 +594,21 @@ namespace SDL [NativeTypeName("#define SDLK_KP_DBLVERTICALBAR 0x400000cau")] public const uint SDLK_KP_DBLVERTICALBAR = 0x400000caU; + [NativeTypeName("#define SDLK_KP_COLON 0x400000cbu")] + public const uint SDLK_KP_COLON = 0x400000cbU; + + [NativeTypeName("#define SDLK_KP_HASH 0x400000ccu")] + public const uint SDLK_KP_HASH = 0x400000ccU; + + [NativeTypeName("#define SDLK_KP_SPACE 0x400000cdu")] + public const uint SDLK_KP_SPACE = 0x400000cdU; + + [NativeTypeName("#define SDLK_KP_AT 0x400000ceu")] + public const uint SDLK_KP_AT = 0x400000ceU; + + [NativeTypeName("#define SDLK_KP_EXCLAM 0x400000cfu")] + public const uint SDLK_KP_EXCLAM = 0x400000cfU; + [NativeTypeName("#define SDLK_KP_MEMSTORE 0x400000d0u")] public const uint SDLK_KP_MEMSTORE = 0x400000d0U; @@ -510,6 +630,9 @@ namespace SDL [NativeTypeName("#define SDLK_KP_MEMDIVIDE 0x400000d6u")] public const uint SDLK_KP_MEMDIVIDE = 0x400000d6U; + [NativeTypeName("#define SDLK_KP_PLUSMINUS 0x400000d7u")] + public const uint SDLK_KP_PLUSMINUS = 0x400000d7U; + [NativeTypeName("#define SDLK_KP_CLEAR 0x400000d8u")] public const uint SDLK_KP_CLEAR = 0x400000d8U; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs index 9c09858..69ac7f3 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs @@ -101,7 +101,7 @@ namespace SDL } [NativeTypeName("int")] - public enum SDL_PixelFormatEnum : uint + public enum SDL_PixelFormat : uint { SDL_PIXELFORMAT_UNKNOWN, SDL_PIXELFORMAT_INDEX1LSB = ((1 << 28) | ((SDL_PIXELTYPE_INDEX1) << 24) | ((SDL_BITMAPORDER_4321) << 20) | ((0) << 16) | ((1) << 8) | ((0) << 0)), @@ -315,11 +315,9 @@ namespace SDL public int refcount; } - public unsafe partial struct SDL_PixelFormat + public partial struct SDL_PixelFormatDetails { - public SDL_PixelFormatEnum format; - - public SDL_Palette* palette; + public SDL_PixelFormat format; [NativeTypeName("Uint8")] public byte bits_per_pixel; @@ -343,16 +341,16 @@ namespace SDL public uint Amask; [NativeTypeName("Uint8")] - public byte Rloss; + public byte Rbits; [NativeTypeName("Uint8")] - public byte Gloss; + public byte Gbits; [NativeTypeName("Uint8")] - public byte Bloss; + public byte Bbits; [NativeTypeName("Uint8")] - public byte Aloss; + public byte Abits; [NativeTypeName("Uint8")] public byte Rshift; @@ -366,11 +364,6 @@ namespace SDL [NativeTypeName("Uint8")] public byte Ashift; - public int refcount; - - [NativeTypeName("struct SDL_PixelFormat *")] - public SDL_PixelFormat* next; - [InlineArray(2)] public partial struct _padding_e__FixedBuffer { @@ -382,26 +375,21 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetPixelFormatName", ExactSpelling = true)] [return: NativeTypeName("const char *")] - public static extern byte* Unsafe_SDL_GetPixelFormatName(SDL_PixelFormatEnum format); + public static extern byte* Unsafe_SDL_GetPixelFormatName(SDL_PixelFormat format); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetMasksForPixelFormatEnum(SDL_PixelFormatEnum format, int* bpp, [NativeTypeName("Uint32 *")] uint* Rmask, [NativeTypeName("Uint32 *")] uint* Gmask, [NativeTypeName("Uint32 *")] uint* Bmask, [NativeTypeName("Uint32 *")] uint* Amask); + public static extern int SDL_GetMasksForPixelFormat(SDL_PixelFormat format, int* bpp, [NativeTypeName("Uint32 *")] uint* Rmask, [NativeTypeName("Uint32 *")] uint* Gmask, [NativeTypeName("Uint32 *")] uint* Bmask, [NativeTypeName("Uint32 *")] uint* Amask); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_PixelFormatEnum SDL_GetPixelFormatEnumForMasks(int bpp, [NativeTypeName("Uint32")] uint Rmask, [NativeTypeName("Uint32")] uint Gmask, [NativeTypeName("Uint32")] uint Bmask, [NativeTypeName("Uint32")] uint Amask); + public static extern SDL_PixelFormat SDL_GetPixelFormatForMasks(int bpp, [NativeTypeName("Uint32")] uint Rmask, [NativeTypeName("Uint32")] uint Gmask, [NativeTypeName("Uint32")] uint Bmask, [NativeTypeName("Uint32")] uint Amask); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_PixelFormat* SDL_CreatePixelFormat(SDL_PixelFormatEnum pixel_format); - - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_DestroyPixelFormat(SDL_PixelFormat* format); + [return: NativeTypeName("const SDL_PixelFormatDetails *")] + public static extern SDL_PixelFormatDetails* SDL_GetPixelFormatDetails(SDL_PixelFormat format); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Palette* SDL_CreatePalette(int ncolors); - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_SetPixelFormatPalette(SDL_PixelFormat* format, SDL_Palette* palette); - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_SetPaletteColors(SDL_Palette* palette, [NativeTypeName("const SDL_Color *")] SDL_Color* colors, int firstcolor, int ncolors); @@ -410,17 +398,17 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] - public static extern uint SDL_MapRGB([NativeTypeName("const SDL_PixelFormat *")] SDL_PixelFormat* format, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); + public static extern uint SDL_MapRGB([NativeTypeName("const SDL_PixelFormatDetails *")] SDL_PixelFormatDetails* format, [NativeTypeName("const SDL_Palette *")] SDL_Palette* palette, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] - public static extern uint SDL_MapRGBA([NativeTypeName("const SDL_PixelFormat *")] SDL_PixelFormat* format, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); + public static extern uint SDL_MapRGBA([NativeTypeName("const SDL_PixelFormatDetails *")] SDL_PixelFormatDetails* format, [NativeTypeName("const SDL_Palette *")] SDL_Palette* palette, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_GetRGB([NativeTypeName("Uint32")] uint pixel, [NativeTypeName("const SDL_PixelFormat *")] SDL_PixelFormat* format, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); + public static extern void SDL_GetRGB([NativeTypeName("Uint32")] uint pixel, [NativeTypeName("const SDL_PixelFormatDetails *")] SDL_PixelFormatDetails* format, [NativeTypeName("const SDL_Palette *")] SDL_Palette* palette, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_GetRGBA([NativeTypeName("Uint32")] uint pixel, [NativeTypeName("const SDL_PixelFormat *")] SDL_PixelFormat* format, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a); + public static extern void SDL_GetRGBA([NativeTypeName("Uint32")] uint pixel, [NativeTypeName("const SDL_PixelFormatDetails *")] SDL_PixelFormatDetails* format, [NativeTypeName("const SDL_Palette *")] SDL_Palette* palette, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a); [NativeTypeName("#define SDL_ALPHA_OPAQUE 255")] public const int SDL_ALPHA_OPAQUE = 255; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs index 76536fd..9eba4f7 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs @@ -102,7 +102,7 @@ namespace SDL public static extern int SDL_GetCurrentRenderOutputSize(SDL_Renderer* renderer, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Texture* SDL_CreateTexture(SDL_Renderer* renderer, SDL_PixelFormatEnum format, int access, int w, int h); + public static extern SDL_Texture* SDL_CreateTexture(SDL_Renderer* renderer, SDL_PixelFormat format, int access, int w, int h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Texture* SDL_CreateTextureFromSurface(SDL_Renderer* renderer, SDL_Surface* surface); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs index ffb2b86..8aa98e3 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs @@ -347,6 +347,10 @@ namespace SDL [return: NativeTypeName("Uint32")] public static extern uint SDL_StepUTF8([NativeTypeName("const char **")] byte** pstr, [NativeTypeName("size_t *")] nuint* pslen); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_UCS4ToUTF8", ExactSpelling = true)] + [return: NativeTypeName("char *")] + public static extern byte* Unsafe_SDL_UCS4ToUTF8([NativeTypeName("Uint32")] uint codepoint, [NativeTypeName("char *")] byte* dst); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_sscanf([NativeTypeName("const char *")] byte* text, [NativeTypeName("const char *")] byte* fmt, __arglist); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs index fd5eba0..bca992b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs @@ -28,10 +28,6 @@ using System.Runtime.InteropServices; namespace SDL { - public partial struct SDL_BlitMap - { - } - public enum SDL_ScaleMode { SDL_SCALEMODE_NEAREST, @@ -46,11 +42,15 @@ namespace SDL SDL_FLIP_VERTICAL, } + public partial struct SDL_SurfaceData + { + } + public unsafe partial struct SDL_Surface { public SDL_SurfaceFlags flags; - public SDL_PixelFormat* format; + public SDL_PixelFormat format; public int w; @@ -61,28 +61,18 @@ namespace SDL [NativeTypeName("void*")] public IntPtr pixels; - [NativeTypeName("void*")] - public IntPtr reserved; - - public int locked; - - [NativeTypeName("void*")] - public IntPtr list_blitmap; - - public SDL_Rect clip_rect; - - public SDL_BlitMap* map; - public int refcount; + + public SDL_SurfaceData* @internal; } public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Surface* SDL_CreateSurface(int width, int height, SDL_PixelFormatEnum format); + public static extern SDL_Surface* SDL_CreateSurface(int width, int height, SDL_PixelFormat format); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Surface* SDL_CreateSurfaceFrom([NativeTypeName("void*")] IntPtr pixels, int width, int height, int pitch, SDL_PixelFormatEnum format); + public static extern SDL_Surface* SDL_CreateSurfaceFrom(int width, int height, SDL_PixelFormat format, [NativeTypeName("void*")] IntPtr pixels, int pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroySurface(SDL_Surface* surface); @@ -94,11 +84,14 @@ namespace SDL public static extern int SDL_SetSurfaceColorspace(SDL_Surface* surface, SDL_Colorspace colorspace); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_GetSurfaceColorspace(SDL_Surface* surface, SDL_Colorspace* colorspace); + public static extern SDL_Colorspace SDL_GetSurfaceColorspace(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_SetSurfacePalette(SDL_Surface* surface, SDL_Palette* palette); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Palette* SDL_GetSurfacePalette(SDL_Surface* surface); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_LockSurface(SDL_Surface* surface); @@ -118,13 +111,13 @@ namespace SDL public static extern int SDL_SaveBMP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_SetSurfaceRLE(SDL_Surface* surface, int flag); + public static extern int SDL_SetSurfaceRLE(SDL_Surface* surface, SDL_bool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_SurfaceHasRLE(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_SetSurfaceColorKey(SDL_Surface* surface, int flag, [NativeTypeName("Uint32")] uint key); + public static extern int SDL_SetSurfaceColorKey(SDL_Surface* surface, SDL_bool enabled, [NativeTypeName("Uint32")] uint key); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_SurfaceHasColorKey(SDL_Surface* surface); @@ -163,22 +156,19 @@ namespace SDL public static extern SDL_Surface* SDL_DuplicateSurface(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Surface* SDL_ConvertSurface(SDL_Surface* surface, [NativeTypeName("const SDL_PixelFormat *")] SDL_PixelFormat* format); + public static extern SDL_Surface* SDL_ConvertSurface(SDL_Surface* surface, SDL_PixelFormat format); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Surface* SDL_ConvertSurfaceFormat(SDL_Surface* surface, SDL_PixelFormatEnum pixel_format); + public static extern SDL_Surface* SDL_ConvertSurfaceAndColorspace(SDL_Surface* surface, SDL_PixelFormat format, [NativeTypeName("const SDL_Palette *")] SDL_Palette* palette, SDL_Colorspace colorspace, SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Surface* SDL_ConvertSurfaceFormatAndColorspace(SDL_Surface* surface, SDL_PixelFormatEnum pixel_format, SDL_Colorspace colorspace, SDL_PropertiesID props); + public static extern int SDL_ConvertPixels(int width, int height, SDL_PixelFormat src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_ConvertPixels(int width, int height, SDL_PixelFormatEnum src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormatEnum dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); + public static extern int SDL_ConvertPixelsAndColorspace(int width, int height, SDL_PixelFormat src_format, SDL_Colorspace src_colorspace, SDL_PropertiesID src_properties, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, SDL_Colorspace dst_colorspace, SDL_PropertiesID dst_properties, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_ConvertPixelsAndColorspace(int width, int height, SDL_PixelFormatEnum src_format, SDL_Colorspace src_colorspace, SDL_PropertiesID src_properties, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormatEnum dst_format, SDL_Colorspace dst_colorspace, SDL_PropertiesID dst_properties, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); - - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_PremultiplyAlpha(int width, int height, SDL_PixelFormatEnum src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormatEnum dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); + public static extern int SDL_PremultiplyAlpha(int width, int height, SDL_PixelFormat src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_FillSurfaceRect(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("Uint32")] uint color); @@ -201,23 +191,28 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_BlitSurfaceUncheckedScaled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect, SDL_ScaleMode scaleMode); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("Uint32")] + public static extern uint SDL_MapSurfaceRGB(SDL_Surface* surface, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("Uint32")] + public static extern uint SDL_MapSurfaceRGBA(SDL_Surface* surface, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_ReadSurfacePixel(SDL_Surface* surface, int x, int y, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a); - [NativeTypeName("#define SDL_PREALLOC 0x00000001u")] - public const uint SDL_PREALLOC = 0x00000001U; + [NativeTypeName("#define SDL_SURFACE_PREALLOCATED 0x00000001u")] + public const uint SDL_SURFACE_PREALLOCATED = 0x00000001U; - [NativeTypeName("#define SDL_RLEACCEL 0x00000002u")] - public const uint SDL_RLEACCEL = 0x00000002U; + [NativeTypeName("#define SDL_SURFACE_LOCK_NEEDED 0x00000002u")] + public const uint SDL_SURFACE_LOCK_NEEDED = 0x00000002U; - [NativeTypeName("#define SDL_DONTFREE 0x00000004u")] - public const uint SDL_DONTFREE = 0x00000004U; + [NativeTypeName("#define SDL_SURFACE_LOCKED 0x00000004u")] + public const uint SDL_SURFACE_LOCKED = 0x00000004U; - [NativeTypeName("#define SDL_SIMD_ALIGNED 0x00000008u")] - public const uint SDL_SIMD_ALIGNED = 0x00000008U; - - [NativeTypeName("#define SDL_SURFACE_USES_PROPERTIES 0x00000010u")] - public const uint SDL_SURFACE_USES_PROPERTIES = 0x00000010U; + [NativeTypeName("#define SDL_SURFACE_SIMD_ALIGNED 0x00000008u")] + public const uint SDL_SURFACE_SIMD_ALIGNED = 0x00000008U; [NativeTypeName("#define SDL_PROP_SURFACE_COLORSPACE_NUMBER \"SDL.surface.colorspace\"")] public static ReadOnlySpan SDL_PROP_SURFACE_COLORSPACE_NUMBER => "SDL.surface.colorspace"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs index dab4213..ac218f1 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs @@ -39,7 +39,7 @@ namespace SDL { public SDL_DisplayID displayID; - public SDL_PixelFormatEnum format; + public SDL_PixelFormat format; public int w; @@ -398,9 +398,6 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_SetWindowModalFor(SDL_Window* modal_window, SDL_Window* parent_window); - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_SetWindowInputFocus(SDL_Window* window); - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_SetWindowFocusable(SDL_Window* window, SDL_bool focusable); @@ -493,7 +490,7 @@ namespace SDL public static extern int SDL_GL_SwapWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_GL_DeleteContext([NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); + public static extern int SDL_GL_DestroyContext([NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); [NativeTypeName("#define SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER \"SDL.video.wayland.wl_display\"")] public static ReadOnlySpan SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER => "SDL.video.wayland.wl_display"u8; diff --git a/SDL3-CS/SDL3/SDL_keycode.cs b/SDL3-CS/SDL3/SDL_keycode.cs index af3a4fa..6dd3dea 100644 --- a/SDL3-CS/SDL3/SDL_keycode.cs +++ b/SDL3-CS/SDL3/SDL_keycode.cs @@ -111,8 +111,25 @@ namespace SDL SDLK_DOWN = SDL3.SDLK_DOWN, SDLK_UP = SDL3.SDLK_UP, SDLK_NUMLOCKCLEAR = SDL3.SDLK_NUMLOCKCLEAR, + SDLK_KP_DIVIDE = SDL3.SDLK_KP_DIVIDE, + SDLK_KP_MULTIPLY = SDL3.SDLK_KP_MULTIPLY, + SDLK_KP_MINUS = SDL3.SDLK_KP_MINUS, + SDLK_KP_PLUS = SDL3.SDLK_KP_PLUS, + SDLK_KP_ENTER = SDL3.SDLK_KP_ENTER, + SDLK_KP_1 = SDL3.SDLK_KP_1, + SDLK_KP_2 = SDL3.SDLK_KP_2, + SDLK_KP_3 = SDL3.SDLK_KP_3, + SDLK_KP_4 = SDL3.SDLK_KP_4, + SDLK_KP_5 = SDL3.SDLK_KP_5, + SDLK_KP_6 = SDL3.SDLK_KP_6, + SDLK_KP_7 = SDL3.SDLK_KP_7, + SDLK_KP_8 = SDL3.SDLK_KP_8, + SDLK_KP_9 = SDL3.SDLK_KP_9, + SDLK_KP_0 = SDL3.SDLK_KP_0, + SDLK_KP_PERIOD = SDL3.SDLK_KP_PERIOD, SDLK_APPLICATION = SDL3.SDLK_APPLICATION, SDLK_POWER = SDL3.SDLK_POWER, + SDLK_KP_EQUALS = SDL3.SDLK_KP_EQUALS, SDLK_F13 = SDL3.SDLK_F13, SDLK_F14 = SDL3.SDLK_F14, SDLK_F15 = SDL3.SDLK_F15, @@ -139,6 +156,8 @@ namespace SDL SDLK_MUTE = SDL3.SDLK_MUTE, SDLK_VOLUMEUP = SDL3.SDLK_VOLUMEUP, SDLK_VOLUMEDOWN = SDL3.SDLK_VOLUMEDOWN, + SDLK_KP_COMMA = SDL3.SDLK_KP_COMMA, + SDLK_KP_EQUALSAS400 = SDL3.SDLK_KP_EQUALSAS400, SDLK_ALTERASE = SDL3.SDLK_ALTERASE, SDLK_SYSREQ = SDL3.SDLK_SYSREQ, SDLK_CANCEL = SDL3.SDLK_CANCEL, @@ -157,11 +176,32 @@ namespace SDL SDLK_DECIMALSEPARATOR = SDL3.SDLK_DECIMALSEPARATOR, SDLK_CURRENCYUNIT = SDL3.SDLK_CURRENCYUNIT, SDLK_CURRENCYSUBUNIT = SDL3.SDLK_CURRENCYSUBUNIT, + SDLK_KP_LEFTPAREN = SDL3.SDLK_KP_LEFTPAREN, + SDLK_KP_RIGHTPAREN = SDL3.SDLK_KP_RIGHTPAREN, + SDLK_KP_LEFTBRACE = SDL3.SDLK_KP_LEFTBRACE, + SDLK_KP_RIGHTBRACE = SDL3.SDLK_KP_RIGHTBRACE, + SDLK_KP_TAB = SDL3.SDLK_KP_TAB, + SDLK_KP_BACKSPACE = SDL3.SDLK_KP_BACKSPACE, + SDLK_KP_A = SDL3.SDLK_KP_A, + SDLK_KP_B = SDL3.SDLK_KP_B, + SDLK_KP_C = SDL3.SDLK_KP_C, + SDLK_KP_D = SDL3.SDLK_KP_D, + SDLK_KP_E = SDL3.SDLK_KP_E, + SDLK_KP_F = SDL3.SDLK_KP_F, SDLK_KP_XOR = SDL3.SDLK_KP_XOR, SDLK_KP_POWER = SDL3.SDLK_KP_POWER, + SDLK_KP_PERCENT = SDL3.SDLK_KP_PERCENT, + SDLK_KP_LESS = SDL3.SDLK_KP_LESS, + SDLK_KP_GREATER = SDL3.SDLK_KP_GREATER, + SDLK_KP_AMPERSAND = SDL3.SDLK_KP_AMPERSAND, SDLK_KP_DBLAMPERSAND = SDL3.SDLK_KP_DBLAMPERSAND, SDLK_KP_VERTICALBAR = SDL3.SDLK_KP_VERTICALBAR, SDLK_KP_DBLVERTICALBAR = SDL3.SDLK_KP_DBLVERTICALBAR, + SDLK_KP_COLON = SDL3.SDLK_KP_COLON, + SDLK_KP_HASH = SDL3.SDLK_KP_HASH, + SDLK_KP_SPACE = SDL3.SDLK_KP_SPACE, + SDLK_KP_AT = SDL3.SDLK_KP_AT, + SDLK_KP_EXCLAM = SDL3.SDLK_KP_EXCLAM, SDLK_KP_MEMSTORE = SDL3.SDLK_KP_MEMSTORE, SDLK_KP_MEMRECALL = SDL3.SDLK_KP_MEMRECALL, SDLK_KP_MEMCLEAR = SDL3.SDLK_KP_MEMCLEAR, @@ -169,6 +209,7 @@ namespace SDL SDLK_KP_MEMSUBTRACT = SDL3.SDLK_KP_MEMSUBTRACT, SDLK_KP_MEMMULTIPLY = SDL3.SDLK_KP_MEMMULTIPLY, SDLK_KP_MEMDIVIDE = SDL3.SDLK_KP_MEMDIVIDE, + SDLK_KP_PLUSMINUS = SDL3.SDLK_KP_PLUSMINUS, SDLK_KP_CLEAR = SDL3.SDLK_KP_CLEAR, SDLK_KP_CLEARENTRY = SDL3.SDLK_KP_CLEARENTRY, SDLK_KP_BINARY = SDL3.SDLK_KP_BINARY, diff --git a/SDL3-CS/SDL3/SDL_pixels.cs b/SDL3-CS/SDL3/SDL_pixels.cs index f23cfb2..385826b 100644 --- a/SDL3-CS/SDL3/SDL_pixels.cs +++ b/SDL3-CS/SDL3/SDL_pixels.cs @@ -5,7 +5,7 @@ using System; namespace SDL { - using static SDL_PixelFormatEnum; + using static SDL_PixelFormat; using static SDL_PixelType; using static SDL_PackedOrder; using static SDL_PackedLayout; @@ -15,30 +15,30 @@ namespace SDL public static partial class SDL3 { [Macro] - public static SDL_PixelFormatEnum SDL_DEFINE_PIXELFOURCC(byte A, byte B, byte C, byte D) => (SDL_PixelFormatEnum)SDL_FOURCC(A, B, C, D); + public static SDL_PixelFormat SDL_DEFINE_PIXELFOURCC(byte A, byte B, byte C, byte D) => (SDL_PixelFormat)SDL_FOURCC(A, B, C, D); [Macro] - public static SDL_PixelFormatEnum SDL_DEFINE_PIXELFORMAT(int type, int order, int layout, int bits, int bytes) - => (SDL_PixelFormatEnum)((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | - ((bits) << 8) | ((bytes) << 0)); + public static SDL_PixelFormat SDL_DEFINE_PIXELFORMAT(int type, int order, int layout, int bits, int bytes) + => (SDL_PixelFormat)((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | + ((bits) << 8) | ((bytes) << 0)); [Macro] - public static int SDL_PIXELFLAG(SDL_PixelFormatEnum X) => ((int)X >> 28) & 0x0F; + public static int SDL_PIXELFLAG(SDL_PixelFormat X) => ((int)X >> 28) & 0x0F; [Macro] - public static SDL_PixelType SDL_PIXELTYPE(SDL_PixelFormatEnum X) => (SDL_PixelType)(((int)X >> 24) & 0x0F); + public static SDL_PixelType SDL_PIXELTYPE(SDL_PixelFormat X) => (SDL_PixelType)(((int)X >> 24) & 0x0F); [Macro] - public static SDL_PackedOrder SDL_PIXELORDER(SDL_PixelFormatEnum X) => (SDL_PackedOrder)(((int)X >> 20) & 0x0F); + public static SDL_PackedOrder SDL_PIXELORDER(SDL_PixelFormat X) => (SDL_PackedOrder)(((int)X >> 20) & 0x0F); [Macro] - public static SDL_PackedLayout SDL_PIXELLAYOUT(SDL_PixelFormatEnum X) => (SDL_PackedLayout)(((int)X >> 16) & 0x0F); + public static SDL_PackedLayout SDL_PIXELLAYOUT(SDL_PixelFormat X) => (SDL_PackedLayout)(((int)X >> 16) & 0x0F); [Macro] - public static int SDL_BITSPERPIXEL(SDL_PixelFormatEnum X) => ((int)X >> 8) & 0xFF; + public static int SDL_BITSPERPIXEL(SDL_PixelFormat X) => ((int)X >> 8) & 0xFF; [Macro] - public static int SDL_BYTESPERPIXEL(SDL_PixelFormatEnum X) => + public static int SDL_BYTESPERPIXEL(SDL_PixelFormat X) => (SDL_ISPIXELFORMAT_FOURCC(X) ? ((((X) == SDL_PIXELFORMAT_YUY2) || ((X) == SDL_PIXELFORMAT_UYVY) || @@ -49,7 +49,7 @@ namespace SDL : ((((int)X) >> 0) & 0xFF)); [Macro] - public static bool SDL_ISPIXELFORMAT_INDEXED(SDL_PixelFormatEnum format) => + public static bool SDL_ISPIXELFORMAT_INDEXED(SDL_PixelFormat format) => (!SDL_ISPIXELFORMAT_FOURCC(format) && ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX2) || @@ -57,14 +57,14 @@ namespace SDL (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8))); [Macro] - public static bool SDL_ISPIXELFORMAT_PACKED(SDL_PixelFormatEnum format) => + public static bool SDL_ISPIXELFORMAT_PACKED(SDL_PixelFormat format) => (!SDL_ISPIXELFORMAT_FOURCC(format) && ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED8) || (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED16) || (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32))); [Macro] - public static bool SDL_ISPIXELFORMAT_ARRAY(SDL_PixelFormatEnum format) => + public static bool SDL_ISPIXELFORMAT_ARRAY(SDL_PixelFormat format) => (!SDL_ISPIXELFORMAT_FOURCC(format) && ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU8) || (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU16) || @@ -73,7 +73,7 @@ namespace SDL (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32))); [Macro] - public static bool SDL_ISPIXELFORMAT_ALPHA(SDL_PixelFormatEnum format) => + public static bool SDL_ISPIXELFORMAT_ALPHA(SDL_PixelFormat format) => ((SDL_ISPIXELFORMAT_PACKED(format) && ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || @@ -81,19 +81,19 @@ namespace SDL (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA)))); [Macro] - public static bool SDL_ISPIXELFORMAT_10BIT(SDL_PixelFormatEnum format) => + public static bool SDL_ISPIXELFORMAT_10BIT(SDL_PixelFormat format) => (!SDL_ISPIXELFORMAT_FOURCC(format) && ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32) && (SDL_PIXELLAYOUT(format) == SDL_PACKEDLAYOUT_2101010))); [Macro] - public static bool SDL_ISPIXELFORMAT_FLOAT(SDL_PixelFormatEnum format) => + public static bool SDL_ISPIXELFORMAT_FLOAT(SDL_PixelFormat format) => (!SDL_ISPIXELFORMAT_FOURCC(format) && ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32))); [Macro] - public static bool SDL_ISPIXELFORMAT_FOURCC(SDL_PixelFormatEnum format) => + public static bool SDL_ISPIXELFORMAT_FOURCC(SDL_PixelFormat format) => ((format != 0) && (SDL_PIXELFLAG(format) != 1)); [Macro] diff --git a/SDL3-CS/SDL3/SDL_pixels.rsp b/SDL3-CS/SDL3/SDL_pixels.rsp index cb9544c..bd92e05 100644 --- a/SDL3-CS/SDL3/SDL_pixels.rsp +++ b/SDL3-CS/SDL3/SDL_pixels.rsp @@ -4,4 +4,4 @@ # Fix errors with uint -> int conversion --with-type SDL_Colorspace=uint -SDL_PixelFormatEnum=uint +SDL_PixelFormat=uint diff --git a/SDL3-CS/SDL3/SDL_surface.cs b/SDL3-CS/SDL3/SDL_surface.cs index 0f1b7ce..f401788 100644 --- a/SDL3-CS/SDL3/SDL_surface.cs +++ b/SDL3-CS/SDL3/SDL_surface.cs @@ -9,16 +9,15 @@ namespace SDL [Typedef] public enum SDL_SurfaceFlags : UInt32 { - SDL_PREALLOC = SDL3.SDL_PREALLOC, - SDL_RLEACCEL = SDL3.SDL_RLEACCEL, - SDL_DONTFREE = SDL3.SDL_DONTFREE, - SDL_SIMD_ALIGNED = SDL3.SDL_SIMD_ALIGNED, - SDL_SURFACE_USES_PROPERTIES = SDL3.SDL_SURFACE_USES_PROPERTIES, + SDL_SURFACE_PREALLOCATED = SDL3.SDL_SURFACE_PREALLOCATED, + SDL_SURFACE_LOCK_NEEDED = SDL3.SDL_SURFACE_LOCK_NEEDED, + SDL_SURFACE_LOCKED = SDL3.SDL_SURFACE_LOCKED, + SDL_SURFACE_SIMD_ALIGNED = SDL3.SDL_SURFACE_SIMD_ALIGNED } public static partial class SDL3 { [Macro] - public static unsafe bool SDL_MUSTLOCK(SDL_Surface* S) => (((S)->flags & SDL_SurfaceFlags.SDL_RLEACCEL) != 0); + public static unsafe bool SDL_MUSTLOCK(SDL_Surface* S) => ((uint)S->flags & (SDL_SURFACE_LOCK_NEEDED | SDL_SURFACE_LOCKED)) == SDL_SURFACE_LOCK_NEEDED; } } From cffad94b9b2fb7498db48ced40c5a3c3f897730e Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sun, 14 Jul 2024 15:49:53 +0200 Subject: [PATCH 5/5] Avoid casting --- SDL3-CS/SDL3/SDL_surface.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDL3-CS/SDL3/SDL_surface.cs b/SDL3-CS/SDL3/SDL_surface.cs index f401788..de954ba 100644 --- a/SDL3-CS/SDL3/SDL_surface.cs +++ b/SDL3-CS/SDL3/SDL_surface.cs @@ -18,6 +18,6 @@ namespace SDL public static partial class SDL3 { [Macro] - public static unsafe bool SDL_MUSTLOCK(SDL_Surface* S) => ((uint)S->flags & (SDL_SURFACE_LOCK_NEEDED | SDL_SURFACE_LOCKED)) == SDL_SURFACE_LOCK_NEEDED; + public static unsafe bool SDL_MUSTLOCK(SDL_Surface* S) => (S->flags & (SDL_SurfaceFlags.SDL_SURFACE_LOCK_NEEDED | SDL_SurfaceFlags.SDL_SURFACE_LOCKED)) == SDL_SurfaceFlags.SDL_SURFACE_LOCK_NEEDED; } }