mirror of https://github.com/ppy/SDL3-CS.git
Add C# enum "typedefs" for C typedefs
This doesn't compile as ClangSharp fails to emit `unchecked` in `SDL_pen.g.cs` and `SDL_touch.g.cs`. And `(SDL_bool)` casts in `SDL_rect.g.cs`.
This commit is contained in:
parent
0b0906bfea
commit
556c6cd1a3
|
|
@ -36,8 +36,7 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_TryLockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock);
|
||||
public static extern SDL_bool SDL_TryLockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_LockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock);
|
||||
|
|
@ -52,8 +51,7 @@ namespace SDL
|
|||
public static extern void SDL_MemoryBarrierAcquireFunction();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_AtomicCompareAndSwap(SDL_AtomicInt* a, int oldval, int newval);
|
||||
public static extern SDL_bool SDL_AtomicCompareAndSwap(SDL_AtomicInt* a, int oldval, int newval);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_AtomicSet(SDL_AtomicInt* a, int v);
|
||||
|
|
@ -65,8 +63,7 @@ namespace SDL
|
|||
public static extern int SDL_AtomicAdd(SDL_AtomicInt* a, int v);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_AtomicCompareAndSwapPointer([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr oldval, [NativeTypeName("void*")] IntPtr newval);
|
||||
public static extern SDL_bool SDL_AtomicCompareAndSwapPointer([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr oldval, [NativeTypeName("void*")] IntPtr newval);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@ namespace SDL
|
|||
{
|
||||
public partial struct SDL_AudioSpec
|
||||
{
|
||||
[NativeTypeName("SDL_AudioFormat")]
|
||||
public ushort format;
|
||||
public SDL_AudioFormat format;
|
||||
|
||||
public int channels;
|
||||
|
||||
|
|
@ -56,42 +55,38 @@ namespace SDL
|
|||
public static extern byte* SDL_GetCurrentAudioDriver();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_AudioDeviceID *")]
|
||||
public static extern uint* SDL_GetAudioOutputDevices(int* count);
|
||||
public static extern SDL_AudioDeviceID* SDL_GetAudioOutputDevices(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_AudioDeviceID *")]
|
||||
public static extern uint* SDL_GetAudioCaptureDevices(int* count);
|
||||
public static extern SDL_AudioDeviceID* SDL_GetAudioCaptureDevices(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("char *")]
|
||||
public static extern byte* SDL_GetAudioDeviceName([NativeTypeName("SDL_AudioDeviceID")] uint devid);
|
||||
public static extern byte* SDL_GetAudioDeviceName(SDL_AudioDeviceID devid);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetAudioDeviceFormat([NativeTypeName("SDL_AudioDeviceID")] uint devid, SDL_AudioSpec* spec, int* sample_frames);
|
||||
public static extern int SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec* spec, int* sample_frames);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_AudioDeviceID")]
|
||||
public static extern uint SDL_OpenAudioDevice([NativeTypeName("SDL_AudioDeviceID")] uint devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec);
|
||||
public static extern SDL_AudioDeviceID SDL_OpenAudioDevice(SDL_AudioDeviceID devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_PauseAudioDevice([NativeTypeName("SDL_AudioDeviceID")] uint dev);
|
||||
public static extern int SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_ResumeAudioDevice([NativeTypeName("SDL_AudioDeviceID")] uint dev);
|
||||
public static extern int SDL_ResumeAudioDevice(SDL_AudioDeviceID dev);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_AudioDevicePaused([NativeTypeName("SDL_AudioDeviceID")] uint dev);
|
||||
public static extern SDL_bool SDL_AudioDevicePaused(SDL_AudioDeviceID dev);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_CloseAudioDevice([NativeTypeName("SDL_AudioDeviceID")] uint devid);
|
||||
public static extern void SDL_CloseAudioDevice(SDL_AudioDeviceID devid);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_BindAudioStreams([NativeTypeName("SDL_AudioDeviceID")] uint devid, SDL_AudioStream** streams, int num_streams);
|
||||
public static extern int SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream** streams, int num_streams);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_BindAudioStream([NativeTypeName("SDL_AudioDeviceID")] uint devid, SDL_AudioStream* stream);
|
||||
public static extern int SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_AudioStream* stream);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_UnbindAudioStreams(SDL_AudioStream** streams, int num_streams);
|
||||
|
|
@ -100,15 +95,13 @@ namespace SDL
|
|||
public static extern void SDL_UnbindAudioStream(SDL_AudioStream* stream);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_AudioDeviceID")]
|
||||
public static extern uint SDL_GetAudioStreamDevice(SDL_AudioStream* stream);
|
||||
public static extern SDL_AudioDeviceID SDL_GetAudioStreamDevice(SDL_AudioStream* stream);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_AudioStream* SDL_CreateAudioStream([NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_GetAudioStreamProperties(SDL_AudioStream* stream);
|
||||
public static extern SDL_PropertiesID SDL_GetAudioStreamProperties(SDL_AudioStream* stream);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetAudioStreamFormat(SDL_AudioStream* stream, SDL_AudioSpec* src_spec, SDL_AudioSpec* dst_spec);
|
||||
|
|
@ -156,25 +149,25 @@ namespace SDL
|
|||
public static extern void SDL_DestroyAudioStream(SDL_AudioStream* stream);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_AudioStream* SDL_OpenAudioDeviceStream([NativeTypeName("SDL_AudioDeviceID")] uint devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioStream*, int, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
public static extern SDL_AudioStream* SDL_OpenAudioDeviceStream(SDL_AudioDeviceID devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioStream*, int, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetAudioPostmixCallback([NativeTypeName("SDL_AudioDeviceID")] uint devid, [NativeTypeName("SDL_AudioPostmixCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioSpec*, float*, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
public static extern int SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioPostmixCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioSpec*, float*, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_LoadWAV_IO(SDL_IOStream* src, [NativeTypeName("SDL_bool")] int closeio, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len);
|
||||
public static extern int SDL_LoadWAV_IO(SDL_IOStream* src, SDL_bool closeio, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_LoadWAV([NativeTypeName("const char *")] byte* path, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_MixAudioFormat([NativeTypeName("Uint8 *")] byte* dst, [NativeTypeName("const Uint8 *")] byte* src, [NativeTypeName("SDL_AudioFormat")] ushort format, [NativeTypeName("Uint32")] uint len, int volume);
|
||||
public static extern int SDL_MixAudioFormat([NativeTypeName("Uint8 *")] byte* dst, [NativeTypeName("const Uint8 *")] byte* src, SDL_AudioFormat format, [NativeTypeName("Uint32")] uint len, int volume);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_ConvertAudioSamples([NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const Uint8 *")] byte* src_data, int src_len, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec, [NativeTypeName("Uint8 **")] byte** dst_data, int* dst_len);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetSilenceValueForFormat([NativeTypeName("SDL_AudioFormat")] ushort format);
|
||||
public static extern int SDL_GetSilenceValueForFormat(SDL_AudioFormat format);
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_MASK_BITSIZE (0xFF)")]
|
||||
public const int SDL_AUDIO_MASK_BITSIZE = (0xFF);
|
||||
|
|
@ -222,10 +215,10 @@ namespace SDL
|
|||
public const int SDL_AUDIO_F32 = 0x8120;
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_OUTPUT ((SDL_AudioDeviceID) 0xFFFFFFFF)")]
|
||||
public const uint SDL_AUDIO_DEVICE_DEFAULT_OUTPUT = ((uint)(0xFFFFFFFF));
|
||||
public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_OUTPUT = ((SDL_AudioDeviceID)(0xFFFFFFFF));
|
||||
|
||||
[NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_CAPTURE ((SDL_AudioDeviceID) 0xFFFFFFFE)")]
|
||||
public const uint SDL_AUDIO_DEVICE_DEFAULT_CAPTURE = ((uint)(0xFFFFFFFE));
|
||||
public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_CAPTURE = ((SDL_AudioDeviceID)(0xFFFFFFFE));
|
||||
|
||||
[NativeTypeName("#define SDL_MIX_MAXVOLUME 128")]
|
||||
public const int SDL_MIX_MAXVOLUME = 128;
|
||||
|
|
|
|||
|
|
@ -65,32 +65,29 @@ namespace SDL
|
|||
public static extern byte* SDL_GetCurrentCameraDriver();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_CameraDeviceID *")]
|
||||
public static extern uint* SDL_GetCameraDevices(int* count);
|
||||
public static extern SDL_CameraDeviceID* SDL_GetCameraDevices(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_CameraSpec* SDL_GetCameraDeviceSupportedFormats([NativeTypeName("SDL_CameraDeviceID")] uint devid, int* count);
|
||||
public static extern SDL_CameraSpec* SDL_GetCameraDeviceSupportedFormats(SDL_CameraDeviceID devid, int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("char *")]
|
||||
public static extern byte* SDL_GetCameraDeviceName([NativeTypeName("SDL_CameraDeviceID")] uint instance_id);
|
||||
public static extern byte* SDL_GetCameraDeviceName(SDL_CameraDeviceID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_CameraPosition SDL_GetCameraDevicePosition([NativeTypeName("SDL_CameraDeviceID")] uint instance_id);
|
||||
public static extern SDL_CameraPosition SDL_GetCameraDevicePosition(SDL_CameraDeviceID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Camera* SDL_OpenCameraDevice([NativeTypeName("SDL_CameraDeviceID")] uint instance_id, [NativeTypeName("const SDL_CameraSpec *")] SDL_CameraSpec* spec);
|
||||
public static extern SDL_Camera* SDL_OpenCameraDevice(SDL_CameraDeviceID 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)]
|
||||
[return: NativeTypeName("SDL_CameraDeviceID")]
|
||||
public static extern uint SDL_GetCameraInstanceID(SDL_Camera* camera);
|
||||
public static extern SDL_CameraDeviceID SDL_GetCameraInstanceID(SDL_Camera* camera);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_GetCameraProperties(SDL_Camera* camera);
|
||||
public static extern SDL_PropertiesID SDL_GetCameraProperties(SDL_Camera* camera);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetCameraFormat(SDL_Camera* camera, SDL_CameraSpec* spec);
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@ namespace SDL
|
|||
public static extern byte* SDL_GetClipboardText();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasClipboardText();
|
||||
public static extern SDL_bool SDL_HasClipboardText();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetPrimarySelectionText([NativeTypeName("const char *")] byte* text);
|
||||
|
|
@ -49,8 +48,7 @@ namespace SDL
|
|||
public static extern byte* SDL_GetPrimarySelectionText();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasPrimarySelectionText();
|
||||
public static extern SDL_bool SDL_HasPrimarySelectionText();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetClipboardData([NativeTypeName("SDL_ClipboardDataCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, nuint*, IntPtr> callback, [NativeTypeName("SDL_ClipboardCleanupCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> cleanup, [NativeTypeName("void*")] IntPtr userdata, [NativeTypeName("const char **")] byte** mime_types, [NativeTypeName("size_t")] nuint num_mime_types);
|
||||
|
|
@ -63,7 +61,6 @@ namespace SDL
|
|||
public static extern IntPtr SDL_GetClipboardData([NativeTypeName("const char *")] byte* mime_type, [NativeTypeName("size_t *")] nuint* size);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasClipboardData([NativeTypeName("const char *")] byte* mime_type);
|
||||
public static extern SDL_bool SDL_HasClipboardData([NativeTypeName("const char *")] byte* mime_type);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,60 +36,46 @@ namespace SDL
|
|||
public static extern int SDL_GetCPUCacheLineSize();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasAltiVec();
|
||||
public static extern SDL_bool SDL_HasAltiVec();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasMMX();
|
||||
public static extern SDL_bool SDL_HasMMX();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasSSE();
|
||||
public static extern SDL_bool SDL_HasSSE();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasSSE2();
|
||||
public static extern SDL_bool SDL_HasSSE2();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasSSE3();
|
||||
public static extern SDL_bool SDL_HasSSE3();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasSSE41();
|
||||
public static extern SDL_bool SDL_HasSSE41();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasSSE42();
|
||||
public static extern SDL_bool SDL_HasSSE42();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasAVX();
|
||||
public static extern SDL_bool SDL_HasAVX();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasAVX2();
|
||||
public static extern SDL_bool SDL_HasAVX2();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasAVX512F();
|
||||
public static extern SDL_bool SDL_HasAVX512F();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasARMSIMD();
|
||||
public static extern SDL_bool SDL_HasARMSIMD();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasNEON();
|
||||
public static extern SDL_bool SDL_HasNEON();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasLSX();
|
||||
public static extern SDL_bool SDL_HasLSX();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasLASX();
|
||||
public static extern SDL_bool SDL_HasLASX();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetSystemRAM();
|
||||
|
|
|
|||
|
|
@ -40,12 +40,12 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("SDL_bool")] int allow_many);
|
||||
public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, [NativeTypeName("const char *")] byte* default_location, SDL_bool allow_many);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_ShowSaveFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, [NativeTypeName("const char *")] byte* default_location);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_ShowOpenFolderDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("SDL_bool")] int allow_many);
|
||||
public static extern void SDL_ShowOpenFolderDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, SDL_bool allow_many);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,8 +162,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_DisplayID")]
|
||||
public uint displayID;
|
||||
public SDL_DisplayID displayID;
|
||||
|
||||
[NativeTypeName("Sint32")]
|
||||
public int data1;
|
||||
|
|
@ -179,8 +178,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
|
||||
[NativeTypeName("Sint32")]
|
||||
public int data1;
|
||||
|
|
@ -199,8 +197,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_KeyboardID")]
|
||||
public uint which;
|
||||
public SDL_KeyboardID which;
|
||||
}
|
||||
|
||||
public partial struct SDL_KeyboardEvent
|
||||
|
|
@ -213,11 +210,9 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
|
||||
[NativeTypeName("SDL_KeyboardID")]
|
||||
public uint which;
|
||||
public SDL_KeyboardID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte state;
|
||||
|
|
@ -244,8 +239,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
|
||||
[NativeTypeName("char *")]
|
||||
public byte* text;
|
||||
|
|
@ -267,8 +261,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
|
||||
[NativeTypeName("char *")]
|
||||
public byte* text;
|
||||
|
|
@ -284,8 +277,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_MouseID")]
|
||||
public uint which;
|
||||
public SDL_MouseID which;
|
||||
}
|
||||
|
||||
public partial struct SDL_MouseMotionEvent
|
||||
|
|
@ -298,11 +290,9 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
|
||||
[NativeTypeName("SDL_MouseID")]
|
||||
public uint which;
|
||||
public SDL_MouseID which;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint state;
|
||||
|
|
@ -326,11 +316,9 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
|
||||
[NativeTypeName("SDL_MouseID")]
|
||||
public uint which;
|
||||
public SDL_MouseID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte button;
|
||||
|
|
@ -359,11 +347,9 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
|
||||
[NativeTypeName("SDL_MouseID")]
|
||||
public uint which;
|
||||
public SDL_MouseID which;
|
||||
|
||||
public float x;
|
||||
|
||||
|
|
@ -386,8 +372,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_JoystickID")]
|
||||
public uint which;
|
||||
public SDL_JoystickID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte axis;
|
||||
|
|
@ -418,8 +403,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_JoystickID")]
|
||||
public uint which;
|
||||
public SDL_JoystickID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte ball;
|
||||
|
|
@ -450,8 +434,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_JoystickID")]
|
||||
public uint which;
|
||||
public SDL_JoystickID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte hat;
|
||||
|
|
@ -476,8 +459,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_JoystickID")]
|
||||
public uint which;
|
||||
public SDL_JoystickID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte button;
|
||||
|
|
@ -502,8 +484,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_JoystickID")]
|
||||
public uint which;
|
||||
public SDL_JoystickID which;
|
||||
}
|
||||
|
||||
public partial struct SDL_JoyBatteryEvent
|
||||
|
|
@ -516,8 +497,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_JoystickID")]
|
||||
public uint which;
|
||||
public SDL_JoystickID which;
|
||||
|
||||
public SDL_PowerState state;
|
||||
|
||||
|
|
@ -534,8 +514,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_JoystickID")]
|
||||
public uint which;
|
||||
public SDL_JoystickID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte axis;
|
||||
|
|
@ -566,8 +545,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_JoystickID")]
|
||||
public uint which;
|
||||
public SDL_JoystickID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte button;
|
||||
|
|
@ -592,8 +570,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_JoystickID")]
|
||||
public uint which;
|
||||
public SDL_JoystickID which;
|
||||
}
|
||||
|
||||
public partial struct SDL_GamepadTouchpadEvent
|
||||
|
|
@ -606,8 +583,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_JoystickID")]
|
||||
public uint which;
|
||||
public SDL_JoystickID which;
|
||||
|
||||
[NativeTypeName("Sint32")]
|
||||
public int touchpad;
|
||||
|
|
@ -632,8 +608,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_JoystickID")]
|
||||
public uint which;
|
||||
public SDL_JoystickID which;
|
||||
|
||||
[NativeTypeName("Sint32")]
|
||||
public int sensor;
|
||||
|
|
@ -661,8 +636,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_AudioDeviceID")]
|
||||
public uint which;
|
||||
public SDL_AudioDeviceID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte iscapture;
|
||||
|
|
@ -687,8 +661,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_CameraDeviceID")]
|
||||
public uint which;
|
||||
public SDL_CameraDeviceID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte padding1;
|
||||
|
|
@ -710,11 +683,9 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_TouchID")]
|
||||
public ulong touchID;
|
||||
public SDL_TouchID touchID;
|
||||
|
||||
[NativeTypeName("SDL_FingerID")]
|
||||
public ulong fingerID;
|
||||
public SDL_FingerID fingerID;
|
||||
|
||||
public float x;
|
||||
|
||||
|
|
@ -726,8 +697,7 @@ namespace SDL
|
|||
|
||||
public float pressure;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
}
|
||||
|
||||
public partial struct SDL_PenTipEvent
|
||||
|
|
@ -740,11 +710,9 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
|
||||
[NativeTypeName("SDL_PenID")]
|
||||
public uint which;
|
||||
public SDL_PenID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte tip;
|
||||
|
|
@ -779,11 +747,9 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
|
||||
[NativeTypeName("SDL_PenID")]
|
||||
public uint which;
|
||||
public SDL_PenID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte padding1;
|
||||
|
|
@ -818,11 +784,9 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
|
||||
[NativeTypeName("SDL_PenID")]
|
||||
public uint which;
|
||||
public SDL_PenID which;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte button;
|
||||
|
|
@ -857,8 +821,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
|
||||
public float x;
|
||||
|
||||
|
|
@ -892,8 +855,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_SensorID")]
|
||||
public uint which;
|
||||
public SDL_SensorID which;
|
||||
|
||||
[NativeTypeName("float[6]")]
|
||||
public _data_e__FixedBuffer data;
|
||||
|
|
@ -930,8 +892,7 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
[NativeTypeName("SDL_WindowID")]
|
||||
public uint windowID;
|
||||
public SDL_WindowID windowID;
|
||||
|
||||
[NativeTypeName("Sint32")]
|
||||
public int code;
|
||||
|
|
@ -1076,12 +1037,10 @@ namespace SDL
|
|||
public static extern int SDL_PeepEvents(SDL_Event* events, int numevents, SDL_eventaction action, [NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasEvent([NativeTypeName("Uint32")] uint type);
|
||||
public static extern SDL_bool SDL_HasEvent([NativeTypeName("Uint32")] uint type);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType);
|
||||
public static extern SDL_bool SDL_HasEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_FlushEvent([NativeTypeName("Uint32")] uint type);
|
||||
|
|
@ -1090,16 +1049,13 @@ namespace SDL
|
|||
public static extern void SDL_FlushEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_PollEvent(SDL_Event* @event);
|
||||
public static extern SDL_bool SDL_PollEvent(SDL_Event* @event);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WaitEvent(SDL_Event* @event);
|
||||
public static extern SDL_bool SDL_WaitEvent(SDL_Event* @event);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WaitEventTimeout(SDL_Event* @event, [NativeTypeName("Sint32")] int timeoutMS);
|
||||
public static extern SDL_bool SDL_WaitEventTimeout(SDL_Event* @event, [NativeTypeName("Sint32")] int timeoutMS);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_PushEvent(SDL_Event* @event);
|
||||
|
|
@ -1108,8 +1064,7 @@ namespace SDL
|
|||
public static extern void SDL_SetEventFilter([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, int> filter, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetEventFilter([NativeTypeName("SDL_EventFilter *")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, int>* filter, [NativeTypeName("void **")] IntPtr* userdata);
|
||||
public static extern SDL_bool SDL_GetEventFilter([NativeTypeName("SDL_EventFilter *")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, int>* filter, [NativeTypeName("void **")] IntPtr* userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_AddEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, int> filter, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
|
@ -1121,11 +1076,10 @@ namespace SDL
|
|||
public static extern void SDL_FilterEvents([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, int> filter, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_SetEventEnabled([NativeTypeName("Uint32")] uint type, [NativeTypeName("SDL_bool")] int enabled);
|
||||
public static extern void SDL_SetEventEnabled([NativeTypeName("Uint32")] uint type, SDL_bool enabled);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_EventEnabled([NativeTypeName("Uint32")] uint type);
|
||||
public static extern SDL_bool SDL_EventEnabled([NativeTypeName("Uint32")] uint type);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint32")]
|
||||
|
|
|
|||
|
|
@ -58,14 +58,11 @@ namespace SDL
|
|||
[NativeTypeName("Uint64")]
|
||||
public ulong size;
|
||||
|
||||
[NativeTypeName("SDL_Time")]
|
||||
public long create_time;
|
||||
public SDL_Time create_time;
|
||||
|
||||
[NativeTypeName("SDL_Time")]
|
||||
public long modify_time;
|
||||
public SDL_Time modify_time;
|
||||
|
||||
[NativeTypeName("SDL_Time")]
|
||||
public long access_time;
|
||||
public SDL_Time access_time;
|
||||
}
|
||||
|
||||
public static unsafe partial class SDL3
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ namespace SDL
|
|||
public static extern int SDL_AddGamepadMapping([NativeTypeName("const char *")] byte* mapping);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_AddGamepadMappingsFromIO(SDL_IOStream* src, [NativeTypeName("SDL_bool")] int closeio);
|
||||
public static extern int SDL_AddGamepadMappingsFromIO(SDL_IOStream* src, SDL_bool closeio);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_AddGamepadMappingsFromFile([NativeTypeName("const char *")] byte* file);
|
||||
|
|
@ -204,73 +204,68 @@ namespace SDL
|
|||
public static extern byte* SDL_GetGamepadMapping(SDL_Gamepad* gamepad);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetGamepadMapping([NativeTypeName("SDL_JoystickID")] uint instance_id, [NativeTypeName("const char *")] byte* mapping);
|
||||
public static extern int SDL_SetGamepadMapping(SDL_JoystickID instance_id, [NativeTypeName("const char *")] byte* mapping);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasGamepad();
|
||||
public static extern SDL_bool SDL_HasGamepad();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_JoystickID *")]
|
||||
public static extern uint* SDL_GetGamepads(int* count);
|
||||
public static extern SDL_JoystickID* SDL_GetGamepads(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_IsGamepad([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern SDL_bool SDL_IsGamepad(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetGamepadInstanceName([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern byte* SDL_GetGamepadInstanceName(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetGamepadInstancePath([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern byte* SDL_GetGamepadInstancePath(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetGamepadInstancePlayerIndex([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern int SDL_GetGamepadInstancePlayerIndex(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_JoystickGUID")]
|
||||
public static extern SDL_GUID SDL_GetGamepadInstanceGUID([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern SDL_GUID SDL_GetGamepadInstanceGUID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint16")]
|
||||
public static extern ushort SDL_GetGamepadInstanceVendor([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern ushort SDL_GetGamepadInstanceVendor(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint16")]
|
||||
public static extern ushort SDL_GetGamepadInstanceProduct([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern ushort SDL_GetGamepadInstanceProduct(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint16")]
|
||||
public static extern ushort SDL_GetGamepadInstanceProductVersion([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern ushort SDL_GetGamepadInstanceProductVersion(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GamepadType SDL_GetGamepadInstanceType([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern SDL_GamepadType SDL_GetGamepadInstanceType(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GamepadType SDL_GetRealGamepadInstanceType([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern SDL_GamepadType SDL_GetRealGamepadInstanceType(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("char *")]
|
||||
public static extern byte* SDL_GetGamepadInstanceMapping([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern byte* SDL_GetGamepadInstanceMapping(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Gamepad* SDL_OpenGamepad([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
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([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern SDL_Gamepad* SDL_GetGamepadFromInstanceID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Gamepad* SDL_GetGamepadFromPlayerIndex(int player_index);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_GetGamepadProperties(SDL_Gamepad* gamepad);
|
||||
public static extern SDL_PropertiesID SDL_GetGamepadProperties(SDL_Gamepad* gamepad);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_JoystickID")]
|
||||
public static extern uint SDL_GetGamepadInstanceID(SDL_Gamepad* gamepad);
|
||||
public static extern SDL_JoystickID SDL_GetGamepadInstanceID(SDL_Gamepad* gamepad);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
|
|
@ -323,18 +318,16 @@ namespace SDL
|
|||
public static extern SDL_PowerState SDL_GetGamepadPowerInfo(SDL_Gamepad* gamepad, int* percent);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GamepadConnected(SDL_Gamepad* gamepad);
|
||||
public static extern SDL_bool SDL_GamepadConnected(SDL_Gamepad* gamepad);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Joystick* SDL_GetGamepadJoystick(SDL_Gamepad* gamepad);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_SetGamepadEventsEnabled([NativeTypeName("SDL_bool")] int enabled);
|
||||
public static extern void SDL_SetGamepadEventsEnabled(SDL_bool enabled);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GamepadEventsEnabled();
|
||||
public static extern SDL_bool SDL_GamepadEventsEnabled();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GamepadBinding** SDL_GetGamepadBindings(SDL_Gamepad* gamepad, int* count);
|
||||
|
|
@ -357,8 +350,7 @@ namespace SDL
|
|||
public static extern byte* SDL_GetGamepadStringForAxis(SDL_GamepadAxis axis);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GamepadHasAxis(SDL_Gamepad* gamepad, SDL_GamepadAxis axis);
|
||||
public static extern SDL_bool SDL_GamepadHasAxis(SDL_Gamepad* gamepad, SDL_GamepadAxis axis);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Sint16")]
|
||||
|
|
@ -372,8 +364,7 @@ namespace SDL
|
|||
public static extern byte* SDL_GetGamepadStringForButton(SDL_GamepadButton button);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GamepadHasButton(SDL_Gamepad* gamepad, SDL_GamepadButton button);
|
||||
public static extern SDL_bool SDL_GamepadHasButton(SDL_Gamepad* gamepad, SDL_GamepadButton button);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint8")]
|
||||
|
|
@ -395,15 +386,13 @@ namespace SDL
|
|||
public static extern int SDL_GetGamepadTouchpadFinger(SDL_Gamepad* gamepad, int touchpad, int finger, [NativeTypeName("Uint8 *")] byte* state, float* x, float* y, float* pressure);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GamepadHasSensor(SDL_Gamepad* gamepad, SDL_SensorType type);
|
||||
public static extern SDL_bool SDL_GamepadHasSensor(SDL_Gamepad* gamepad, SDL_SensorType type);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetGamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type, [NativeTypeName("SDL_bool")] int enabled);
|
||||
public static extern int SDL_SetGamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type, SDL_bool enabled);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type);
|
||||
public static extern SDL_bool SDL_GamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern float SDL_GetGamepadSensorDataRate(SDL_Gamepad* gamepad, SDL_SensorType type);
|
||||
|
|
|
|||
|
|
@ -326,37 +326,33 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_HapticID *")]
|
||||
public static extern uint* SDL_GetHaptics(int* count);
|
||||
public static extern SDL_HapticID* SDL_GetHaptics(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetHapticInstanceName([NativeTypeName("SDL_HapticID")] uint instance_id);
|
||||
public static extern byte* SDL_GetHapticInstanceName(SDL_HapticID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Haptic* SDL_OpenHaptic([NativeTypeName("SDL_HapticID")] uint instance_id);
|
||||
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([NativeTypeName("SDL_HapticID")] uint instance_id);
|
||||
public static extern SDL_Haptic* SDL_GetHapticFromInstanceID(SDL_HapticID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_HapticID")]
|
||||
public static extern uint SDL_GetHapticInstanceID(SDL_Haptic* haptic);
|
||||
public static extern SDL_HapticID SDL_GetHapticInstanceID(SDL_Haptic* haptic);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetHapticName(SDL_Haptic* haptic);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_IsMouseHaptic();
|
||||
public static extern SDL_bool SDL_IsMouseHaptic();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Haptic* SDL_OpenHapticFromMouse();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_IsJoystickHaptic(SDL_Joystick* joystick);
|
||||
public static extern SDL_bool SDL_IsJoystickHaptic(SDL_Joystick* joystick);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Haptic* SDL_OpenHapticFromJoystick(SDL_Joystick* joystick);
|
||||
|
|
@ -378,8 +374,7 @@ namespace SDL
|
|||
public static extern int SDL_GetNumHapticAxes(SDL_Haptic* haptic);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HapticEffectSupported(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect);
|
||||
public static extern SDL_bool SDL_HapticEffectSupported(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_CreateHapticEffect(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect);
|
||||
|
|
@ -415,8 +410,7 @@ namespace SDL
|
|||
public static extern int SDL_StopHapticEffects(SDL_Haptic* haptic);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HapticRumbleSupported(SDL_Haptic* haptic);
|
||||
public static extern SDL_bool SDL_HapticRumbleSupported(SDL_Haptic* haptic);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_InitHapticRumble(SDL_Haptic* haptic);
|
||||
|
|
|
|||
|
|
@ -151,6 +151,6 @@ namespace SDL
|
|||
public static extern int SDL_hid_get_report_descriptor(SDL_hid_device* dev, [NativeTypeName("unsigned char *")] byte* buf, [NativeTypeName("size_t")] nuint buf_size);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_hid_ble_scan([NativeTypeName("SDL_bool")] int active);
|
||||
public static extern void SDL_hid_ble_scan(SDL_bool active);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,16 +38,13 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_SetHintWithPriority([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, SDL_HintPriority priority);
|
||||
public static extern SDL_bool SDL_SetHintWithPriority([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, SDL_HintPriority priority);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_SetHint([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value);
|
||||
public static extern SDL_bool SDL_SetHint([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ResetHint([NativeTypeName("const char *")] byte* name);
|
||||
public static extern SDL_bool SDL_ResetHint([NativeTypeName("const char *")] byte* name);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_ResetHints();
|
||||
|
|
@ -57,8 +54,7 @@ namespace SDL
|
|||
public static extern byte* SDL_GetHint([NativeTypeName("const char *")] byte* name);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetHintBoolean([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_bool")] int default_value);
|
||||
public static extern SDL_bool SDL_GetHintBoolean([NativeTypeName("const char *")] byte* name, SDL_bool default_value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_AddHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
|
|
|||
|
|
@ -81,8 +81,7 @@ namespace SDL
|
|||
public static extern int SDL_CloseIO(SDL_IOStream* context);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_GetIOProperties(SDL_IOStream* context);
|
||||
public static extern SDL_PropertiesID SDL_GetIOProperties(SDL_IOStream* context);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_IOStatus SDL_GetIOStatus(SDL_IOStream* context);
|
||||
|
|
@ -117,115 +116,89 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_LoadFile_IO(SDL_IOStream* src, [NativeTypeName("size_t *")] nuint* datasize, [NativeTypeName("SDL_bool")] int closeio);
|
||||
public static extern IntPtr SDL_LoadFile_IO(SDL_IOStream* src, [NativeTypeName("size_t *")] nuint* datasize, SDL_bool closeio);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_LoadFile([NativeTypeName("const char *")] byte* file, [NativeTypeName("size_t *")] nuint* datasize);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadU8(SDL_IOStream* src, [NativeTypeName("Uint8 *")] byte* value);
|
||||
public static extern SDL_bool SDL_ReadU8(SDL_IOStream* src, [NativeTypeName("Uint8 *")] byte* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadU16LE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value);
|
||||
public static extern SDL_bool SDL_ReadU16LE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadS16LE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value);
|
||||
public static extern SDL_bool SDL_ReadS16LE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadU16BE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value);
|
||||
public static extern SDL_bool SDL_ReadU16BE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadS16BE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value);
|
||||
public static extern SDL_bool SDL_ReadS16BE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadU32LE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value);
|
||||
public static extern SDL_bool SDL_ReadU32LE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadS32LE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value);
|
||||
public static extern SDL_bool SDL_ReadS32LE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadU32BE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value);
|
||||
public static extern SDL_bool SDL_ReadU32BE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadS32BE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value);
|
||||
public static extern SDL_bool SDL_ReadS32BE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadU64LE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value);
|
||||
public static extern SDL_bool SDL_ReadU64LE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadS64LE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value);
|
||||
public static extern SDL_bool SDL_ReadS64LE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadU64BE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value);
|
||||
public static extern SDL_bool SDL_ReadU64BE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ReadS64BE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value);
|
||||
public static extern SDL_bool SDL_ReadS64BE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteU8(SDL_IOStream* dst, [NativeTypeName("Uint8")] byte value);
|
||||
public static extern SDL_bool SDL_WriteU8(SDL_IOStream* dst, [NativeTypeName("Uint8")] byte value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteU16LE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value);
|
||||
public static extern SDL_bool SDL_WriteU16LE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteS16LE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value);
|
||||
public static extern SDL_bool SDL_WriteS16LE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteU16BE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value);
|
||||
public static extern SDL_bool SDL_WriteU16BE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteS16BE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value);
|
||||
public static extern SDL_bool SDL_WriteS16BE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteU32LE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value);
|
||||
public static extern SDL_bool SDL_WriteU32LE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteS32LE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value);
|
||||
public static extern SDL_bool SDL_WriteS32LE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteU32BE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value);
|
||||
public static extern SDL_bool SDL_WriteU32BE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteS32BE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value);
|
||||
public static extern SDL_bool SDL_WriteS32BE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteU64LE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value);
|
||||
public static extern SDL_bool SDL_WriteU64LE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteS64LE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value);
|
||||
public static extern SDL_bool SDL_WriteS64LE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteU64BE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value);
|
||||
public static extern SDL_bool SDL_WriteU64BE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WriteS64BE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value);
|
||||
public static extern SDL_bool SDL_WriteS64BE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value);
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER \"SDL.iostream.windows.handle\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER => "SDL.iostream.windows.handle"u8;
|
||||
|
|
|
|||
|
|
@ -120,66 +120,61 @@ namespace SDL
|
|||
public static extern void SDL_UnlockJoysticks();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasJoystick();
|
||||
public static extern SDL_bool SDL_HasJoystick();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_JoystickID *")]
|
||||
public static extern uint* SDL_GetJoysticks(int* count);
|
||||
public static extern SDL_JoystickID* SDL_GetJoysticks(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetJoystickInstanceName([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern byte* SDL_GetJoystickInstanceName(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetJoystickInstancePath([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern byte* SDL_GetJoystickInstancePath(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetJoystickInstancePlayerIndex([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern int SDL_GetJoystickInstancePlayerIndex(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_JoystickGUID")]
|
||||
public static extern SDL_GUID SDL_GetJoystickInstanceGUID([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern SDL_GUID SDL_GetJoystickInstanceGUID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint16")]
|
||||
public static extern ushort SDL_GetJoystickInstanceVendor([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern ushort SDL_GetJoystickInstanceVendor(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint16")]
|
||||
public static extern ushort SDL_GetJoystickInstanceProduct([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern ushort SDL_GetJoystickInstanceProduct(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint16")]
|
||||
public static extern ushort SDL_GetJoystickInstanceProductVersion([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern ushort SDL_GetJoystickInstanceProductVersion(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_JoystickType SDL_GetJoystickInstanceType([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern SDL_JoystickType SDL_GetJoystickInstanceType(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Joystick* SDL_OpenJoystick([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
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([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern SDL_Joystick* SDL_GetJoystickFromInstanceID(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Joystick* SDL_GetJoystickFromPlayerIndex(int player_index);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_JoystickID")]
|
||||
public static extern uint SDL_AttachVirtualJoystick(SDL_JoystickType type, int naxes, int nbuttons, int nhats);
|
||||
public static extern SDL_JoystickID SDL_AttachVirtualJoystick(SDL_JoystickType type, int naxes, int nbuttons, int nhats);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_JoystickID")]
|
||||
public static extern uint SDL_AttachVirtualJoystickEx([NativeTypeName("const SDL_VirtualJoystickDesc *")] SDL_VirtualJoystickDesc* desc);
|
||||
public static extern SDL_JoystickID SDL_AttachVirtualJoystickEx([NativeTypeName("const SDL_VirtualJoystickDesc *")] SDL_VirtualJoystickDesc* desc);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_DetachVirtualJoystick([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern int SDL_DetachVirtualJoystick(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_IsJoystickVirtual([NativeTypeName("SDL_JoystickID")] uint instance_id);
|
||||
public static extern SDL_bool SDL_IsJoystickVirtual(SDL_JoystickID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetJoystickVirtualAxis(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16")] short value);
|
||||
|
|
@ -191,8 +186,7 @@ namespace SDL
|
|||
public static extern int SDL_SetJoystickVirtualHat(SDL_Joystick* joystick, int hat, [NativeTypeName("Uint8")] byte value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_GetJoystickProperties(SDL_Joystick* joystick);
|
||||
public static extern SDL_PropertiesID SDL_GetJoystickProperties(SDL_Joystick* joystick);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
|
|
@ -246,12 +240,10 @@ namespace SDL
|
|||
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);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_JoystickConnected(SDL_Joystick* joystick);
|
||||
public static extern SDL_bool SDL_JoystickConnected(SDL_Joystick* joystick);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_JoystickID")]
|
||||
public static extern uint SDL_GetJoystickInstanceID(SDL_Joystick* joystick);
|
||||
public static extern SDL_JoystickID SDL_GetJoystickInstanceID(SDL_Joystick* joystick);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetNumJoystickAxes(SDL_Joystick* joystick);
|
||||
|
|
@ -266,11 +258,10 @@ namespace SDL
|
|||
public static extern int SDL_GetNumJoystickButtons(SDL_Joystick* joystick);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_SetJoystickEventsEnabled([NativeTypeName("SDL_bool")] int enabled);
|
||||
public static extern void SDL_SetJoystickEventsEnabled(SDL_bool enabled);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_JoystickEventsEnabled();
|
||||
public static extern SDL_bool SDL_JoystickEventsEnabled();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_UpdateJoysticks();
|
||||
|
|
@ -280,8 +271,7 @@ namespace SDL
|
|||
public static extern short SDL_GetJoystickAxis(SDL_Joystick* joystick, int axis);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetJoystickAxisInitialState(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16 *")] short* state);
|
||||
public static extern SDL_bool SDL_GetJoystickAxisInitialState(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16 *")] short* state);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetJoystickBall(SDL_Joystick* joystick, int ball, int* dx, int* dy);
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ namespace SDL
|
|||
{
|
||||
public SDL_Scancode scancode;
|
||||
|
||||
[NativeTypeName("SDL_Keycode")]
|
||||
public int sym;
|
||||
public SDL_Keycode sym;
|
||||
|
||||
[NativeTypeName("Uint16")]
|
||||
public ushort mod;
|
||||
|
|
@ -44,16 +43,14 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasKeyboard();
|
||||
public static extern SDL_bool SDL_HasKeyboard();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_KeyboardID *")]
|
||||
public static extern uint* SDL_GetKeyboards(int* count);
|
||||
public static extern SDL_KeyboardID* SDL_GetKeyboards(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetKeyboardInstanceName([NativeTypeName("SDL_KeyboardID")] uint instance_id);
|
||||
public static extern byte* SDL_GetKeyboardInstanceName(SDL_KeyboardID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Window* SDL_GetKeyboardFocus();
|
||||
|
|
@ -72,11 +69,10 @@ namespace SDL
|
|||
public static extern void SDL_SetModState(SDL_Keymod modstate);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_Keycode")]
|
||||
public static extern int SDL_GetKeyFromScancode(SDL_Scancode scancode);
|
||||
public static extern SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Scancode SDL_GetScancodeFromKey([NativeTypeName("SDL_Keycode")] int key);
|
||||
public static extern SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
|
|
@ -87,18 +83,16 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetKeyName([NativeTypeName("SDL_Keycode")] int key);
|
||||
public static extern byte* SDL_GetKeyName(SDL_Keycode key);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_Keycode")]
|
||||
public static extern int SDL_GetKeyFromName([NativeTypeName("const char *")] byte* name);
|
||||
public static extern SDL_Keycode SDL_GetKeyFromName([NativeTypeName("const char *")] byte* name);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_StartTextInput();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_TextInputActive();
|
||||
public static extern SDL_bool SDL_TextInputActive();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_StopTextInput();
|
||||
|
|
@ -110,11 +104,9 @@ namespace SDL
|
|||
public static extern int SDL_SetTextInputRect([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasScreenKeyboardSupport();
|
||||
public static extern SDL_bool SDL_HasScreenKeyboardSupport();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ScreenKeyboardShown(SDL_Window* window);
|
||||
public static extern SDL_bool SDL_ScreenKeyboardShown(SDL_Window* window);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,16 +65,14 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasMouse();
|
||||
public static extern SDL_bool SDL_HasMouse();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_MouseID *")]
|
||||
public static extern uint* SDL_GetMice(int* count);
|
||||
public static extern SDL_MouseID* SDL_GetMice(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetMouseInstanceName([NativeTypeName("SDL_MouseID")] uint instance_id);
|
||||
public static extern byte* SDL_GetMouseInstanceName(SDL_MouseID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Window* SDL_GetMouseFocus();
|
||||
|
|
@ -98,14 +96,13 @@ namespace SDL
|
|||
public static extern int SDL_WarpMouseGlobal(float x, float y);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetRelativeMouseMode([NativeTypeName("SDL_bool")] int enabled);
|
||||
public static extern int SDL_SetRelativeMouseMode(SDL_bool enabled);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_CaptureMouse([NativeTypeName("SDL_bool")] int enabled);
|
||||
public static extern int SDL_CaptureMouse(SDL_bool enabled);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetRelativeMouseMode();
|
||||
public static extern SDL_bool SDL_GetRelativeMouseMode();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Cursor* SDL_CreateCursor([NativeTypeName("const Uint8 *")] byte* data, [NativeTypeName("const Uint8 *")] byte* mask, int w, int h, int hot_x, int hot_y);
|
||||
|
|
@ -135,8 +132,7 @@ namespace SDL
|
|||
public static extern int SDL_HideCursor();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_CursorVisible();
|
||||
public static extern SDL_bool SDL_CursorVisible();
|
||||
|
||||
[NativeTypeName("#define SDL_BUTTON_LEFT 1")]
|
||||
public const int SDL_BUTTON_LEFT = 1;
|
||||
|
|
|
|||
|
|
@ -65,40 +65,37 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PenID *")]
|
||||
public static extern uint* SDL_GetPens(int* count);
|
||||
public static extern SDL_PenID* SDL_GetPens(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint32")]
|
||||
public static extern uint SDL_GetPenStatus([NativeTypeName("SDL_PenID")] uint instance_id, float* x, float* y, float* axes, [NativeTypeName("size_t")] nuint num_axes);
|
||||
public static extern uint SDL_GetPenStatus(SDL_PenID instance_id, float* x, float* y, float* axes, [NativeTypeName("size_t")] nuint num_axes);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PenID")]
|
||||
public static extern uint SDL_GetPenFromGUID(SDL_GUID guid);
|
||||
public static extern SDL_PenID SDL_GetPenFromGUID(SDL_GUID guid);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GUID SDL_GetPenGUID([NativeTypeName("SDL_PenID")] uint instance_id);
|
||||
public static extern SDL_GUID SDL_GetPenGUID(SDL_PenID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_PenConnected([NativeTypeName("SDL_PenID")] uint instance_id);
|
||||
public static extern SDL_bool SDL_PenConnected(SDL_PenID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetPenName([NativeTypeName("SDL_PenID")] uint instance_id);
|
||||
public static extern byte* SDL_GetPenName(SDL_PenID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint32")]
|
||||
public static extern uint SDL_GetPenCapabilities([NativeTypeName("SDL_PenID")] uint instance_id, SDL_PenCapabilityInfo* capabilities);
|
||||
public static extern uint SDL_GetPenCapabilities(SDL_PenID instance_id, SDL_PenCapabilityInfo* capabilities);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PenSubtype SDL_GetPenType([NativeTypeName("SDL_PenID")] uint instance_id);
|
||||
public static extern SDL_PenSubtype SDL_GetPenType(SDL_PenID instance_id);
|
||||
|
||||
[NativeTypeName("#define SDL_PEN_INVALID ((SDL_PenID)0)")]
|
||||
public const uint SDL_PEN_INVALID = ((uint)(0));
|
||||
public const SDL_PenID SDL_PEN_INVALID = ((SDL_PenID)(0));
|
||||
|
||||
[NativeTypeName("#define SDL_PEN_MOUSEID ((SDL_MouseID)-2)")]
|
||||
public const uint SDL_PEN_MOUSEID = unchecked((uint)(-2));
|
||||
public const SDL_MouseID SDL_PEN_MOUSEID = ((SDL_MouseID)(-2));
|
||||
|
||||
[NativeTypeName("#define SDL_PEN_INFO_UNKNOWN (-1)")]
|
||||
public const int SDL_PEN_INFO_UNKNOWN = (-1);
|
||||
|
|
|
|||
|
|
@ -389,8 +389,7 @@ namespace SDL
|
|||
public static extern byte* SDL_GetPixelFormatName(SDL_PixelFormatEnum format);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetMasksForPixelFormatEnum(SDL_PixelFormatEnum format, int* bpp, [NativeTypeName("Uint32 *")] uint* Rmask, [NativeTypeName("Uint32 *")] uint* Gmask, [NativeTypeName("Uint32 *")] uint* Bmask, [NativeTypeName("Uint32 *")] uint* Amask);
|
||||
public static extern SDL_bool SDL_GetMasksForPixelFormatEnum(SDL_PixelFormatEnum format, int* bpp, [NativeTypeName("Uint32 *")] uint* Rmask, [NativeTypeName("Uint32 *")] uint* Gmask, [NativeTypeName("Uint32 *")] uint* Bmask, [NativeTypeName("Uint32 *")] uint* Amask);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PixelFormatEnum SDL_GetPixelFormatEnumForMasks(int bpp, [NativeTypeName("Uint32")] uint Rmask, [NativeTypeName("Uint32")] uint Gmask, [NativeTypeName("Uint32")] uint Bmask, [NativeTypeName("Uint32")] uint Amask);
|
||||
|
|
|
|||
|
|
@ -41,73 +41,69 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_GetGlobalProperties();
|
||||
public static extern SDL_PropertiesID SDL_GetGlobalProperties();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_CreateProperties();
|
||||
public static extern SDL_PropertiesID SDL_CreateProperties();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_CopyProperties([NativeTypeName("SDL_PropertiesID")] uint src, [NativeTypeName("SDL_PropertiesID")] uint dst);
|
||||
public static extern int SDL_CopyProperties(SDL_PropertiesID src, SDL_PropertiesID dst);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_LockProperties([NativeTypeName("SDL_PropertiesID")] uint props);
|
||||
public static extern int SDL_LockProperties(SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_UnlockProperties([NativeTypeName("SDL_PropertiesID")] uint props);
|
||||
public static extern void SDL_UnlockProperties(SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetPropertyWithCleanup([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value, [NativeTypeName("void (*)(void *, void *)")] delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> cleanup, [NativeTypeName("void*")] IntPtr userdata);
|
||||
public static extern int SDL_SetPropertyWithCleanup(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value, [NativeTypeName("void (*)(void *, void *)")] delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> cleanup, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetProperty([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value);
|
||||
public static extern int SDL_SetProperty(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([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value);
|
||||
public static extern int SDL_SetStringProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetNumberProperty([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("Sint64")] long value);
|
||||
public static extern int SDL_SetNumberProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("Sint64")] long value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetFloatProperty([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name, float value);
|
||||
public static extern int SDL_SetFloatProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, float value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetBooleanProperty([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_bool")] int value);
|
||||
public static extern int SDL_SetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, SDL_bool value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasProperty([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name);
|
||||
public static extern SDL_bool SDL_HasProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PropertyType SDL_GetPropertyType([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name);
|
||||
public static extern SDL_PropertyType SDL_GetPropertyType(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_GetProperty([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr default_value);
|
||||
public static extern IntPtr SDL_GetProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr default_value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetStringProperty([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* default_value);
|
||||
public static extern byte* SDL_GetStringProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* default_value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Sint64")]
|
||||
public static extern long SDL_GetNumberProperty([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("Sint64")] long default_value);
|
||||
public static extern long SDL_GetNumberProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("Sint64")] long default_value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern float SDL_GetFloatProperty([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name, float default_value);
|
||||
public static extern float SDL_GetFloatProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, float default_value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetBooleanProperty([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_bool")] int default_value);
|
||||
public static extern SDL_bool SDL_GetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, SDL_bool default_value);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_ClearProperty([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("const char *")] byte* name);
|
||||
public static extern int SDL_ClearProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_EnumerateProperties([NativeTypeName("SDL_PropertiesID")] uint props, [NativeTypeName("SDL_EnumeratePropertiesCallback")] delegate* unmanaged[Cdecl]<IntPtr, uint, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
public static extern int SDL_EnumerateProperties(SDL_PropertiesID props, [NativeTypeName("SDL_EnumeratePropertiesCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_PropertiesID, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_DestroyProperties([NativeTypeName("SDL_PropertiesID")] uint props);
|
||||
public static extern void SDL_DestroyProperties(SDL_PropertiesID props);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,84 +65,69 @@ namespace SDL
|
|||
|
||||
public static unsafe partial class SDL3
|
||||
{
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static int SDL_PointInRect([NativeTypeName("const SDL_Point *")] SDL_Point* p, [NativeTypeName("const SDL_Rect *")] SDL_Rect* r)
|
||||
public static SDL_bool SDL_PointInRect([NativeTypeName("const SDL_Point *")] SDL_Point* p, [NativeTypeName("const SDL_Rect *")] SDL_Rect* r)
|
||||
{
|
||||
return ((p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? 1 : 0;
|
||||
}
|
||||
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static int SDL_RectEmpty([NativeTypeName("const SDL_Rect *")] SDL_Rect* r)
|
||||
public static SDL_bool SDL_RectEmpty([NativeTypeName("const SDL_Rect *")] SDL_Rect* r)
|
||||
{
|
||||
return ((r == null) || (r->w <= 0) || (r->h <= 0)) ? 1 : 0;
|
||||
}
|
||||
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static int SDL_RectsEqual([NativeTypeName("const SDL_Rect *")] SDL_Rect* a, [NativeTypeName("const SDL_Rect *")] SDL_Rect* b)
|
||||
public static SDL_bool SDL_RectsEqual([NativeTypeName("const SDL_Rect *")] SDL_Rect* a, [NativeTypeName("const SDL_Rect *")] SDL_Rect* b)
|
||||
{
|
||||
return ((a) != null && (b) != null && (a->x == b->x) && (a->y == b->y) && (a->w == b->w) && (a->h == b->h)) ? 1 : 0;
|
||||
}
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B);
|
||||
public static extern SDL_bool SDL_HasRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result);
|
||||
public static extern SDL_bool SDL_GetRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetRectUnion([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetRectEnclosingPoints([NativeTypeName("const SDL_Point *")] SDL_Point* points, int count, [NativeTypeName("const SDL_Rect *")] SDL_Rect* clip, SDL_Rect* result);
|
||||
public static extern SDL_bool SDL_GetRectEnclosingPoints([NativeTypeName("const SDL_Point *")] SDL_Point* points, int count, [NativeTypeName("const SDL_Rect *")] SDL_Rect* clip, SDL_Rect* result);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetRectAndLineIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int* X1, int* Y1, int* X2, int* Y2);
|
||||
public static extern SDL_bool SDL_GetRectAndLineIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int* X1, int* Y1, int* X2, int* Y2);
|
||||
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static int SDL_PointInRectFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* p, [NativeTypeName("const SDL_FRect *")] SDL_FRect* r)
|
||||
public static SDL_bool SDL_PointInRectFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* p, [NativeTypeName("const SDL_FRect *")] SDL_FRect* r)
|
||||
{
|
||||
return ((p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? 1 : 0;
|
||||
}
|
||||
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static int SDL_RectEmptyFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* r)
|
||||
public static SDL_bool SDL_RectEmptyFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* r)
|
||||
{
|
||||
return ((r == null) || (r->w <= 0.0f) || (r->h <= 0.0f)) ? 1 : 0;
|
||||
}
|
||||
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static int SDL_RectsEqualEpsilon([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b, [NativeTypeName("const float")] float epsilon)
|
||||
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)
|
||||
{
|
||||
return ((a) != null && (b) != null && ((a == b) || ((SDL_fabsf(a->x - b->x) <= epsilon) && (SDL_fabsf(a->y - b->y) <= epsilon) && (SDL_fabsf(a->w - b->w) <= epsilon) && (SDL_fabsf(a->h - b->h) <= epsilon)))) ? 1 : 0;
|
||||
}
|
||||
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static int SDL_RectsEqualFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b)
|
||||
public static SDL_bool SDL_RectsEqualFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b)
|
||||
{
|
||||
return SDL_RectsEqualEpsilon(a, b, 1.1920928955078125e-07F);
|
||||
}
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_HasRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B);
|
||||
public static extern SDL_bool SDL_HasRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result);
|
||||
public static extern SDL_bool SDL_GetRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetRectUnionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetRectEnclosingPointsFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count, [NativeTypeName("const SDL_FRect *")] SDL_FRect* clip, SDL_FRect* result);
|
||||
public static extern SDL_bool SDL_GetRectEnclosingPointsFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count, [NativeTypeName("const SDL_FRect *")] SDL_FRect* clip, SDL_FRect* result);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetRectAndLineIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* rect, float* X1, float* Y1, float* X2, float* Y2);
|
||||
public static extern SDL_bool SDL_GetRectAndLineIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* rect, float* X1, float* Y1, float* X2, float* Y2);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,13 +102,13 @@ namespace SDL
|
|||
public static extern byte* SDL_GetRenderDriver(int index);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_CreateWindowAndRenderer(int width, int height, [NativeTypeName("SDL_WindowFlags")] uint window_flags, SDL_Window** window, SDL_Renderer** renderer);
|
||||
public static extern int SDL_CreateWindowAndRenderer(int width, int height, SDL_WindowFlags window_flags, SDL_Window** window, SDL_Renderer** renderer);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Renderer* SDL_CreateRenderer(SDL_Window* window, [NativeTypeName("const char *")] byte* name, [NativeTypeName("Uint32")] uint flags);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Renderer* SDL_CreateRendererWithProperties([NativeTypeName("SDL_PropertiesID")] uint props);
|
||||
public static extern SDL_Renderer* SDL_CreateRendererWithProperties(SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Renderer* SDL_CreateSoftwareRenderer(SDL_Surface* surface);
|
||||
|
|
@ -123,8 +123,7 @@ namespace SDL
|
|||
public static extern int SDL_GetRendererInfo(SDL_Renderer* renderer, SDL_RendererInfo* info);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_GetRendererProperties(SDL_Renderer* renderer);
|
||||
public static extern SDL_PropertiesID SDL_GetRendererProperties(SDL_Renderer* renderer);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetRenderOutputSize(SDL_Renderer* renderer, int* w, int* h);
|
||||
|
|
@ -139,11 +138,10 @@ namespace SDL
|
|||
public static extern SDL_Texture* SDL_CreateTextureFromSurface(SDL_Renderer* renderer, SDL_Surface* surface);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Texture* SDL_CreateTextureWithProperties(SDL_Renderer* renderer, [NativeTypeName("SDL_PropertiesID")] uint props);
|
||||
public static extern SDL_Texture* SDL_CreateTextureWithProperties(SDL_Renderer* renderer, SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_GetTextureProperties(SDL_Texture* texture);
|
||||
public static extern SDL_PropertiesID SDL_GetTextureProperties(SDL_Texture* texture);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Renderer* SDL_GetRendererFromTexture(SDL_Texture* texture);
|
||||
|
|
@ -233,8 +231,7 @@ namespace SDL
|
|||
public static extern int SDL_GetRenderViewport(SDL_Renderer* renderer, SDL_Rect* rect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_RenderViewportSet(SDL_Renderer* renderer);
|
||||
public static extern SDL_bool SDL_RenderViewportSet(SDL_Renderer* renderer);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetRenderClipRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect);
|
||||
|
|
@ -243,8 +240,7 @@ namespace SDL
|
|||
public static extern int SDL_GetRenderClipRect(SDL_Renderer* renderer, SDL_Rect* rect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_RenderClipEnabled(SDL_Renderer* renderer);
|
||||
public static extern SDL_bool SDL_RenderClipEnabled(SDL_Renderer* renderer);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetRenderScale(SDL_Renderer* renderer, float scaleX, float scaleY);
|
||||
|
|
|
|||
|
|
@ -46,28 +46,26 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_SensorID *")]
|
||||
public static extern uint* SDL_GetSensors(int* count);
|
||||
public static extern SDL_SensorID* SDL_GetSensors(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetSensorInstanceName([NativeTypeName("SDL_SensorID")] uint instance_id);
|
||||
public static extern byte* SDL_GetSensorInstanceName(SDL_SensorID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_SensorType SDL_GetSensorInstanceType([NativeTypeName("SDL_SensorID")] uint instance_id);
|
||||
public static extern SDL_SensorType SDL_GetSensorInstanceType(SDL_SensorID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetSensorInstanceNonPortableType([NativeTypeName("SDL_SensorID")] uint instance_id);
|
||||
public static extern int SDL_GetSensorInstanceNonPortableType(SDL_SensorID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Sensor* SDL_OpenSensor([NativeTypeName("SDL_SensorID")] uint instance_id);
|
||||
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([NativeTypeName("SDL_SensorID")] uint instance_id);
|
||||
public static extern SDL_Sensor* SDL_GetSensorFromInstanceID(SDL_SensorID instance_id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_GetSensorProperties(SDL_Sensor* sensor);
|
||||
public static extern SDL_PropertiesID SDL_GetSensorProperties(SDL_Sensor* sensor);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
|
|
@ -80,8 +78,7 @@ namespace SDL
|
|||
public static extern int SDL_GetSensorNonPortableType(SDL_Sensor* sensor);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_SensorID")]
|
||||
public static extern uint SDL_GetSensorInstanceID(SDL_Sensor* sensor);
|
||||
public static extern SDL_SensorID SDL_GetSensorInstanceID(SDL_Sensor* sensor);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetSensorData(SDL_Sensor* sensor, float* data, int num_values);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace SDL
|
|||
public delegate* unmanaged[Cdecl]<IntPtr, int> close;
|
||||
|
||||
[NativeTypeName("SDL_bool (*)(void *)")]
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int> ready;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, SDL_bool> ready;
|
||||
|
||||
[NativeTypeName("int (*)(void *, const char *, SDL_EnumerateDirectoryCallback, void *)")]
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*, delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, int>, IntPtr, int> enumerate;
|
||||
|
|
@ -68,10 +68,10 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Storage* SDL_OpenTitleStorage([NativeTypeName("const char *")] byte* @override, [NativeTypeName("SDL_PropertiesID")] uint props);
|
||||
public static extern SDL_Storage* SDL_OpenTitleStorage([NativeTypeName("const char *")] byte* @override, SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Storage* SDL_OpenUserStorage([NativeTypeName("const char *")] byte* org, [NativeTypeName("const char *")] byte* app, [NativeTypeName("SDL_PropertiesID")] uint props);
|
||||
public static extern SDL_Storage* SDL_OpenUserStorage([NativeTypeName("const char *")] byte* org, [NativeTypeName("const char *")] byte* app, SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Storage* SDL_OpenFileStorage([NativeTypeName("const char *")] byte* path);
|
||||
|
|
@ -83,8 +83,7 @@ namespace SDL
|
|||
public static extern int SDL_CloseStorage(SDL_Storage* storage);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_StorageReady(SDL_Storage* storage);
|
||||
public static extern SDL_bool SDL_StorageReady(SDL_Storage* storage);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetStorageFileSize(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("Uint64 *")] ulong* length);
|
||||
|
|
|
|||
|
|
@ -89,8 +89,7 @@ namespace SDL
|
|||
public static extern void SDL_DestroySurface(SDL_Surface* surface);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_GetSurfaceProperties(SDL_Surface* surface);
|
||||
public static extern SDL_PropertiesID SDL_GetSurfaceProperties(SDL_Surface* surface);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetSurfaceColorspace(SDL_Surface* surface, SDL_Colorspace colorspace);
|
||||
|
|
@ -108,13 +107,13 @@ namespace SDL
|
|||
public static extern void SDL_UnlockSurface(SDL_Surface* surface);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* SDL_LoadBMP_IO(SDL_IOStream* src, [NativeTypeName("SDL_bool")] int closeio);
|
||||
public static extern SDL_Surface* SDL_LoadBMP_IO(SDL_IOStream* src, SDL_bool closeio);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* SDL_LoadBMP([NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SaveBMP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("SDL_bool")] int closeio);
|
||||
public static extern int SDL_SaveBMP_IO(SDL_Surface* surface, SDL_IOStream* dst, SDL_bool closeio);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SaveBMP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file);
|
||||
|
|
@ -123,15 +122,13 @@ namespace SDL
|
|||
public static extern int SDL_SetSurfaceRLE(SDL_Surface* surface, int flag);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_SurfaceHasRLE(SDL_Surface* surface);
|
||||
public static extern SDL_bool SDL_SurfaceHasRLE(SDL_Surface* surface);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetSurfaceColorKey(SDL_Surface* surface, int flag, [NativeTypeName("Uint32")] uint key);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_SurfaceHasColorKey(SDL_Surface* surface);
|
||||
public static extern SDL_bool SDL_SurfaceHasColorKey(SDL_Surface* surface);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetSurfaceColorKey(SDL_Surface* surface, [NativeTypeName("Uint32 *")] uint* key);
|
||||
|
|
@ -155,8 +152,7 @@ namespace SDL
|
|||
public static extern int SDL_GetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode* blendMode);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_SetSurfaceClipRect(SDL_Surface* surface, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect);
|
||||
public static extern SDL_bool SDL_SetSurfaceClipRect(SDL_Surface* surface, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetSurfaceClipRect(SDL_Surface* surface, SDL_Rect* rect);
|
||||
|
|
@ -174,13 +170,13 @@ namespace SDL
|
|||
public static extern SDL_Surface* SDL_ConvertSurfaceFormat(SDL_Surface* surface, SDL_PixelFormatEnum pixel_format);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* SDL_ConvertSurfaceFormatAndColorspace(SDL_Surface* surface, SDL_PixelFormatEnum pixel_format, SDL_Colorspace colorspace, [NativeTypeName("SDL_PropertiesID")] uint props);
|
||||
public static extern SDL_Surface* SDL_ConvertSurfaceFormatAndColorspace(SDL_Surface* surface, SDL_PixelFormatEnum pixel_format, SDL_Colorspace colorspace, SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_ConvertPixels(int width, int height, SDL_PixelFormatEnum src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormatEnum dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_ConvertPixelsAndColorspace(int width, int height, SDL_PixelFormatEnum src_format, SDL_Colorspace src_colorspace, [NativeTypeName("SDL_PropertiesID")] uint src_properties, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormatEnum dst_format, SDL_Colorspace dst_colorspace, [NativeTypeName("SDL_PropertiesID")] uint dst_properties, [NativeTypeName("void*")] IntPtr dst, int dst_pitch);
|
||||
public static extern int SDL_ConvertPixelsAndColorspace(int width, int height, SDL_PixelFormatEnum src_format, SDL_Colorspace src_colorspace, SDL_PropertiesID src_properties, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormatEnum dst_format, SDL_Colorspace dst_colorspace, SDL_PropertiesID dst_properties, [NativeTypeName("void*")] IntPtr dst, int dst_pitch);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_PremultiplyAlpha(int width, int height, SDL_PixelFormatEnum src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormatEnum dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch);
|
||||
|
|
|
|||
|
|
@ -46,19 +46,16 @@ namespace SDL
|
|||
public static extern int SDL_GetAndroidSDKVersion();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern int SDL_IsAndroidTV();
|
||||
public static extern SDL_bool SDL_IsAndroidTV();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern int SDL_IsChromebook();
|
||||
public static extern SDL_bool SDL_IsChromebook();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static extern int SDL_IsDeXMode();
|
||||
public static extern SDL_bool SDL_IsDeXMode();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Android")]
|
||||
|
|
@ -80,7 +77,7 @@ namespace SDL
|
|||
|
||||
[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*, int, void> cb, [NativeTypeName("void*")] IntPtr userdata);
|
||||
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);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Android")]
|
||||
|
|
|
|||
|
|
@ -41,16 +41,15 @@ namespace SDL
|
|||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern void SDL_SetWindowsMessageHook([NativeTypeName("SDL_WindowsMessageHook")] delegate* unmanaged[Cdecl]<IntPtr, MSG*, int> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
public static extern void SDL_SetWindowsMessageHook([NativeTypeName("SDL_WindowsMessageHook")] delegate* unmanaged[Cdecl]<IntPtr, MSG*, SDL_bool> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern int SDL_Direct3D9GetAdapterIndex([NativeTypeName("SDL_DisplayID")] uint displayID);
|
||||
public static extern int SDL_Direct3D9GetAdapterIndex(SDL_DisplayID displayID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern int SDL_DXGIGetOutputInfo([NativeTypeName("SDL_DisplayID")] uint displayID, int* adapterIndex, int* outputIndex);
|
||||
public static extern SDL_bool SDL_DXGIGetOutputInfo(SDL_DisplayID displayID, int* adapterIndex, int* outputIndex);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
|
|
|
|||
|
|
@ -31,11 +31,10 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl]<IntPtr, IntPtr, SDL_bool> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_IsTablet();
|
||||
public static extern SDL_bool SDL_IsTablet();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_OnApplicationWillTerminate();
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("iOS")]
|
||||
public static extern void SDL_iPhoneSetEventPump([NativeTypeName("SDL_bool")] int enabled);
|
||||
public static extern void SDL_iPhoneSetEventPump(SDL_bool enabled);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("iOS")]
|
||||
|
|
|
|||
|
|
@ -56,12 +56,10 @@ namespace SDL
|
|||
public static extern byte* SDL_GetThreadName(SDL_Thread* thread);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_ThreadID")]
|
||||
public static extern ulong SDL_GetCurrentThreadID();
|
||||
public static extern SDL_ThreadID SDL_GetCurrentThreadID();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_ThreadID")]
|
||||
public static extern ulong SDL_GetThreadID(SDL_Thread* thread);
|
||||
public static extern SDL_ThreadID SDL_GetThreadID(SDL_Thread* thread);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetThreadPriority(SDL_ThreadPriority priority);
|
||||
|
|
@ -73,15 +71,14 @@ namespace SDL
|
|||
public static extern void SDL_DetachThread(SDL_Thread* thread);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_TLSID")]
|
||||
public static extern uint SDL_CreateTLS();
|
||||
public static extern SDL_TLSID SDL_CreateTLS();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_GetTLS([NativeTypeName("SDL_TLSID")] uint id);
|
||||
public static extern IntPtr SDL_GetTLS(SDL_TLSID id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetTLS([NativeTypeName("SDL_TLSID")] uint id, [NativeTypeName("const void *")] IntPtr value, [NativeTypeName("void (*)(void *)")] delegate* unmanaged[Cdecl]<IntPtr, void> destructor);
|
||||
public static extern int SDL_SetTLS(SDL_TLSID id, [NativeTypeName("const void *")] IntPtr value, [NativeTypeName("void (*)(void *)")] delegate* unmanaged[Cdecl]<IntPtr, void> destructor);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_CleanupTLS();
|
||||
|
|
|
|||
|
|
@ -65,20 +65,19 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetCurrentTime([NativeTypeName("SDL_Time *")] long* ticks);
|
||||
public static extern int SDL_GetCurrentTime(SDL_Time* ticks);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_TimeToDateTime([NativeTypeName("SDL_Time")] long ticks, SDL_DateTime* dt, [NativeTypeName("SDL_bool")] int localTime);
|
||||
public static extern int SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime* dt, SDL_bool localTime);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_DateTimeToTime([NativeTypeName("const SDL_DateTime *")] SDL_DateTime* dt, [NativeTypeName("SDL_Time *")] long* ticks);
|
||||
public static extern int SDL_DateTimeToTime([NativeTypeName("const SDL_DateTime *")] SDL_DateTime* dt, SDL_Time* ticks);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_TimeToWindows([NativeTypeName("SDL_Time")] long ticks, [NativeTypeName("Uint32 *")] uint* dwLowDateTime, [NativeTypeName("Uint32 *")] uint* dwHighDateTime);
|
||||
public static extern void SDL_TimeToWindows(SDL_Time ticks, [NativeTypeName("Uint32 *")] uint* dwLowDateTime, [NativeTypeName("Uint32 *")] uint* dwHighDateTime);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_Time")]
|
||||
public static extern long SDL_TimeFromWindows([NativeTypeName("Uint32")] uint dwLowDateTime, [NativeTypeName("Uint32")] uint dwHighDateTime);
|
||||
public static extern SDL_Time SDL_TimeFromWindows([NativeTypeName("Uint32")] uint dwLowDateTime, [NativeTypeName("Uint32")] uint dwHighDateTime);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetDaysInMonth(int year, int month);
|
||||
|
|
|
|||
|
|
@ -53,12 +53,10 @@ namespace SDL
|
|||
public static extern void SDL_DelayNS([NativeTypeName("Uint64")] ulong ns);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_TimerID")]
|
||||
public static extern uint SDL_AddTimer([NativeTypeName("Uint32")] uint interval, [NativeTypeName("SDL_TimerCallback")] delegate* unmanaged[Cdecl]<uint, IntPtr, uint> callback, [NativeTypeName("void*")] IntPtr param2);
|
||||
public static extern SDL_TimerID SDL_AddTimer([NativeTypeName("Uint32")] uint interval, [NativeTypeName("SDL_TimerCallback")] delegate* unmanaged[Cdecl]<uint, IntPtr, uint> callback, [NativeTypeName("void*")] IntPtr param2);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_RemoveTimer([NativeTypeName("SDL_TimerID")] uint id);
|
||||
public static extern SDL_bool SDL_RemoveTimer(SDL_TimerID id);
|
||||
|
||||
[NativeTypeName("#define SDL_MS_PER_SECOND 1000")]
|
||||
public const int SDL_MS_PER_SECOND = 1000;
|
||||
|
|
|
|||
|
|
@ -37,8 +37,7 @@ namespace SDL
|
|||
|
||||
public partial struct SDL_Finger
|
||||
{
|
||||
[NativeTypeName("SDL_FingerID")]
|
||||
public ulong id;
|
||||
public SDL_FingerID id;
|
||||
|
||||
public float x;
|
||||
|
||||
|
|
@ -50,26 +49,25 @@ namespace SDL
|
|||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_TouchID *")]
|
||||
public static extern ulong* SDL_GetTouchDevices(int* count);
|
||||
public static extern SDL_TouchID* SDL_GetTouchDevices(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetTouchDeviceName([NativeTypeName("SDL_TouchID")] ulong touchID);
|
||||
public static extern byte* SDL_GetTouchDeviceName(SDL_TouchID touchID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_TouchDeviceType SDL_GetTouchDeviceType([NativeTypeName("SDL_TouchID")] ulong touchID);
|
||||
public static extern SDL_TouchDeviceType SDL_GetTouchDeviceType(SDL_TouchID touchID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetNumTouchFingers([NativeTypeName("SDL_TouchID")] ulong touchID);
|
||||
public static extern int SDL_GetNumTouchFingers(SDL_TouchID touchID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Finger* SDL_GetTouchFinger([NativeTypeName("SDL_TouchID")] ulong touchID, int index);
|
||||
public static extern SDL_Finger* SDL_GetTouchFinger(SDL_TouchID touchID, int index);
|
||||
|
||||
[NativeTypeName("#define SDL_TOUCH_MOUSEID ((SDL_MouseID)-1)")]
|
||||
public const uint SDL_TOUCH_MOUSEID = unchecked((uint)(-1));
|
||||
public const SDL_MouseID SDL_TOUCH_MOUSEID = ((SDL_MouseID)(-1));
|
||||
|
||||
[NativeTypeName("#define SDL_MOUSE_TOUCHID ((SDL_TouchID)-1)")]
|
||||
public const ulong SDL_MOUSE_TOUCHID = unchecked((ulong)(-1));
|
||||
public const SDL_TouchID SDL_MOUSE_TOUCHID = ((SDL_TouchID)(-1));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,7 @@ namespace SDL
|
|||
|
||||
public partial struct SDL_DisplayMode
|
||||
{
|
||||
[NativeTypeName("SDL_DisplayID")]
|
||||
public uint displayID;
|
||||
public SDL_DisplayID displayID;
|
||||
|
||||
public SDL_PixelFormatEnum format;
|
||||
|
||||
|
|
@ -164,63 +163,57 @@ namespace SDL
|
|||
public static extern SDL_SystemTheme SDL_GetSystemTheme();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_DisplayID *")]
|
||||
public static extern uint* SDL_GetDisplays(int* count);
|
||||
public static extern SDL_DisplayID* SDL_GetDisplays(int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_DisplayID")]
|
||||
public static extern uint SDL_GetPrimaryDisplay();
|
||||
public static extern SDL_DisplayID SDL_GetPrimaryDisplay();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_GetDisplayProperties([NativeTypeName("SDL_DisplayID")] uint displayID);
|
||||
public static extern SDL_PropertiesID SDL_GetDisplayProperties(SDL_DisplayID displayID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* SDL_GetDisplayName([NativeTypeName("SDL_DisplayID")] uint displayID);
|
||||
public static extern byte* SDL_GetDisplayName(SDL_DisplayID displayID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetDisplayBounds([NativeTypeName("SDL_DisplayID")] uint displayID, SDL_Rect* rect);
|
||||
public static extern int SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect* rect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetDisplayUsableBounds([NativeTypeName("SDL_DisplayID")] uint displayID, SDL_Rect* rect);
|
||||
public static extern int SDL_GetDisplayUsableBounds(SDL_DisplayID displayID, SDL_Rect* rect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_DisplayOrientation SDL_GetNaturalDisplayOrientation([NativeTypeName("SDL_DisplayID")] uint displayID);
|
||||
public static extern SDL_DisplayOrientation SDL_GetNaturalDisplayOrientation(SDL_DisplayID displayID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_DisplayOrientation SDL_GetCurrentDisplayOrientation([NativeTypeName("SDL_DisplayID")] uint displayID);
|
||||
public static extern SDL_DisplayOrientation SDL_GetCurrentDisplayOrientation(SDL_DisplayID displayID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern float SDL_GetDisplayContentScale([NativeTypeName("SDL_DisplayID")] uint displayID);
|
||||
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([NativeTypeName("SDL_DisplayID")] uint displayID, int* count);
|
||||
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([NativeTypeName("SDL_DisplayID")] uint displayID, int w, int h, float refresh_rate, [NativeTypeName("SDL_bool")] int include_high_density_modes);
|
||||
public static extern SDL_DisplayMode* SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, SDL_bool include_high_density_modes);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const SDL_DisplayMode *")]
|
||||
public static extern SDL_DisplayMode* SDL_GetDesktopDisplayMode([NativeTypeName("SDL_DisplayID")] uint displayID);
|
||||
public static extern SDL_DisplayMode* SDL_GetDesktopDisplayMode(SDL_DisplayID displayID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const SDL_DisplayMode *")]
|
||||
public static extern SDL_DisplayMode* SDL_GetCurrentDisplayMode([NativeTypeName("SDL_DisplayID")] uint displayID);
|
||||
public static extern SDL_DisplayMode* SDL_GetCurrentDisplayMode(SDL_DisplayID displayID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_DisplayID")]
|
||||
public static extern uint SDL_GetDisplayForPoint([NativeTypeName("const SDL_Point *")] SDL_Point* point);
|
||||
public static extern SDL_DisplayID SDL_GetDisplayForPoint([NativeTypeName("const SDL_Point *")] SDL_Point* point);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_DisplayID")]
|
||||
public static extern uint SDL_GetDisplayForRect([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect);
|
||||
public static extern SDL_DisplayID SDL_GetDisplayForRect([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_DisplayID")]
|
||||
public static extern uint SDL_GetDisplayForWindow(SDL_Window* window);
|
||||
public static extern SDL_DisplayID SDL_GetDisplayForWindow(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern float SDL_GetWindowPixelDensity(SDL_Window* window);
|
||||
|
|
@ -244,31 +237,28 @@ namespace SDL
|
|||
public static extern uint SDL_GetWindowPixelFormat(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Window* SDL_CreateWindow([NativeTypeName("const char *")] byte* title, int w, int h, [NativeTypeName("SDL_WindowFlags")] uint flags);
|
||||
public static extern SDL_Window* SDL_CreateWindow([NativeTypeName("const char *")] byte* title, int w, int h, SDL_WindowFlags flags);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Window* SDL_CreatePopupWindow(SDL_Window* parent, int offset_x, int offset_y, int w, int h, [NativeTypeName("SDL_WindowFlags")] uint flags);
|
||||
public static extern SDL_Window* SDL_CreatePopupWindow(SDL_Window* parent, int offset_x, int offset_y, int w, int h, SDL_WindowFlags flags);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Window* SDL_CreateWindowWithProperties([NativeTypeName("SDL_PropertiesID")] uint props);
|
||||
public static extern SDL_Window* SDL_CreateWindowWithProperties(SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_WindowID")]
|
||||
public static extern uint SDL_GetWindowID(SDL_Window* window);
|
||||
public static extern SDL_WindowID SDL_GetWindowID(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Window* SDL_GetWindowFromID([NativeTypeName("SDL_WindowID")] uint id);
|
||||
public static extern SDL_Window* SDL_GetWindowFromID(SDL_WindowID id);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Window* SDL_GetWindowParent(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_PropertiesID")]
|
||||
public static extern uint SDL_GetWindowProperties(SDL_Window* window);
|
||||
public static extern SDL_PropertiesID SDL_GetWindowProperties(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_WindowFlags")]
|
||||
public static extern uint SDL_GetWindowFlags(SDL_Window* window);
|
||||
public static extern SDL_WindowFlags SDL_GetWindowFlags(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetWindowTitle(SDL_Window* window, [NativeTypeName("const char *")] byte* title);
|
||||
|
|
@ -311,13 +301,13 @@ namespace SDL
|
|||
public static extern int SDL_GetWindowMaximumSize(SDL_Window* window, int* w, int* h);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetWindowBordered(SDL_Window* window, [NativeTypeName("SDL_bool")] int bordered);
|
||||
public static extern int SDL_SetWindowBordered(SDL_Window* window, SDL_bool bordered);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetWindowResizable(SDL_Window* window, [NativeTypeName("SDL_bool")] int resizable);
|
||||
public static extern int SDL_SetWindowResizable(SDL_Window* window, SDL_bool resizable);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetWindowAlwaysOnTop(SDL_Window* window, [NativeTypeName("SDL_bool")] int on_top);
|
||||
public static extern int SDL_SetWindowAlwaysOnTop(SDL_Window* window, SDL_bool on_top);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_ShowWindow(SDL_Window* window);
|
||||
|
|
@ -338,14 +328,13 @@ namespace SDL
|
|||
public static extern int SDL_RestoreWindow(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetWindowFullscreen(SDL_Window* window, [NativeTypeName("SDL_bool")] int fullscreen);
|
||||
public static extern int SDL_SetWindowFullscreen(SDL_Window* window, SDL_bool fullscreen);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SyncWindow(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_WindowHasSurface(SDL_Window* window);
|
||||
public static extern SDL_bool SDL_WindowHasSurface(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* SDL_GetWindowSurface(SDL_Window* window);
|
||||
|
|
@ -360,18 +349,16 @@ namespace SDL
|
|||
public static extern int SDL_DestroyWindowSurface(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetWindowKeyboardGrab(SDL_Window* window, [NativeTypeName("SDL_bool")] int grabbed);
|
||||
public static extern int SDL_SetWindowKeyboardGrab(SDL_Window* window, SDL_bool grabbed);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetWindowMouseGrab(SDL_Window* window, [NativeTypeName("SDL_bool")] int grabbed);
|
||||
public static extern int SDL_SetWindowMouseGrab(SDL_Window* window, SDL_bool grabbed);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetWindowKeyboardGrab(SDL_Window* window);
|
||||
public static extern SDL_bool SDL_GetWindowKeyboardGrab(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GetWindowMouseGrab(SDL_Window* window);
|
||||
public static extern SDL_bool SDL_GetWindowMouseGrab(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Window* SDL_GetGrabbedWindow();
|
||||
|
|
@ -396,7 +383,7 @@ namespace SDL
|
|||
public static extern int SDL_SetWindowInputFocus(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_SetWindowFocusable(SDL_Window* window, [NativeTypeName("SDL_bool")] int focusable);
|
||||
public static extern int SDL_SetWindowFocusable(SDL_Window* window, SDL_bool focusable);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_ShowWindowSystemMenu(SDL_Window* window, int x, int y);
|
||||
|
|
@ -414,8 +401,7 @@ namespace SDL
|
|||
public static extern void SDL_DestroyWindow(SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_ScreenSaverEnabled();
|
||||
public static extern SDL_bool SDL_ScreenSaverEnabled();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_EnableScreenSaver();
|
||||
|
|
@ -438,8 +424,7 @@ namespace SDL
|
|||
public static extern void SDL_GL_UnloadLibrary();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_GL_ExtensionSupported([NativeTypeName("const char *")] byte* extension);
|
||||
public static extern SDL_bool SDL_GL_ExtensionSupported([NativeTypeName("const char *")] byte* extension);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_GL_ResetAttributes();
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ namespace SDL
|
|||
public static extern byte** SDL_Vulkan_GetInstanceExtensions([NativeTypeName("Uint32 *")] uint* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("SDL_bool")]
|
||||
public static extern int SDL_Vulkan_CreateSurface(SDL_Window* window, [NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("const struct VkAllocationCallbacks *")] VkAllocationCallbacks* allocator, [NativeTypeName("VkSurfaceKHR *")] VkSurfaceKHR_T** surface);
|
||||
public static extern SDL_bool SDL_Vulkan_CreateSurface(SDL_Window* window, [NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("const struct VkAllocationCallbacks *")] VkAllocationCallbacks* allocator, [NativeTypeName("VkSurfaceKHR *")] VkSurfaceKHR_T** surface);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_AudioDeviceID : UInt32;
|
||||
|
||||
[Typedef]
|
||||
public enum SDL_AudioFormat : UInt16
|
||||
{
|
||||
SDL_AUDIO_U8 = SDL3.SDL_AUDIO_U8,
|
||||
SDL_AUDIO_S8 = SDL3.SDL_AUDIO_S8,
|
||||
SDL_AUDIO_S16LE = SDL3.SDL_AUDIO_S16LE,
|
||||
SDL_AUDIO_S16BE = SDL3.SDL_AUDIO_S16BE,
|
||||
SDL_AUDIO_S32LE = SDL3.SDL_AUDIO_S32LE,
|
||||
SDL_AUDIO_S32BE = SDL3.SDL_AUDIO_S32BE,
|
||||
SDL_AUDIO_F32LE = SDL3.SDL_AUDIO_F32LE,
|
||||
SDL_AUDIO_F32BE = SDL3.SDL_AUDIO_F32BE,
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_CameraDeviceID : UInt32;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_HapticID : UInt32;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_JoystickID : UInt32;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_KeyboardID : UInt32;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_Keycode : Int32;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_MouseID : UInt32;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_PenID : UInt32;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_PropertiesID : UInt32;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_SensorID : UInt32;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_bool
|
||||
{
|
||||
SDL_FALSE = SDL3.SDL_FALSE,
|
||||
SDL_TRUE = SDL3.SDL_TRUE
|
||||
}
|
||||
|
||||
[Typedef]
|
||||
public enum SDL_Time : Int64;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_TLSID : UInt32;
|
||||
|
||||
[Typedef]
|
||||
public enum SDL_ThreadID : UInt64;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_TimerID : UInt32;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_FingerID : UInt64;
|
||||
|
||||
[Typedef]
|
||||
public enum SDL_TouchID : UInt64;
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
// 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;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
[Typedef]
|
||||
public enum SDL_DisplayID : UInt32;
|
||||
|
||||
[Typedef]
|
||||
public enum SDL_WindowID : UInt32;
|
||||
|
||||
[Flags]
|
||||
[Typedef]
|
||||
public enum SDL_WindowFlags : uint
|
||||
{
|
||||
SDL_WINDOW_FULLSCREEN = SDL3.SDL_WINDOW_FULLSCREEN,
|
||||
SDL_WINDOW_OPENGL = SDL3.SDL_WINDOW_OPENGL,
|
||||
SDL_WINDOW_OCCLUDED = SDL3.SDL_WINDOW_OCCLUDED,
|
||||
SDL_WINDOW_HIDDEN = SDL3.SDL_WINDOW_HIDDEN,
|
||||
SDL_WINDOW_BORDERLESS = SDL3.SDL_WINDOW_BORDERLESS,
|
||||
SDL_WINDOW_RESIZABLE = SDL3.SDL_WINDOW_RESIZABLE,
|
||||
SDL_WINDOW_MINIMIZED = SDL3.SDL_WINDOW_MINIMIZED,
|
||||
SDL_WINDOW_MAXIMIZED = SDL3.SDL_WINDOW_MAXIMIZED,
|
||||
SDL_WINDOW_MOUSE_GRABBED = SDL3.SDL_WINDOW_MOUSE_GRABBED,
|
||||
SDL_WINDOW_INPUT_FOCUS = SDL3.SDL_WINDOW_INPUT_FOCUS,
|
||||
SDL_WINDOW_MOUSE_FOCUS = SDL3.SDL_WINDOW_MOUSE_FOCUS,
|
||||
SDL_WINDOW_EXTERNAL = SDL3.SDL_WINDOW_EXTERNAL,
|
||||
SDL_WINDOW_HIGH_PIXEL_DENSITY = SDL3.SDL_WINDOW_HIGH_PIXEL_DENSITY,
|
||||
SDL_WINDOW_MOUSE_CAPTURE = SDL3.SDL_WINDOW_MOUSE_CAPTURE,
|
||||
SDL_WINDOW_ALWAYS_ON_TOP = SDL3.SDL_WINDOW_ALWAYS_ON_TOP,
|
||||
SDL_WINDOW_UTILITY = SDL3.SDL_WINDOW_UTILITY,
|
||||
SDL_WINDOW_TOOLTIP = SDL3.SDL_WINDOW_TOOLTIP,
|
||||
SDL_WINDOW_POPUP_MENU = SDL3.SDL_WINDOW_POPUP_MENU,
|
||||
SDL_WINDOW_KEYBOARD_GRABBED = SDL3.SDL_WINDOW_KEYBOARD_GRABBED,
|
||||
SDL_WINDOW_VULKAN = SDL3.SDL_WINDOW_VULKAN,
|
||||
SDL_WINDOW_METAL = SDL3.SDL_WINDOW_METAL,
|
||||
SDL_WINDOW_TRANSPARENT = SDL3.SDL_WINDOW_TRANSPARENT,
|
||||
SDL_WINDOW_NOT_FOCUSABLE = SDL3.SDL_WINDOW_NOT_FOCUSABLE,
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
// 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.Diagnostics;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
/// <summary>
|
||||
/// Denotes a C <c>typedef</c> that is expressed as an enum in C#.
|
||||
/// These need to be manually signaled to ClagnSharp so it uses the custom enum type instaed of the underlying type.
|
||||
/// Handled by <c>get_typedefs()</c> in generate_bindings.py.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Enum)]
|
||||
[Conditional("NEVER")]
|
||||
public class TypedefAttribute : Attribute;
|
||||
}
|
||||
|
|
@ -59,6 +59,13 @@ class Header:
|
|||
if self.output_suffix is not None:
|
||||
yield csproj_root / f"{self.base}/{self.name}.{self.output_suffix}.rsp"
|
||||
|
||||
def cs_file(self):
|
||||
"""Location of the manually-written C# file that implements some parts of the header."""
|
||||
if self.output_suffix is None:
|
||||
return csproj_root / f"{self.base}/{self.name}.cs"
|
||||
else:
|
||||
return csproj_root / f"{self.base}/{self.name}.{self.output_suffix}.cs"
|
||||
|
||||
|
||||
def add(s: str):
|
||||
base, name = s.split("/")
|
||||
|
|
@ -158,6 +165,22 @@ def check_generated_functions(sdl_api, header, generated_file_paths):
|
|||
print(f"[⚠️ Warning] Function {name} not found in generated files:", *generated_file_paths)
|
||||
|
||||
|
||||
typedef_enum_regex = re.compile(r"\[Typedef]\s*public enum (SDL_\w+)", re.MULTILINE)
|
||||
|
||||
|
||||
def get_typedefs():
|
||||
for header in headers:
|
||||
cs_file = header.cs_file()
|
||||
if cs_file.is_file():
|
||||
with open(cs_file, "r", encoding="utf-8") as f:
|
||||
for match in typedef_enum_regex.finditer(f.read()):
|
||||
yield match.group(1)
|
||||
|
||||
|
||||
def typedef(t):
|
||||
return f"{t}={t}"
|
||||
|
||||
|
||||
base_command = [
|
||||
"dotnet", "tool", "run", "ClangSharpPInvokeGenerator",
|
||||
"--headerFile", csproj_root / "SDL.licenseheader",
|
||||
|
|
@ -237,6 +260,13 @@ def generate_platform_specific_headers(sdl_api, header: Header, platforms):
|
|||
def main():
|
||||
sdl_api = get_sdl_api_dump()
|
||||
|
||||
# typedefs are added globally as their types appear outside of the defining header
|
||||
typedefs = list(get_typedefs())
|
||||
if typedefs:
|
||||
base_command.append("--remap")
|
||||
for type_name in typedefs:
|
||||
base_command.append(typedef(type_name))
|
||||
|
||||
for header in headers:
|
||||
output_file = run_clangsharp(base_command, header)
|
||||
check_generated_functions(sdl_api, header, [output_file])
|
||||
|
|
|
|||
Loading…
Reference in New Issue