mirror of https://github.com/ppy/SDL3-CS.git
Merge pull request #103 from hwsmm/update-bindings
Update bindings (no merging needed)
This commit is contained in:
commit
7455e1c379
|
|
@ -28,6 +28,19 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace SDL
|
||||
{
|
||||
[NativeTypeName("int")]
|
||||
public enum SDL_AudioFormat : uint
|
||||
{
|
||||
SDL_AUDIO_U8 = 0x0008U,
|
||||
SDL_AUDIO_S8 = 0x8008U,
|
||||
SDL_AUDIO_S16LE = 0x8010U,
|
||||
SDL_AUDIO_S16BE = 0x9010U,
|
||||
SDL_AUDIO_S32LE = 0x8020U,
|
||||
SDL_AUDIO_S32BE = 0x9020U,
|
||||
SDL_AUDIO_F32LE = 0x8120U,
|
||||
SDL_AUDIO_F32BE = 0x9120U,
|
||||
}
|
||||
|
||||
public partial struct SDL_AudioSpec
|
||||
{
|
||||
public SDL_AudioFormat format;
|
||||
|
|
@ -68,7 +81,6 @@ namespace SDL
|
|||
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)]
|
||||
|
|
@ -132,11 +144,9 @@ namespace SDL
|
|||
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)]
|
||||
|
|
@ -205,30 +215,6 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetSilenceValueForFormat(SDL_AudioFormat format);
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_U8 0x0008u")]
|
||||
public const uint SDL_AUDIO_U8 = 0x0008U;
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_S8 0x8008u")]
|
||||
public const uint SDL_AUDIO_S8 = 0x8008U;
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_S16LE 0x8010u")]
|
||||
public const uint SDL_AUDIO_S16LE = 0x8010U;
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_S16BE 0x9010u")]
|
||||
public const uint SDL_AUDIO_S16BE = 0x9010U;
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_S32LE 0x8020u")]
|
||||
public const uint SDL_AUDIO_S32LE = 0x8020U;
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_S32BE 0x9020u")]
|
||||
public const uint SDL_AUDIO_S32BE = 0x9020U;
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_F32LE 0x8120u")]
|
||||
public const uint SDL_AUDIO_F32LE = 0x8120U;
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_F32BE 0x9120u")]
|
||||
public const uint SDL_AUDIO_F32BE = 0x9120U;
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_MASK_BITSIZE (0xFFu)")]
|
||||
public const uint SDL_AUDIO_MASK_BITSIZE = (0xFFU);
|
||||
|
||||
|
|
@ -241,10 +227,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_PLAYBACK ((SDL_AudioDeviceID) 0xFFFFFFFF)")]
|
||||
public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK = ((SDL_AudioDeviceID)(0xFFFFFFFF));
|
||||
[NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK ((SDL_AudioDeviceID) 0xFFFFFFFFu)")]
|
||||
public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK = ((SDL_AudioDeviceID)(0xFFFFFFFFU));
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_RECORDING ((SDL_AudioDeviceID) 0xFFFFFFFE)")]
|
||||
public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_RECORDING = ((SDL_AudioDeviceID)(0xFFFFFFFE));
|
||||
[NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_RECORDING ((SDL_AudioDeviceID) 0xFFFFFFFEu)")]
|
||||
public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_RECORDING = ((SDL_AudioDeviceID)(0xFFFFFFFEU));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,9 +61,15 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_BLENDMODE_BLEND 0x00000001u")]
|
||||
public const uint SDL_BLENDMODE_BLEND = 0x00000001U;
|
||||
|
||||
[NativeTypeName("#define SDL_BLENDMODE_BLEND_PREMULTIPLIED 0x00000010u")]
|
||||
public const uint SDL_BLENDMODE_BLEND_PREMULTIPLIED = 0x00000010U;
|
||||
|
||||
[NativeTypeName("#define SDL_BLENDMODE_ADD 0x00000002u")]
|
||||
public const uint SDL_BLENDMODE_ADD = 0x00000002U;
|
||||
|
||||
[NativeTypeName("#define SDL_BLENDMODE_ADD_PREMULTIPLIED 0x00000020u")]
|
||||
public const uint SDL_BLENDMODE_ADD_PREMULTIPLIED = 0x00000020U;
|
||||
|
||||
[NativeTypeName("#define SDL_BLENDMODE_MOD 0x00000004u")]
|
||||
public const uint SDL_BLENDMODE_MOD = 0x00000004U;
|
||||
|
||||
|
|
|
|||
|
|
@ -67,26 +67,26 @@ namespace SDL
|
|||
public static extern byte* Unsafe_SDL_GetCurrentCameraDriver();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_CameraDeviceID* SDL_GetCameraDevices(int* count);
|
||||
public static extern SDL_CameraID* SDL_GetCameras(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_CameraSpec* SDL_GetCameraDeviceSupportedFormats(SDL_CameraDeviceID devid, int* count);
|
||||
public static extern SDL_CameraSpec** SDL_GetCameraSupportedFormats(SDL_CameraID devid, int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetCameraDeviceName", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetCameraName", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Unsafe_SDL_GetCameraDeviceName(SDL_CameraDeviceID instance_id);
|
||||
public static extern byte* Unsafe_SDL_GetCameraName(SDL_CameraID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_CameraPosition SDL_GetCameraDevicePosition(SDL_CameraDeviceID instance_id);
|
||||
public static extern SDL_CameraPosition SDL_GetCameraPosition(SDL_CameraID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Camera* SDL_OpenCameraDevice(SDL_CameraDeviceID instance_id, [NativeTypeName("const SDL_CameraSpec *")] SDL_CameraSpec* spec);
|
||||
public static extern SDL_Camera* SDL_OpenCamera(SDL_CameraID instance_id, [NativeTypeName("const SDL_CameraSpec *")] SDL_CameraSpec* spec);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetCameraPermissionState(SDL_Camera* camera);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_CameraDeviceID SDL_GetCameraInstanceID(SDL_Camera* camera);
|
||||
public static extern SDL_CameraID SDL_GetCameraID(SDL_Camera* camera);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PropertiesID SDL_GetCameraProperties(SDL_Camera* camera);
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ namespace SDL
|
|||
SDL_EVENT_DISPLAY_ADDED,
|
||||
SDL_EVENT_DISPLAY_REMOVED,
|
||||
SDL_EVENT_DISPLAY_MOVED,
|
||||
SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED,
|
||||
SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED,
|
||||
SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED,
|
||||
SDL_EVENT_DISPLAY_FIRST = SDL_EVENT_DISPLAY_ORIENTATION,
|
||||
SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED,
|
||||
|
|
@ -54,6 +56,7 @@ namespace SDL
|
|||
SDL_EVENT_WINDOW_MOVED,
|
||||
SDL_EVENT_WINDOW_RESIZED,
|
||||
SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED,
|
||||
SDL_EVENT_WINDOW_METAL_VIEW_RESIZED,
|
||||
SDL_EVENT_WINDOW_MINIMIZED,
|
||||
SDL_EVENT_WINDOW_MAXIMIZED,
|
||||
SDL_EVENT_WINDOW_RESTORED,
|
||||
|
|
@ -66,6 +69,7 @@ namespace SDL
|
|||
SDL_EVENT_WINDOW_ICCPROF_CHANGED,
|
||||
SDL_EVENT_WINDOW_DISPLAY_CHANGED,
|
||||
SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED,
|
||||
SDL_EVENT_WINDOW_SAFE_AREA_CHANGED,
|
||||
SDL_EVENT_WINDOW_OCCLUDED,
|
||||
SDL_EVENT_WINDOW_ENTER_FULLSCREEN,
|
||||
SDL_EVENT_WINDOW_LEAVE_FULLSCREEN,
|
||||
|
|
@ -74,7 +78,7 @@ namespace SDL
|
|||
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_WINDOW_LAST = SDL_EVENT_WINDOW_HDR_STATE_CHANGED,
|
||||
SDL_EVENT_KEY_DOWN = 0x300,
|
||||
SDL_EVENT_KEY_UP,
|
||||
SDL_EVENT_TEXT_EDITING,
|
||||
|
|
@ -166,6 +170,9 @@ namespace SDL
|
|||
|
||||
[NativeTypeName("Sint32")]
|
||||
public int data1;
|
||||
|
||||
[NativeTypeName("Sint32")]
|
||||
public int data2;
|
||||
}
|
||||
|
||||
public partial struct SDL_WindowEvent
|
||||
|
|
@ -685,7 +692,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
public SDL_CameraDeviceID which;
|
||||
public SDL_CameraID which;
|
||||
}
|
||||
|
||||
public partial struct SDL_TouchFingerEvent
|
||||
|
|
@ -1103,10 +1110,6 @@ namespace SDL
|
|||
[return: NativeTypeName("Uint32")]
|
||||
public static extern uint SDL_RegisterEvents(int numevents);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_AllocateEventMemory([NativeTypeName("size_t")] nuint size);
|
||||
|
||||
[NativeTypeName("#define SDL_RELEASED 0")]
|
||||
public const int SDL_RELEASED = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ namespace SDL
|
|||
SDL_FOLDER_SCREENSHOTS,
|
||||
SDL_FOLDER_TEMPLATES,
|
||||
SDL_FOLDER_VIDEOS,
|
||||
SDL_FOLDER_TOTAL,
|
||||
}
|
||||
|
||||
public enum SDL_PathType
|
||||
|
|
@ -68,7 +69,7 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetBasePath", ExactSpelling = true)]
|
||||
[return: NativeTypeName("char *")]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Unsafe_SDL_GetBasePath();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetPrefPath", ExactSpelling = true)]
|
||||
|
|
@ -76,7 +77,7 @@ namespace SDL
|
|||
public static extern byte* Unsafe_SDL_GetPrefPath([NativeTypeName("const char *")] byte* org, [NativeTypeName("const char *")] byte* app);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetUserFolder", ExactSpelling = true)]
|
||||
[return: NativeTypeName("char *")]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Unsafe_SDL_GetUserFolder(SDL_Folder folder);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
|
|
@ -91,6 +92,9 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_RenamePath([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_CopyFile([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetPathInfo([NativeTypeName("const char *")] byte* path, SDL_PathInfo* info);
|
||||
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadMappingForGUID", ExactSpelling = true)]
|
||||
[return: NativeTypeName("char *")]
|
||||
public static extern byte* Unsafe_SDL_GetGamepadMappingForGUID([NativeTypeName("SDL_JoystickGUID")] SDL_GUID guid);
|
||||
public static extern byte* Unsafe_SDL_GetGamepadMappingForGUID(SDL_GUID guid);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadMapping", ExactSpelling = true)]
|
||||
[return: NativeTypeName("char *")]
|
||||
|
|
@ -215,48 +215,47 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_bool SDL_IsGamepad(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadInstanceName", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadNameForID", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Unsafe_SDL_GetGamepadInstanceName(SDL_JoystickID instance_id);
|
||||
public static extern byte* Unsafe_SDL_GetGamepadNameForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadInstancePath", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadPathForID", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Unsafe_SDL_GetGamepadInstancePath(SDL_JoystickID instance_id);
|
||||
public static extern byte* Unsafe_SDL_GetGamepadPathForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetGamepadInstancePlayerIndex(SDL_JoystickID instance_id);
|
||||
public static extern int SDL_GetGamepadPlayerIndexForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_JoystickGUID")]
|
||||
public static extern SDL_GUID SDL_GetGamepadInstanceGUID(SDL_JoystickID instance_id);
|
||||
public static extern SDL_GUID SDL_GetGamepadGUIDForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint16")]
|
||||
public static extern ushort SDL_GetGamepadInstanceVendor(SDL_JoystickID instance_id);
|
||||
public static extern ushort SDL_GetGamepadVendorForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint16")]
|
||||
public static extern ushort SDL_GetGamepadInstanceProduct(SDL_JoystickID instance_id);
|
||||
public static extern ushort SDL_GetGamepadProductForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint16")]
|
||||
public static extern ushort SDL_GetGamepadInstanceProductVersion(SDL_JoystickID instance_id);
|
||||
public static extern ushort SDL_GetGamepadProductVersionForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GamepadType SDL_GetGamepadInstanceType(SDL_JoystickID instance_id);
|
||||
public static extern SDL_GamepadType SDL_GetGamepadTypeForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GamepadType SDL_GetRealGamepadInstanceType(SDL_JoystickID instance_id);
|
||||
public static extern SDL_GamepadType SDL_GetRealGamepadTypeForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadInstanceMapping", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadMappingForID", ExactSpelling = true)]
|
||||
[return: NativeTypeName("char *")]
|
||||
public static extern byte* Unsafe_SDL_GetGamepadInstanceMapping(SDL_JoystickID instance_id);
|
||||
public static extern byte* Unsafe_SDL_GetGamepadMappingForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Gamepad* SDL_OpenGamepad(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Gamepad* SDL_GetGamepadFromInstanceID(SDL_JoystickID instance_id);
|
||||
public static extern SDL_Gamepad* SDL_GetGamepadFromID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Gamepad* SDL_GetGamepadFromPlayerIndex(int player_index);
|
||||
|
|
@ -265,7 +264,7 @@ namespace SDL
|
|||
public static extern SDL_PropertiesID SDL_GetGamepadProperties(SDL_Gamepad* gamepad);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_JoystickID SDL_GetGamepadInstanceID(SDL_Gamepad* gamepad);
|
||||
public static extern SDL_JoystickID SDL_GetGamepadID(SDL_Gamepad* gamepad);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadName", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GUIDToString(SDL_GUID guid, [NativeTypeName("char *")] byte* pszGUID, int cbGUID);
|
||||
public static extern void SDL_GUIDToString(SDL_GUID guid, [NativeTypeName("char *")] byte* pszGUID, int cbGUID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GUID SDL_GUIDFromString([NativeTypeName("const char *")] byte* pchGUID);
|
||||
public static extern SDL_GUID SDL_StringToGUID([NativeTypeName("const char *")] byte* pchGUID);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -328,18 +328,18 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_HapticID* SDL_GetHaptics(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetHapticInstanceName", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetHapticNameForID", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Unsafe_SDL_GetHapticInstanceName(SDL_HapticID instance_id);
|
||||
public static extern byte* Unsafe_SDL_GetHapticNameForID(SDL_HapticID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Haptic* SDL_OpenHaptic(SDL_HapticID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Haptic* SDL_GetHapticFromInstanceID(SDL_HapticID instance_id);
|
||||
public static extern SDL_Haptic* SDL_GetHapticFromID(SDL_HapticID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_HapticID SDL_GetHapticInstanceID(SDL_Haptic* haptic);
|
||||
public static extern SDL_HapticID SDL_GetHapticID(SDL_Haptic* haptic);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetHapticName", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
|
|
|
|||
|
|
@ -71,9 +71,6 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE \"SDL_ANDROID_BLOCK_ON_PAUSE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_ANDROID_BLOCK_ON_PAUSE => "SDL_ANDROID_BLOCK_ON_PAUSE"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO \"SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO => "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON \"SDL_ANDROID_TRAP_BACK_BUTTON\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_ANDROID_TRAP_BACK_BUTTON => "SDL_ANDROID_TRAP_BACK_BUTTON"u8;
|
||||
|
||||
|
|
@ -410,6 +407,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME \"SDL_MOUSE_DOUBLE_CLICK_TIME\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_DOUBLE_CLICK_TIME => "SDL_MOUSE_DOUBLE_CLICK_TIME"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE \"SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE => "SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH \"SDL_MOUSE_FOCUS_CLICKTHROUGH\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH => "SDL_MOUSE_FOCUS_CLICKTHROUGH"u8;
|
||||
|
||||
|
|
@ -554,9 +554,6 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR \"SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR => "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP \"SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP => "SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION \"SDL_VIDEO_WAYLAND_MODE_EMULATION\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION => "SDL_VIDEO_WAYLAND_MODE_EMULATION"u8;
|
||||
|
||||
|
|
|
|||
|
|
@ -172,41 +172,40 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_JoystickID* SDL_GetJoysticks(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetJoystickInstanceName", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetJoystickNameForID", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Unsafe_SDL_GetJoystickInstanceName(SDL_JoystickID instance_id);
|
||||
public static extern byte* Unsafe_SDL_GetJoystickNameForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetJoystickInstancePath", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetJoystickPathForID", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Unsafe_SDL_GetJoystickInstancePath(SDL_JoystickID instance_id);
|
||||
public static extern byte* Unsafe_SDL_GetJoystickPathForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetJoystickInstancePlayerIndex(SDL_JoystickID instance_id);
|
||||
public static extern int SDL_GetJoystickPlayerIndexForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_JoystickGUID")]
|
||||
public static extern SDL_GUID SDL_GetJoystickInstanceGUID(SDL_JoystickID instance_id);
|
||||
public static extern SDL_GUID SDL_GetJoystickGUIDForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint16")]
|
||||
public static extern ushort SDL_GetJoystickInstanceVendor(SDL_JoystickID instance_id);
|
||||
public static extern ushort SDL_GetJoystickVendorForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint16")]
|
||||
public static extern ushort SDL_GetJoystickInstanceProduct(SDL_JoystickID instance_id);
|
||||
public static extern ushort SDL_GetJoystickProductForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint16")]
|
||||
public static extern ushort SDL_GetJoystickInstanceProductVersion(SDL_JoystickID instance_id);
|
||||
public static extern ushort SDL_GetJoystickProductVersionForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_JoystickType SDL_GetJoystickInstanceType(SDL_JoystickID instance_id);
|
||||
public static extern SDL_JoystickType SDL_GetJoystickTypeForID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Joystick* SDL_OpenJoystick(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Joystick* SDL_GetJoystickFromInstanceID(SDL_JoystickID instance_id);
|
||||
public static extern SDL_Joystick* SDL_GetJoystickFromID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Joystick* SDL_GetJoystickFromPlayerIndex(int player_index);
|
||||
|
|
@ -256,7 +255,6 @@ namespace SDL
|
|||
public static extern int SDL_SetJoystickPlayerIndex(SDL_Joystick* joystick, int player_index);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_JoystickGUID")]
|
||||
public static extern SDL_GUID SDL_GetJoystickGUID(SDL_Joystick* joystick);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
|
|
@ -283,20 +281,13 @@ namespace SDL
|
|||
public static extern SDL_JoystickType SDL_GetJoystickType(SDL_Joystick* joystick);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetJoystickGUIDString([NativeTypeName("SDL_JoystickGUID")] SDL_GUID guid, [NativeTypeName("char *")] byte* pszGUID, int cbGUID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_JoystickGUID")]
|
||||
public static extern SDL_GUID SDL_GetJoystickGUIDFromString([NativeTypeName("const char *")] byte* pchGUID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_GetJoystickGUIDInfo([NativeTypeName("SDL_JoystickGUID")] SDL_GUID guid, [NativeTypeName("Uint16 *")] ushort* vendor, [NativeTypeName("Uint16 *")] ushort* product, [NativeTypeName("Uint16 *")] ushort* version, [NativeTypeName("Uint16 *")] ushort* crc16);
|
||||
public static extern void SDL_GetJoystickGUIDInfo(SDL_GUID guid, [NativeTypeName("Uint16 *")] ushort* vendor, [NativeTypeName("Uint16 *")] ushort* product, [NativeTypeName("Uint16 *")] ushort* version, [NativeTypeName("Uint16 *")] ushort* crc16);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_bool SDL_JoystickConnected(SDL_Joystick* joystick);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_JoystickID SDL_GetJoystickInstanceID(SDL_Joystick* joystick);
|
||||
public static extern SDL_JoystickID SDL_GetJoystickID(SDL_Joystick* joystick);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetNumJoystickAxes(SDL_Joystick* joystick);
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_KeyboardID* SDL_GetKeyboards(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetKeyboardInstanceName", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetKeyboardNameForID", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Unsafe_SDL_GetKeyboardInstanceName(SDL_KeyboardID instance_id);
|
||||
public static extern byte* Unsafe_SDL_GetKeyboardNameForID(SDL_KeyboardID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Window* SDL_GetKeyboardFocus();
|
||||
|
|
|
|||
|
|
@ -39,6 +39,6 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Locale* SDL_GetPreferredLocales();
|
||||
public static extern SDL_Locale** SDL_GetPreferredLocales(int* count);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,9 +70,9 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_MouseID* SDL_GetMice(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetMouseInstanceName", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetMouseNameForID", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Unsafe_SDL_GetMouseInstanceName(SDL_MouseID instance_id);
|
||||
public static extern byte* Unsafe_SDL_GetMouseNameForID(SDL_MouseID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Window* SDL_GetMouseFocus();
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ namespace SDL
|
|||
public static extern int SDL_WaitSemaphoreTimeout(SDL_Semaphore* sem, [NativeTypeName("Sint32")] int timeoutMS);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_PostSemaphore(SDL_Semaphore* sem);
|
||||
public static extern int SDL_SignalSemaphore(SDL_Semaphore* sem);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint32")]
|
||||
|
|
|
|||
|
|
@ -25,17 +25,8 @@
|
|||
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using static SDL.SDL_ArrayOrder;
|
||||
using static SDL.SDL_BitmapOrder;
|
||||
using static SDL.SDL_ChromaLocation;
|
||||
using static SDL.SDL_ColorPrimaries;
|
||||
using static SDL.SDL_ColorRange;
|
||||
using static SDL.SDL_ColorType;
|
||||
using static SDL.SDL_MatrixCoefficients;
|
||||
using static SDL.SDL_PackedLayout;
|
||||
using static SDL.SDL_PackedOrder;
|
||||
using static SDL.SDL_PixelType;
|
||||
using static SDL.SDL_TransferCharacteristics;
|
||||
using static SDL.SDL_Colorspace;
|
||||
using static SDL.SDL_PixelFormat;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
|
|
@ -103,78 +94,70 @@ namespace SDL
|
|||
[NativeTypeName("int")]
|
||||
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)),
|
||||
SDL_PIXELFORMAT_INDEX1MSB = ((1 << 28) | ((SDL_PIXELTYPE_INDEX1) << 24) | ((SDL_BITMAPORDER_1234) << 20) | ((0) << 16) | ((1) << 8) | ((0) << 0)),
|
||||
SDL_PIXELFORMAT_INDEX2LSB = ((1 << 28) | ((SDL_PIXELTYPE_INDEX2) << 24) | ((SDL_BITMAPORDER_4321) << 20) | ((0) << 16) | ((2) << 8) | ((0) << 0)),
|
||||
SDL_PIXELFORMAT_INDEX2MSB = ((1 << 28) | ((SDL_PIXELTYPE_INDEX2) << 24) | ((SDL_BITMAPORDER_1234) << 20) | ((0) << 16) | ((2) << 8) | ((0) << 0)),
|
||||
SDL_PIXELFORMAT_INDEX4LSB = ((1 << 28) | ((SDL_PIXELTYPE_INDEX4) << 24) | ((SDL_BITMAPORDER_4321) << 20) | ((0) << 16) | ((4) << 8) | ((0) << 0)),
|
||||
SDL_PIXELFORMAT_INDEX4MSB = ((1 << 28) | ((SDL_PIXELTYPE_INDEX4) << 24) | ((SDL_BITMAPORDER_1234) << 20) | ((0) << 16) | ((4) << 8) | ((0) << 0)),
|
||||
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_XBGR4444 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XBGR) << 20) | ((SDL_PACKEDLAYOUT_4444) << 16) | ((12) << 8) | ((2) << 0)),
|
||||
SDL_PIXELFORMAT_XRGB1555 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((15) << 8) | ((2) << 0)),
|
||||
SDL_PIXELFORMAT_XBGR1555 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XBGR) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((15) << 8) | ((2) << 0)),
|
||||
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)),
|
||||
SDL_PIXELFORMAT_BGRA4444 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_BGRA) << 20) | ((SDL_PACKEDLAYOUT_4444) << 16) | ((16) << 8) | ((2) << 0)),
|
||||
SDL_PIXELFORMAT_ARGB1555 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_ARGB) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((16) << 8) | ((2) << 0)),
|
||||
SDL_PIXELFORMAT_RGBA5551 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_RGBA) << 20) | ((SDL_PACKEDLAYOUT_5551) << 16) | ((16) << 8) | ((2) << 0)),
|
||||
SDL_PIXELFORMAT_ABGR1555 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_ABGR) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((16) << 8) | ((2) << 0)),
|
||||
SDL_PIXELFORMAT_BGRA5551 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_BGRA) << 20) | ((SDL_PACKEDLAYOUT_5551) << 16) | ((16) << 8) | ((2) << 0)),
|
||||
SDL_PIXELFORMAT_RGB565 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_565) << 16) | ((16) << 8) | ((2) << 0)),
|
||||
SDL_PIXELFORMAT_BGR565 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XBGR) << 20) | ((SDL_PACKEDLAYOUT_565) << 16) | ((16) << 8) | ((2) << 0)),
|
||||
SDL_PIXELFORMAT_RGB24 = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYU8) << 24) | ((SDL_ARRAYORDER_RGB) << 20) | ((0) << 16) | ((24) << 8) | ((3) << 0)),
|
||||
SDL_PIXELFORMAT_BGR24 = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYU8) << 24) | ((SDL_ARRAYORDER_BGR) << 20) | ((0) << 16) | ((24) << 8) | ((3) << 0)),
|
||||
SDL_PIXELFORMAT_XRGB8888 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((24) << 8) | ((4) << 0)),
|
||||
SDL_PIXELFORMAT_RGBX8888 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_RGBX) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((24) << 8) | ((4) << 0)),
|
||||
SDL_PIXELFORMAT_XBGR8888 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_XBGR) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((24) << 8) | ((4) << 0)),
|
||||
SDL_PIXELFORMAT_BGRX8888 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_BGRX) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((24) << 8) | ((4) << 0)),
|
||||
SDL_PIXELFORMAT_ARGB8888 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_ARGB) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)),
|
||||
SDL_PIXELFORMAT_RGBA8888 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_RGBA) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)),
|
||||
SDL_PIXELFORMAT_ABGR8888 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_ABGR) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)),
|
||||
SDL_PIXELFORMAT_BGRA8888 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_BGRA) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)),
|
||||
SDL_PIXELFORMAT_XRGB2101010 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_2101010) << 16) | ((32) << 8) | ((4) << 0)),
|
||||
SDL_PIXELFORMAT_XBGR2101010 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_XBGR) << 20) | ((SDL_PACKEDLAYOUT_2101010) << 16) | ((32) << 8) | ((4) << 0)),
|
||||
SDL_PIXELFORMAT_ARGB2101010 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_ARGB) << 20) | ((SDL_PACKEDLAYOUT_2101010) << 16) | ((32) << 8) | ((4) << 0)),
|
||||
SDL_PIXELFORMAT_ABGR2101010 = ((1 << 28) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_ABGR) << 20) | ((SDL_PACKEDLAYOUT_2101010) << 16) | ((32) << 8) | ((4) << 0)),
|
||||
SDL_PIXELFORMAT_RGB48 = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYU16) << 24) | ((SDL_ARRAYORDER_RGB) << 20) | ((0) << 16) | ((48) << 8) | ((6) << 0)),
|
||||
SDL_PIXELFORMAT_BGR48 = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYU16) << 24) | ((SDL_ARRAYORDER_BGR) << 20) | ((0) << 16) | ((48) << 8) | ((6) << 0)),
|
||||
SDL_PIXELFORMAT_RGBA64 = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYU16) << 24) | ((SDL_ARRAYORDER_RGBA) << 20) | ((0) << 16) | ((64) << 8) | ((8) << 0)),
|
||||
SDL_PIXELFORMAT_ARGB64 = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYU16) << 24) | ((SDL_ARRAYORDER_ARGB) << 20) | ((0) << 16) | ((64) << 8) | ((8) << 0)),
|
||||
SDL_PIXELFORMAT_BGRA64 = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYU16) << 24) | ((SDL_ARRAYORDER_BGRA) << 20) | ((0) << 16) | ((64) << 8) | ((8) << 0)),
|
||||
SDL_PIXELFORMAT_ABGR64 = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYU16) << 24) | ((SDL_ARRAYORDER_ABGR) << 20) | ((0) << 16) | ((64) << 8) | ((8) << 0)),
|
||||
SDL_PIXELFORMAT_RGB48_FLOAT = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYF16) << 24) | ((SDL_ARRAYORDER_RGB) << 20) | ((0) << 16) | ((48) << 8) | ((6) << 0)),
|
||||
SDL_PIXELFORMAT_BGR48_FLOAT = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYF16) << 24) | ((SDL_ARRAYORDER_BGR) << 20) | ((0) << 16) | ((48) << 8) | ((6) << 0)),
|
||||
SDL_PIXELFORMAT_RGBA64_FLOAT = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYF16) << 24) | ((SDL_ARRAYORDER_RGBA) << 20) | ((0) << 16) | ((64) << 8) | ((8) << 0)),
|
||||
SDL_PIXELFORMAT_ARGB64_FLOAT = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYF16) << 24) | ((SDL_ARRAYORDER_ARGB) << 20) | ((0) << 16) | ((64) << 8) | ((8) << 0)),
|
||||
SDL_PIXELFORMAT_BGRA64_FLOAT = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYF16) << 24) | ((SDL_ARRAYORDER_BGRA) << 20) | ((0) << 16) | ((64) << 8) | ((8) << 0)),
|
||||
SDL_PIXELFORMAT_ABGR64_FLOAT = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYF16) << 24) | ((SDL_ARRAYORDER_ABGR) << 20) | ((0) << 16) | ((64) << 8) | ((8) << 0)),
|
||||
SDL_PIXELFORMAT_RGB96_FLOAT = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYF32) << 24) | ((SDL_ARRAYORDER_RGB) << 20) | ((0) << 16) | ((96) << 8) | ((12) << 0)),
|
||||
SDL_PIXELFORMAT_BGR96_FLOAT = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYF32) << 24) | ((SDL_ARRAYORDER_BGR) << 20) | ((0) << 16) | ((96) << 8) | ((12) << 0)),
|
||||
SDL_PIXELFORMAT_RGBA128_FLOAT = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYF32) << 24) | ((SDL_ARRAYORDER_RGBA) << 20) | ((0) << 16) | ((128) << 8) | ((16) << 0)),
|
||||
SDL_PIXELFORMAT_ARGB128_FLOAT = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYF32) << 24) | ((SDL_ARRAYORDER_ARGB) << 20) | ((0) << 16) | ((128) << 8) | ((16) << 0)),
|
||||
SDL_PIXELFORMAT_BGRA128_FLOAT = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYF32) << 24) | ((SDL_ARRAYORDER_BGRA) << 20) | ((0) << 16) | ((128) << 8) | ((16) << 0)),
|
||||
SDL_PIXELFORMAT_ABGR128_FLOAT = ((1 << 28) | ((SDL_PIXELTYPE_ARRAYF32) << 24) | ((SDL_ARRAYORDER_ABGR) << 20) | ((0) << 16) | ((128) << 8) | ((16) << 0)),
|
||||
SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
|
||||
SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
|
||||
SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
|
||||
SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
|
||||
SDL_PIXELFORMAT_RGBX32 = SDL_PIXELFORMAT_XBGR8888,
|
||||
SDL_PIXELFORMAT_XRGB32 = SDL_PIXELFORMAT_BGRX8888,
|
||||
SDL_PIXELFORMAT_BGRX32 = SDL_PIXELFORMAT_XRGB8888,
|
||||
SDL_PIXELFORMAT_XBGR32 = SDL_PIXELFORMAT_RGBX8888,
|
||||
SDL_PIXELFORMAT_YV12 = (unchecked(((uint)((byte)('Y')) << 0) | ((uint)((byte)('V')) << 8) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('2')) << 24))),
|
||||
SDL_PIXELFORMAT_IYUV = (unchecked(((uint)((byte)('I')) << 0) | ((uint)((byte)('Y')) << 8) | ((uint)((byte)('U')) << 16) | ((uint)((byte)('V')) << 24))),
|
||||
SDL_PIXELFORMAT_YUY2 = (unchecked(((uint)((byte)('Y')) << 0) | ((uint)((byte)('U')) << 8) | ((uint)((byte)('Y')) << 16) | ((uint)((byte)('2')) << 24))),
|
||||
SDL_PIXELFORMAT_UYVY = (unchecked(((uint)((byte)('U')) << 0) | ((uint)((byte)('Y')) << 8) | ((uint)((byte)('V')) << 16) | ((uint)((byte)('Y')) << 24))),
|
||||
SDL_PIXELFORMAT_YVYU = (unchecked(((uint)((byte)('Y')) << 0) | ((uint)((byte)('V')) << 8) | ((uint)((byte)('Y')) << 16) | ((uint)((byte)('U')) << 24))),
|
||||
SDL_PIXELFORMAT_NV12 = (unchecked(((uint)((byte)('N')) << 0) | ((uint)((byte)('V')) << 8) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('2')) << 24))),
|
||||
SDL_PIXELFORMAT_NV21 = (unchecked(((uint)((byte)('N')) << 0) | ((uint)((byte)('V')) << 8) | ((uint)((byte)('2')) << 16) | ((uint)((byte)('1')) << 24))),
|
||||
SDL_PIXELFORMAT_P010 = (unchecked(((uint)((byte)('P')) << 0) | ((uint)((byte)('0')) << 8) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('0')) << 24))),
|
||||
SDL_PIXELFORMAT_EXTERNAL_OES = (unchecked(((uint)((byte)('O')) << 0) | ((uint)((byte)('E')) << 8) | ((uint)((byte)('S')) << 16) | ((uint)((byte)(' ')) << 24))),
|
||||
SDL_PIXELFORMAT_UNKNOWN = 0,
|
||||
SDL_PIXELFORMAT_INDEX1LSB = 0x11100100U,
|
||||
SDL_PIXELFORMAT_INDEX1MSB = 0x11200100U,
|
||||
SDL_PIXELFORMAT_INDEX2LSB = 0x1c100200U,
|
||||
SDL_PIXELFORMAT_INDEX2MSB = 0x1c200200U,
|
||||
SDL_PIXELFORMAT_INDEX4LSB = 0x12100400U,
|
||||
SDL_PIXELFORMAT_INDEX4MSB = 0x12200400U,
|
||||
SDL_PIXELFORMAT_INDEX8 = 0x13000801U,
|
||||
SDL_PIXELFORMAT_RGB332 = 0x14110801U,
|
||||
SDL_PIXELFORMAT_XRGB4444 = 0x15120c02U,
|
||||
SDL_PIXELFORMAT_XBGR4444 = 0x15520c02U,
|
||||
SDL_PIXELFORMAT_XRGB1555 = 0x15130f02U,
|
||||
SDL_PIXELFORMAT_XBGR1555 = 0x15530f02U,
|
||||
SDL_PIXELFORMAT_ARGB4444 = 0x15321002U,
|
||||
SDL_PIXELFORMAT_RGBA4444 = 0x15421002U,
|
||||
SDL_PIXELFORMAT_ABGR4444 = 0x15721002U,
|
||||
SDL_PIXELFORMAT_BGRA4444 = 0x15821002U,
|
||||
SDL_PIXELFORMAT_ARGB1555 = 0x15331002U,
|
||||
SDL_PIXELFORMAT_RGBA5551 = 0x15441002U,
|
||||
SDL_PIXELFORMAT_ABGR1555 = 0x15731002U,
|
||||
SDL_PIXELFORMAT_BGRA5551 = 0x15841002U,
|
||||
SDL_PIXELFORMAT_RGB565 = 0x15151002U,
|
||||
SDL_PIXELFORMAT_BGR565 = 0x15551002U,
|
||||
SDL_PIXELFORMAT_RGB24 = 0x17101803U,
|
||||
SDL_PIXELFORMAT_BGR24 = 0x17401803U,
|
||||
SDL_PIXELFORMAT_XRGB8888 = 0x16161804U,
|
||||
SDL_PIXELFORMAT_RGBX8888 = 0x16261804U,
|
||||
SDL_PIXELFORMAT_XBGR8888 = 0x16561804U,
|
||||
SDL_PIXELFORMAT_BGRX8888 = 0x16661804U,
|
||||
SDL_PIXELFORMAT_ARGB8888 = 0x16362004U,
|
||||
SDL_PIXELFORMAT_RGBA8888 = 0x16462004U,
|
||||
SDL_PIXELFORMAT_ABGR8888 = 0x16762004U,
|
||||
SDL_PIXELFORMAT_BGRA8888 = 0x16862004U,
|
||||
SDL_PIXELFORMAT_XRGB2101010 = 0x16172004U,
|
||||
SDL_PIXELFORMAT_XBGR2101010 = 0x16572004U,
|
||||
SDL_PIXELFORMAT_ARGB2101010 = 0x16372004U,
|
||||
SDL_PIXELFORMAT_ABGR2101010 = 0x16772004U,
|
||||
SDL_PIXELFORMAT_RGB48 = 0x18103006U,
|
||||
SDL_PIXELFORMAT_BGR48 = 0x18403006U,
|
||||
SDL_PIXELFORMAT_RGBA64 = 0x18204008U,
|
||||
SDL_PIXELFORMAT_ARGB64 = 0x18304008U,
|
||||
SDL_PIXELFORMAT_BGRA64 = 0x18504008U,
|
||||
SDL_PIXELFORMAT_ABGR64 = 0x18604008U,
|
||||
SDL_PIXELFORMAT_RGB48_FLOAT = 0x1a103006U,
|
||||
SDL_PIXELFORMAT_BGR48_FLOAT = 0x1a403006U,
|
||||
SDL_PIXELFORMAT_RGBA64_FLOAT = 0x1a204008U,
|
||||
SDL_PIXELFORMAT_ARGB64_FLOAT = 0x1a304008U,
|
||||
SDL_PIXELFORMAT_BGRA64_FLOAT = 0x1a504008U,
|
||||
SDL_PIXELFORMAT_ABGR64_FLOAT = 0x1a604008U,
|
||||
SDL_PIXELFORMAT_RGB96_FLOAT = 0x1b10600cU,
|
||||
SDL_PIXELFORMAT_BGR96_FLOAT = 0x1b40600cU,
|
||||
SDL_PIXELFORMAT_RGBA128_FLOAT = 0x1b208010U,
|
||||
SDL_PIXELFORMAT_ARGB128_FLOAT = 0x1b308010U,
|
||||
SDL_PIXELFORMAT_BGRA128_FLOAT = 0x1b508010U,
|
||||
SDL_PIXELFORMAT_ABGR128_FLOAT = 0x1b608010U,
|
||||
SDL_PIXELFORMAT_YV12 = 0x32315659U,
|
||||
SDL_PIXELFORMAT_IYUV = 0x56555949U,
|
||||
SDL_PIXELFORMAT_YUY2 = 0x32595559U,
|
||||
SDL_PIXELFORMAT_UYVY = 0x59565955U,
|
||||
SDL_PIXELFORMAT_YVYU = 0x55595659U,
|
||||
SDL_PIXELFORMAT_NV12 = 0x3231564eU,
|
||||
SDL_PIXELFORMAT_NV21 = 0x3132564eU,
|
||||
SDL_PIXELFORMAT_P010 = 0x30313050U,
|
||||
SDL_PIXELFORMAT_EXTERNAL_OES = 0x2053454fU,
|
||||
}
|
||||
|
||||
public enum SDL_ColorType
|
||||
|
|
@ -262,19 +245,17 @@ namespace SDL
|
|||
[NativeTypeName("int")]
|
||||
public enum SDL_Colorspace : uint
|
||||
{
|
||||
SDL_COLORSPACE_UNKNOWN,
|
||||
SDL_COLORSPACE_SRGB = (unchecked(((uint)(SDL_COLOR_TYPE_RGB) << 28) | ((uint)(SDL_COLOR_RANGE_FULL) << 24) | ((uint)(SDL_CHROMA_LOCATION_NONE) << 20) | ((uint)(SDL_COLOR_PRIMARIES_BT709) << 10) | ((uint)(SDL_TRANSFER_CHARACTERISTICS_SRGB) << 5) | ((uint)(SDL_MATRIX_COEFFICIENTS_IDENTITY) << 0))),
|
||||
SDL_COLORSPACE_SRGB_LINEAR = (unchecked(((uint)(SDL_COLOR_TYPE_RGB) << 28) | ((uint)(SDL_COLOR_RANGE_FULL) << 24) | ((uint)(SDL_CHROMA_LOCATION_NONE) << 20) | ((uint)(SDL_COLOR_PRIMARIES_BT709) << 10) | ((uint)(SDL_TRANSFER_CHARACTERISTICS_LINEAR) << 5) | ((uint)(SDL_MATRIX_COEFFICIENTS_IDENTITY) << 0))),
|
||||
SDL_COLORSPACE_HDR10 = (unchecked(((uint)(SDL_COLOR_TYPE_RGB) << 28) | ((uint)(SDL_COLOR_RANGE_FULL) << 24) | ((uint)(SDL_CHROMA_LOCATION_NONE) << 20) | ((uint)(SDL_COLOR_PRIMARIES_BT2020) << 10) | ((uint)(SDL_TRANSFER_CHARACTERISTICS_PQ) << 5) | ((uint)(SDL_MATRIX_COEFFICIENTS_IDENTITY) << 0))),
|
||||
SDL_COLORSPACE_JPEG = (unchecked(((uint)(SDL_COLOR_TYPE_YCBCR) << 28) | ((uint)(SDL_COLOR_RANGE_FULL) << 24) | ((uint)(SDL_CHROMA_LOCATION_NONE) << 20) | ((uint)(SDL_COLOR_PRIMARIES_BT709) << 10) | ((uint)(SDL_TRANSFER_CHARACTERISTICS_BT601) << 5) | ((uint)(SDL_MATRIX_COEFFICIENTS_BT601) << 0))),
|
||||
SDL_COLORSPACE_BT601_LIMITED = (unchecked(((uint)(SDL_COLOR_TYPE_YCBCR) << 28) | ((uint)(SDL_COLOR_RANGE_LIMITED) << 24) | ((uint)(SDL_CHROMA_LOCATION_LEFT) << 20) | ((uint)(SDL_COLOR_PRIMARIES_BT601) << 10) | ((uint)(SDL_TRANSFER_CHARACTERISTICS_BT601) << 5) | ((uint)(SDL_MATRIX_COEFFICIENTS_BT601) << 0))),
|
||||
SDL_COLORSPACE_BT601_FULL = (unchecked(((uint)(SDL_COLOR_TYPE_YCBCR) << 28) | ((uint)(SDL_COLOR_RANGE_FULL) << 24) | ((uint)(SDL_CHROMA_LOCATION_LEFT) << 20) | ((uint)(SDL_COLOR_PRIMARIES_BT601) << 10) | ((uint)(SDL_TRANSFER_CHARACTERISTICS_BT601) << 5) | ((uint)(SDL_MATRIX_COEFFICIENTS_BT601) << 0))),
|
||||
SDL_COLORSPACE_BT709_LIMITED = (unchecked(((uint)(SDL_COLOR_TYPE_YCBCR) << 28) | ((uint)(SDL_COLOR_RANGE_LIMITED) << 24) | ((uint)(SDL_CHROMA_LOCATION_LEFT) << 20) | ((uint)(SDL_COLOR_PRIMARIES_BT709) << 10) | ((uint)(SDL_TRANSFER_CHARACTERISTICS_BT709) << 5) | ((uint)(SDL_MATRIX_COEFFICIENTS_BT709) << 0))),
|
||||
SDL_COLORSPACE_BT709_FULL = (unchecked(((uint)(SDL_COLOR_TYPE_YCBCR) << 28) | ((uint)(SDL_COLOR_RANGE_FULL) << 24) | ((uint)(SDL_CHROMA_LOCATION_LEFT) << 20) | ((uint)(SDL_COLOR_PRIMARIES_BT709) << 10) | ((uint)(SDL_TRANSFER_CHARACTERISTICS_BT709) << 5) | ((uint)(SDL_MATRIX_COEFFICIENTS_BT709) << 0))),
|
||||
SDL_COLORSPACE_BT2020_LIMITED = (unchecked(((uint)(SDL_COLOR_TYPE_YCBCR) << 28) | ((uint)(SDL_COLOR_RANGE_LIMITED) << 24) | ((uint)(SDL_CHROMA_LOCATION_LEFT) << 20) | ((uint)(SDL_COLOR_PRIMARIES_BT2020) << 10) | ((uint)(SDL_TRANSFER_CHARACTERISTICS_PQ) << 5) | ((uint)(SDL_MATRIX_COEFFICIENTS_BT2020_NCL) << 0))),
|
||||
SDL_COLORSPACE_BT2020_FULL = (unchecked(((uint)(SDL_COLOR_TYPE_YCBCR) << 28) | ((uint)(SDL_COLOR_RANGE_FULL) << 24) | ((uint)(SDL_CHROMA_LOCATION_LEFT) << 20) | ((uint)(SDL_COLOR_PRIMARIES_BT2020) << 10) | ((uint)(SDL_TRANSFER_CHARACTERISTICS_PQ) << 5) | ((uint)(SDL_MATRIX_COEFFICIENTS_BT2020_NCL) << 0))),
|
||||
SDL_COLORSPACE_RGB_DEFAULT = SDL_COLORSPACE_SRGB,
|
||||
SDL_COLORSPACE_YUV_DEFAULT = SDL_COLORSPACE_JPEG,
|
||||
SDL_COLORSPACE_UNKNOWN = 0,
|
||||
SDL_COLORSPACE_SRGB = 0x120005a0U,
|
||||
SDL_COLORSPACE_SRGB_LINEAR = 0x12000500U,
|
||||
SDL_COLORSPACE_HDR10 = 0x12002600U,
|
||||
SDL_COLORSPACE_JPEG = 0x220004c6U,
|
||||
SDL_COLORSPACE_BT601_LIMITED = 0x211018c6U,
|
||||
SDL_COLORSPACE_BT601_FULL = 0x221018c6U,
|
||||
SDL_COLORSPACE_BT709_LIMITED = 0x21100421U,
|
||||
SDL_COLORSPACE_BT709_FULL = 0x22100421U,
|
||||
SDL_COLORSPACE_BT2020_LIMITED = 0x21102609U,
|
||||
SDL_COLORSPACE_BT2020_FULL = 0x22102609U,
|
||||
}
|
||||
|
||||
public partial struct SDL_Color
|
||||
|
|
@ -415,5 +396,35 @@ namespace SDL
|
|||
|
||||
[NativeTypeName("#define SDL_ALPHA_TRANSPARENT 0")]
|
||||
public const int SDL_ALPHA_TRANSPARENT = 0;
|
||||
|
||||
[NativeTypeName("#define SDL_PIXELFORMAT_RGBA32 SDL_PIXELFORMAT_ABGR8888")]
|
||||
public const SDL_PixelFormat SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888;
|
||||
|
||||
[NativeTypeName("#define SDL_PIXELFORMAT_ARGB32 SDL_PIXELFORMAT_BGRA8888")]
|
||||
public const SDL_PixelFormat SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888;
|
||||
|
||||
[NativeTypeName("#define SDL_PIXELFORMAT_BGRA32 SDL_PIXELFORMAT_ARGB8888")]
|
||||
public const SDL_PixelFormat SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888;
|
||||
|
||||
[NativeTypeName("#define SDL_PIXELFORMAT_ABGR32 SDL_PIXELFORMAT_RGBA8888")]
|
||||
public const SDL_PixelFormat SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888;
|
||||
|
||||
[NativeTypeName("#define SDL_PIXELFORMAT_RGBX32 SDL_PIXELFORMAT_XBGR8888")]
|
||||
public const SDL_PixelFormat SDL_PIXELFORMAT_RGBX32 = SDL_PIXELFORMAT_XBGR8888;
|
||||
|
||||
[NativeTypeName("#define SDL_PIXELFORMAT_XRGB32 SDL_PIXELFORMAT_BGRX8888")]
|
||||
public const SDL_PixelFormat SDL_PIXELFORMAT_XRGB32 = SDL_PIXELFORMAT_BGRX8888;
|
||||
|
||||
[NativeTypeName("#define SDL_PIXELFORMAT_BGRX32 SDL_PIXELFORMAT_XRGB8888")]
|
||||
public const SDL_PixelFormat SDL_PIXELFORMAT_BGRX32 = SDL_PIXELFORMAT_XRGB8888;
|
||||
|
||||
[NativeTypeName("#define SDL_PIXELFORMAT_XBGR32 SDL_PIXELFORMAT_RGBX8888")]
|
||||
public const SDL_PixelFormat SDL_PIXELFORMAT_XBGR32 = SDL_PIXELFORMAT_RGBX8888;
|
||||
|
||||
[NativeTypeName("#define SDL_COLORSPACE_RGB_DEFAULT SDL_COLORSPACE_SRGB")]
|
||||
public const SDL_Colorspace SDL_COLORSPACE_RGB_DEFAULT = SDL_COLORSPACE_SRGB;
|
||||
|
||||
[NativeTypeName("#define SDL_COLORSPACE_YUV_DEFAULT SDL_COLORSPACE_JPEG")]
|
||||
public const SDL_Colorspace SDL_COLORSPACE_YUV_DEFAULT = SDL_COLORSPACE_JPEG;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,10 +56,10 @@ 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("SDL_CleanupPropertyCallback")] delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> cleanup, [NativeTypeName("void*")] IntPtr userdata);
|
||||
public static extern int SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value, [NativeTypeName("SDL_CleanupPropertyCallback")] delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> 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);
|
||||
public static extern int SDL_SetPointerProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetStringProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value);
|
||||
|
|
@ -81,7 +81,7 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_GetProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr default_value);
|
||||
public static extern IntPtr SDL_GetPointerProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr default_value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetStringProperty", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
|
|
|
|||
|
|
@ -97,12 +97,12 @@ namespace SDL
|
|||
|
||||
public static SDL_bool SDL_PointInRectFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* p, [NativeTypeName("const SDL_FRect *")] SDL_FRect* r)
|
||||
{
|
||||
return ((p) != null && (r) != null && (p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? (SDL_bool)(1) : (SDL_bool)(0);
|
||||
return ((p) != null && (r) != null && (p->x >= r->x) && (p->x <= (r->x + r->w)) && (p->y >= r->y) && (p->y <= (r->y + r->h))) ? (SDL_bool)(1) : (SDL_bool)(0);
|
||||
}
|
||||
|
||||
public static SDL_bool SDL_RectEmptyFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* r)
|
||||
{
|
||||
return ((r == null) || (r->w <= 0.0f) || (r->h <= 0.0f)) ? (SDL_bool)(1) : (SDL_bool)(0);
|
||||
return ((r == null) || (r->w < 0.0f) || (r->h < 0.0f)) ? (SDL_bool)(1) : (SDL_bool)(0);
|
||||
}
|
||||
|
||||
public static SDL_bool SDL_RectsEqualEpsilon([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b, [NativeTypeName("const float")] float epsilon)
|
||||
|
|
|
|||
|
|
@ -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_PixelFormat format, int access, int w, int h);
|
||||
public static extern SDL_Texture* SDL_CreateTexture(SDL_Renderer* renderer, SDL_PixelFormat format, SDL_TextureAccess 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);
|
||||
|
|
@ -206,6 +206,9 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_bool SDL_RenderViewportSet(SDL_Renderer* renderer);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetRenderSafeArea(SDL_Renderer* renderer, SDL_Rect* rect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetRenderClipRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect);
|
||||
|
||||
|
|
@ -278,6 +281,12 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_RenderTextureRotated(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect, [NativeTypeName("const double")] double angle, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* center, [NativeTypeName("const SDL_FlipMode")] SDL_FlipMode flip);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_RenderTextureTiled(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_RenderTexture9Grid(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float corner_size, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
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);
|
||||
|
||||
|
|
|
|||
|
|
@ -48,21 +48,21 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_SensorID* SDL_GetSensors(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetSensorInstanceName", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetSensorNameForID", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Unsafe_SDL_GetSensorInstanceName(SDL_SensorID instance_id);
|
||||
public static extern byte* Unsafe_SDL_GetSensorNameForID(SDL_SensorID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_SensorType SDL_GetSensorInstanceType(SDL_SensorID instance_id);
|
||||
public static extern SDL_SensorType SDL_GetSensorTypeForID(SDL_SensorID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetSensorInstanceNonPortableType(SDL_SensorID instance_id);
|
||||
public static extern int SDL_GetSensorNonPortableTypeForID(SDL_SensorID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Sensor* SDL_OpenSensor(SDL_SensorID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Sensor* SDL_GetSensorFromInstanceID(SDL_SensorID instance_id);
|
||||
public static extern SDL_Sensor* SDL_GetSensorFromID(SDL_SensorID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PropertiesID SDL_GetSensorProperties(SDL_Sensor* sensor);
|
||||
|
|
@ -78,7 +78,7 @@ namespace SDL
|
|||
public static extern int SDL_GetSensorNonPortableType(SDL_Sensor* sensor);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_SensorID SDL_GetSensorInstanceID(SDL_Sensor* sensor);
|
||||
public static extern SDL_SensorID SDL_GetSensorID(SDL_Sensor* sensor);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetSensorData(SDL_Sensor* sensor, float* data, int num_values);
|
||||
|
|
|
|||
|
|
@ -74,12 +74,15 @@ namespace SDL
|
|||
public static extern int SDL_GetNumAllocations();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_getenv", ExactSpelling = true)]
|
||||
[return: NativeTypeName("char *")]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Unsafe_SDL_getenv([NativeTypeName("const char *")] byte* name);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
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 int SDL_unsetenv([NativeTypeName("const char *")] byte* name);
|
||||
|
||||
[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("SDL_CompareCallback")] delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int> compare);
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,9 @@ namespace SDL
|
|||
[NativeTypeName("int (*)(void *, const char *, const char *)")]
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, int> rename;
|
||||
|
||||
[NativeTypeName("int (*)(void *, const char *, const char *)")]
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, int> copy;
|
||||
|
||||
[NativeTypeName("Uint64 (*)(void *)")]
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, ulong> space_remaining;
|
||||
}
|
||||
|
|
@ -106,6 +109,9 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_RenameStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_CopyStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetStoragePathInfo(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, SDL_PathInfo* info);
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,9 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Colorspace SDL_GetSurfaceColorspace(SDL_Surface* surface);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Palette* SDL_CreateSurfacePalette(SDL_Surface* surface);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetSurfacePalette(SDL_Surface* surface, SDL_Palette* palette);
|
||||
|
||||
|
|
@ -159,7 +162,7 @@ namespace SDL
|
|||
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_ConvertSurfaceAndColorspace(SDL_Surface* surface, SDL_PixelFormat format, [NativeTypeName("const SDL_Palette *")] SDL_Palette* palette, SDL_Colorspace colorspace, SDL_PropertiesID props);
|
||||
public static extern SDL_Surface* SDL_ConvertSurfaceAndColorspace(SDL_Surface* surface, SDL_PixelFormat format, SDL_Palette* palette, SDL_Colorspace colorspace, SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
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);
|
||||
|
|
@ -168,7 +171,13 @@ namespace SDL
|
|||
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_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);
|
||||
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, SDL_bool linear);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_PremultiplySurfaceAlpha(SDL_Surface* surface, SDL_bool linear);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_ClearSurface(SDL_Surface* surface, float r, float g, float b, float a);
|
||||
|
||||
[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);
|
||||
|
|
@ -177,20 +186,26 @@ namespace SDL
|
|||
public static extern int SDL_FillSurfaceRects(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rects, int count, [NativeTypeName("Uint32")] uint color);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_BlitSurface(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, SDL_Rect* dstrect);
|
||||
public static extern int SDL_BlitSurface(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_BlitSurfaceUnchecked(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SoftStretch(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)]
|
||||
public static extern int SDL_BlitSurfaceScaled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, SDL_Rect* dstrect, SDL_ScaleMode scaleMode);
|
||||
public static extern int SDL_BlitSurfaceScaled(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)]
|
||||
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)]
|
||||
public static extern int SDL_BlitSurfaceTiled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_BlitSurfaceTiledWithScale(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_BlitSurface9Grid(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, int corner_size, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect);
|
||||
|
||||
[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);
|
||||
|
|
@ -202,6 +217,15 @@ namespace SDL
|
|||
[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);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_ReadSurfacePixelFloat(SDL_Surface* surface, int x, int y, float* r, float* g, float* b, float* a);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_WriteSurfacePixel(SDL_Surface* surface, int x, int y, [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_WriteSurfacePixelFloat(SDL_Surface* surface, int x, int y, float r, float g, float b, float a);
|
||||
|
||||
[NativeTypeName("#define SDL_SURFACE_PREALLOCATED 0x00000001u")]
|
||||
public const uint SDL_SURFACE_PREALLOCATED = 0x00000001U;
|
||||
|
||||
|
|
@ -214,9 +238,6 @@ namespace SDL
|
|||
[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<byte> SDL_PROP_SURFACE_COLORSPACE_NUMBER => "SDL.surface.colorspace"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_SURFACE_SDR_WHITE_POINT_FLOAT \"SDL.surface.SDR_white_point\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_SURFACE_SDR_WHITE_POINT_FLOAT => "SDL.surface.SDR_white_point"u8;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,12 +34,12 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern IntPtr SDL_AndroidGetJNIEnv();
|
||||
public static extern IntPtr SDL_GetAndroidJNIEnv();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern IntPtr SDL_AndroidGetActivity();
|
||||
public static extern IntPtr SDL_GetAndroidActivity();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Android")]
|
||||
|
|
@ -59,33 +59,39 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern void SDL_AndroidBackButton();
|
||||
public static extern void SDL_SendAndroidBackButton();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_AndroidGetInternalStoragePath", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAndroidInternalStoragePath", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern byte* Unsafe_SDL_AndroidGetInternalStoragePath();
|
||||
public static extern byte* Unsafe_SDL_GetAndroidInternalStoragePath();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint32")]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern int SDL_AndroidGetExternalStorageState([NativeTypeName("Uint32 *")] uint* state);
|
||||
public static extern uint SDL_GetAndroidExternalStorageState();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_AndroidGetExternalStoragePath", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAndroidExternalStoragePath", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern byte* Unsafe_SDL_AndroidGetExternalStoragePath();
|
||||
public static extern byte* Unsafe_SDL_GetAndroidExternalStoragePath();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAndroidCachePath", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern byte* Unsafe_SDL_GetAndroidCachePath();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern int SDL_AndroidRequestPermission([NativeTypeName("const char *")] byte* permission, [NativeTypeName("SDL_AndroidRequestPermissionCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, SDL_bool, void> cb, [NativeTypeName("void*")] IntPtr userdata);
|
||||
public static extern int SDL_RequestAndroidPermission([NativeTypeName("const char *")] byte* permission, [NativeTypeName("SDL_RequestAndroidPermissionCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, SDL_bool, void> cb, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern int SDL_AndroidShowToast([NativeTypeName("const char *")] byte* message, int duration, int gravity, int xoffset, int yoffset);
|
||||
public static extern int SDL_ShowAndroidToast([NativeTypeName("const char *")] byte* message, int duration, int gravity, int xoffset, int yoffset);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern int SDL_AndroidSendMessage([NativeTypeName("Uint32")] uint command, int param1);
|
||||
public static extern int SDL_SendAndroidMessage([NativeTypeName("Uint32")] uint command, int param1);
|
||||
|
||||
[NativeTypeName("#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01")]
|
||||
public const int SDL_ANDROID_EXTERNAL_STORAGE_READ = 0x01;
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@ namespace SDL
|
|||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Linux")]
|
||||
public static extern int SDL_LinuxSetThreadPriority([NativeTypeName("Sint64")] long threadID, int priority);
|
||||
public static extern int SDL_SetLinuxThreadPriority([NativeTypeName("Sint64")] long threadID, int priority);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Linux")]
|
||||
public static extern int SDL_LinuxSetThreadPriorityAndPolicy([NativeTypeName("Sint64")] long threadID, int sdlPriority, int schedPolicy);
|
||||
public static extern int SDL_SetLinuxThreadPriorityAndPolicy([NativeTypeName("Sint64")] long threadID, int sdlPriority, int schedPolicy);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,13 +46,13 @@ namespace SDL
|
|||
|
||||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_WinRTGetFSPath", ExactSpelling = true)]
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetWinRTFSPath", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern byte* Unsafe_SDL_WinRTGetFSPath(SDL_WinRT_Path pathType);
|
||||
public static extern byte* Unsafe_SDL_GetWinRTFSPath(SDL_WinRT_Path pathType);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern SDL_WinRT_DeviceFamily SDL_WinRTGetDeviceFamily();
|
||||
public static extern SDL_WinRT_DeviceFamily SDL_GetWinRTDeviceFamily();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,18 +45,18 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern int SDL_Direct3D9GetAdapterIndex(SDL_DisplayID displayID);
|
||||
public static extern int SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern SDL_bool SDL_DXGIGetOutputInfo(SDL_DisplayID displayID, int* adapterIndex, int* outputIndex);
|
||||
public static extern int SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int* adapterIndex, int* outputIndex);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern int SDL_GDKGetTaskQueue([NativeTypeName("XTaskQueueHandle *")] XTaskQueueObject** outTaskQueue);
|
||||
public static extern int SDL_GetGDKTaskQueue([NativeTypeName("XTaskQueueHandle *")] XTaskQueueObject** outTaskQueue);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern int SDL_GDKGetDefaultUser([NativeTypeName("XUserHandle *")] XUser** outUserHandle);
|
||||
public static extern int SDL_GetGDKDefaultUser([NativeTypeName("XUserHandle *")] XUser** outUserHandle);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace SDL
|
|||
public static extern void SDL_OnApplicationDidReceiveMemoryWarning();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_OnApplicationWillResignActive();
|
||||
public static extern void SDL_OnApplicationWillEnterBackground();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_OnApplicationDidEnterBackground();
|
||||
|
|
@ -52,6 +52,6 @@ namespace SDL
|
|||
public static extern void SDL_OnApplicationWillEnterForeground();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_OnApplicationDidBecomeActive();
|
||||
public static extern void SDL_OnApplicationDidEnterForeground();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ namespace SDL
|
|||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("iOS")]
|
||||
public static extern int SDL_iOSSetAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("SDL_iOSAnimationCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> callback, [NativeTypeName("void*")] IntPtr callbackParam);
|
||||
public static extern int SDL_SetiOSAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("SDL_iOSAnimationCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> callback, [NativeTypeName("void*")] IntPtr callbackParam);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("iOS")]
|
||||
public static extern void SDL_iOSSetEventPump(SDL_bool enabled);
|
||||
public static extern void SDL_SetiOSEventPump(SDL_bool enabled);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("iOS")]
|
||||
|
|
|
|||
|
|
@ -67,15 +67,12 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_DetachThread(SDL_Thread* thread);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_TLSID SDL_CreateTLS();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_GetTLS(SDL_TLSID id);
|
||||
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("SDL_TLSDestructorCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> destructor);
|
||||
public static extern int SDL_SetTLS(SDL_TLSID* id, [NativeTypeName("const void *")] IntPtr value, [NativeTypeName("SDL_TLSDestructorCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> destructor);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_CleanupTLS();
|
||||
|
|
|
|||
|
|
@ -35,7 +35,11 @@ namespace SDL
|
|||
SDL_SYSTEM_THEME_DARK,
|
||||
}
|
||||
|
||||
public partial struct SDL_DisplayMode
|
||||
public partial struct SDL_DisplayModeData
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe partial struct SDL_DisplayMode
|
||||
{
|
||||
public SDL_DisplayID displayID;
|
||||
|
||||
|
|
@ -49,8 +53,11 @@ namespace SDL
|
|||
|
||||
public float refresh_rate;
|
||||
|
||||
[NativeTypeName("void*")]
|
||||
public IntPtr driverdata;
|
||||
public int refresh_rate_numerator;
|
||||
|
||||
public int refresh_rate_denominator;
|
||||
|
||||
public SDL_DisplayModeData* @internal;
|
||||
}
|
||||
|
||||
public enum SDL_DisplayOrientation
|
||||
|
|
@ -195,12 +202,10 @@ namespace SDL
|
|||
public static extern float SDL_GetDisplayContentScale(SDL_DisplayID displayID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const SDL_DisplayMode **")]
|
||||
public static extern SDL_DisplayMode** SDL_GetFullscreenDisplayModes(SDL_DisplayID displayID, int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const SDL_DisplayMode *")]
|
||||
public static extern SDL_DisplayMode* SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, SDL_bool include_high_density_modes);
|
||||
public static extern int SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, SDL_bool include_high_density_modes, SDL_DisplayMode* mode);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const SDL_DisplayMode *")]
|
||||
|
|
@ -237,8 +242,7 @@ namespace SDL
|
|||
public static extern IntPtr SDL_GetWindowICCProfile(SDL_Window* window, [NativeTypeName("size_t *")] nuint* size);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint32")]
|
||||
public static extern uint SDL_GetWindowPixelFormat(SDL_Window* window);
|
||||
public static extern SDL_PixelFormat SDL_GetWindowPixelFormat(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Window** SDL_GetWindows(int* count);
|
||||
|
|
@ -289,6 +293,9 @@ 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_GetWindowSafeArea(SDL_Window* window, SDL_Rect* rect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetWindowAspectRatio(SDL_Window* window, float min_aspect, float max_aspect);
|
||||
|
||||
|
|
@ -393,7 +400,7 @@ namespace SDL
|
|||
public static extern int SDL_SetWindowOpacity(SDL_Window* window, float opacity);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetWindowOpacity(SDL_Window* window, float* out_opacity);
|
||||
public static extern float SDL_GetWindowOpacity(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetWindowModalFor(SDL_Window* modal_window, SDL_Window* parent_window);
|
||||
|
|
@ -467,18 +474,18 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_EGLDisplay")]
|
||||
public static extern IntPtr SDL_EGL_GetCurrentEGLDisplay();
|
||||
public static extern IntPtr SDL_EGL_GetCurrentDisplay();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_EGLConfig")]
|
||||
public static extern IntPtr SDL_EGL_GetCurrentEGLConfig();
|
||||
public static extern IntPtr SDL_EGL_GetCurrentConfig();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_EGLSurface")]
|
||||
public static extern IntPtr SDL_EGL_GetWindowEGLSurface(SDL_Window* window);
|
||||
public static extern IntPtr SDL_EGL_GetWindowSurface(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_EGL_SetEGLAttributeCallbacks([NativeTypeName("SDL_EGLAttribArrayCallback")] delegate* unmanaged[Cdecl]<nint*> platformAttribCallback, [NativeTypeName("SDL_EGLIntArrayCallback")] delegate* unmanaged[Cdecl]<int*> surfaceAttribCallback, [NativeTypeName("SDL_EGLIntArrayCallback")] delegate* unmanaged[Cdecl]<int*> contextAttribCallback);
|
||||
public static extern void SDL_EGL_SetAttributeCallbacks([NativeTypeName("SDL_EGLAttribArrayCallback")] delegate* unmanaged[Cdecl]<nint*> platformAttribCallback, [NativeTypeName("SDL_EGLIntArrayCallback")] delegate* unmanaged[Cdecl]<int*> surfaceAttribCallback, [NativeTypeName("SDL_EGLIntArrayCallback")] delegate* unmanaged[Cdecl]<int*> contextAttribCallback);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GL_SetSwapInterval(int interval);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ namespace SDL
|
|||
{
|
||||
}
|
||||
|
||||
public partial struct VkPhysicalDevice_T
|
||||
{
|
||||
}
|
||||
|
||||
public partial struct VkSurfaceKHR_T
|
||||
{
|
||||
}
|
||||
|
|
@ -61,5 +65,8 @@ namespace SDL
|
|||
|
||||
[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);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_bool SDL_Vulkan_GetPresentationSupport([NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("VkPhysicalDevice")] VkPhysicalDevice_T* physicalDevice, [NativeTypeName("Uint32")] uint queueFamilyIndex);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,19 +9,6 @@ namespace SDL
|
|||
[Typedef]
|
||||
public enum SDL_AudioDeviceID : UInt32;
|
||||
|
||||
[Typedef]
|
||||
public enum SDL_AudioFormat : UInt16
|
||||
{
|
||||
SDL_AUDIO_U8 = (UInt16)SDL3.SDL_AUDIO_U8,
|
||||
SDL_AUDIO_S8 = (UInt16)SDL3.SDL_AUDIO_S8,
|
||||
SDL_AUDIO_S16LE = (UInt16)SDL3.SDL_AUDIO_S16LE,
|
||||
SDL_AUDIO_S16BE = (UInt16)SDL3.SDL_AUDIO_S16BE,
|
||||
SDL_AUDIO_S32LE = (UInt16)SDL3.SDL_AUDIO_S32LE,
|
||||
SDL_AUDIO_S32BE = (UInt16)SDL3.SDL_AUDIO_S32BE,
|
||||
SDL_AUDIO_F32LE = (UInt16)SDL3.SDL_AUDIO_F32LE,
|
||||
SDL_AUDIO_F32BE = (UInt16)SDL3.SDL_AUDIO_F32BE,
|
||||
}
|
||||
|
||||
public static partial class SDL3
|
||||
{
|
||||
[Constant]
|
||||
|
|
@ -75,5 +62,21 @@ namespace SDL
|
|||
var array = SDL_GetAudioRecordingDevices(&count);
|
||||
return SDLArray.Create(array, count);
|
||||
}
|
||||
|
||||
[MustDisposeResource]
|
||||
public static unsafe SDLArray<int>? SDL_GetAudioStreamInputChannelMap(SDL_AudioStream* stream)
|
||||
{
|
||||
int count;
|
||||
int* array = SDL_GetAudioStreamInputChannelMap(stream, &count);
|
||||
return SDLArray.Create(array, count);
|
||||
}
|
||||
|
||||
[MustDisposeResource]
|
||||
public static unsafe SDLArray<int>? SDL_GetAudioStreamOutputChannelMap(SDL_AudioStream* stream)
|
||||
{
|
||||
int count;
|
||||
int* array = SDL_GetAudioStreamOutputChannelMap(stream, &count);
|
||||
return SDLArray.Create(array, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
# See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
# Fix errors with uint -> int conversion
|
||||
--with-type
|
||||
SDL_AudioFormat=uint
|
||||
|
|
@ -7,23 +7,23 @@ using JetBrains.Annotations;
|
|||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_CameraDeviceID : UInt32;
|
||||
public enum SDL_CameraID : UInt32;
|
||||
|
||||
public static partial class SDL3
|
||||
{
|
||||
[MustDisposeResource]
|
||||
public static unsafe SDLArray<SDL_CameraDeviceID>? SDL_GetCameraDevices()
|
||||
public static unsafe SDLArray<SDL_CameraID>? SDL_GetCameras()
|
||||
{
|
||||
int count;
|
||||
var array = SDL_GetCameraDevices(&count);
|
||||
var array = SDL_GetCameras(&count);
|
||||
return SDLArray.Create(array, count);
|
||||
}
|
||||
|
||||
[MustDisposeResource]
|
||||
public static unsafe SDLArray<SDL_CameraSpec>? SDL_GetCameraDeviceSupportedFormats(SDL_CameraDeviceID devid)
|
||||
public static unsafe SDLPointerArray<SDL_CameraSpec>? SDL_GetCameraSupportedFormats(SDL_CameraID devid)
|
||||
{
|
||||
int count;
|
||||
var array = SDL_GetCameraDeviceSupportedFormats(devid, &count);
|
||||
var array = SDL_GetCameraSupportedFormats(devid, &count);
|
||||
return SDLArray.Create(array, count);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
public static partial class SDL3
|
||||
{
|
||||
[MustDisposeResource]
|
||||
public static unsafe SDLPointerArray<SDL_Locale>? SDL_GetPreferredLocales()
|
||||
{
|
||||
int count;
|
||||
var array = SDL_GetPreferredLocales(&count);
|
||||
return SDLArray.Create(array, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
public static partial class SDL3
|
||||
{
|
||||
/// <returns>
|
||||
/// An array of <see cref="nint"/> that can be passed to <see cref="Marshal.PtrToStringUTF8(System.IntPtr)"/>.
|
||||
/// </returns>
|
||||
[MustDisposeResource]
|
||||
public static unsafe SDLArray<IntPtr>? SDL_GlobStorageDirectory(SDL_Storage* storage, byte* path, byte* pattern, SDL_GlobFlags flags)
|
||||
{
|
||||
int count;
|
||||
IntPtr* array = (IntPtr*)SDL_GlobStorageDirectory(storage, path, pattern, flags, &count);
|
||||
return SDLArray.Create(array, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -37,6 +37,7 @@ namespace SDL
|
|||
return;
|
||||
|
||||
isDisposed = true;
|
||||
|
||||
SDL3.SDL_free(array);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ namespace SDL
|
|||
return;
|
||||
|
||||
isDisposed = true;
|
||||
|
||||
SDL3.SDL_free(array);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue