mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
14617 lines
566 KiB
C#
14617 lines
566 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Sdl.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.SdlApi
|
|
{
|
|
public static unsafe partial class Sdl
|
|
{
|
|
public static partial class PInvoke
|
|
{
|
|
[LibraryImport(Dll, EntryPoint = "SDL_malloc")]
|
|
private static partial void* _Malloc(nuint size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* Malloc(nuint size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Malloc(size);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_calloc")]
|
|
private static partial void* _Calloc(nuint nmemb, nuint size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* Calloc(nuint nmemb, nuint size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Calloc(nmemb, size);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_realloc")]
|
|
private static partial void* _Realloc(void* mem, nuint size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* Realloc(void* mem, nuint size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Realloc(mem, size);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_free")]
|
|
private static partial void _Free(void* mem);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void Free(void* mem)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_Free(mem);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetOriginalMemoryFunctions")]
|
|
private static partial void _GetOriginalMemoryFunctions(
|
|
delegate* unmanaged[Cdecl]<nuint, void*>* malloc_func,
|
|
delegate* unmanaged[Cdecl]<nuint, nuint, void*>* calloc_func,
|
|
delegate* unmanaged[Cdecl]<void*, nuint, void*>* realloc_func,
|
|
delegate* unmanaged[Cdecl]<void*, void>* free_func
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void GetOriginalMemoryFunctions(
|
|
delegate* unmanaged[Cdecl]<nuint, void*>* malloc_func,
|
|
delegate* unmanaged[Cdecl]<nuint, nuint, void*>* calloc_func,
|
|
delegate* unmanaged[Cdecl]<void*, nuint, void*>* realloc_func,
|
|
delegate* unmanaged[Cdecl]<void*, void>* free_func
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_GetOriginalMemoryFunctions(malloc_func, calloc_func, realloc_func, free_func);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetMemoryFunctions")]
|
|
private static partial void _GetMemoryFunctions(
|
|
delegate* unmanaged[Cdecl]<nuint, void*>* malloc_func,
|
|
delegate* unmanaged[Cdecl]<nuint, nuint, void*>* calloc_func,
|
|
delegate* unmanaged[Cdecl]<void*, nuint, void*>* realloc_func,
|
|
delegate* unmanaged[Cdecl]<void*, void>* free_func
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void GetMemoryFunctions(
|
|
delegate* unmanaged[Cdecl]<nuint, void*>* malloc_func,
|
|
delegate* unmanaged[Cdecl]<nuint, nuint, void*>* calloc_func,
|
|
delegate* unmanaged[Cdecl]<void*, nuint, void*>* realloc_func,
|
|
delegate* unmanaged[Cdecl]<void*, void>* free_func
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_GetMemoryFunctions(malloc_func, calloc_func, realloc_func, free_func);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetMemoryFunctions")]
|
|
private static partial byte _SetMemoryFunctions(
|
|
delegate* unmanaged[Cdecl]<nuint, void*> malloc_func,
|
|
delegate* unmanaged[Cdecl]<nuint, nuint, void*> calloc_func,
|
|
delegate* unmanaged[Cdecl]<void*, nuint, void*> realloc_func,
|
|
delegate* unmanaged[Cdecl]<void*, void> free_func
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetMemoryFunctions(
|
|
delegate* unmanaged[Cdecl]<nuint, void*> malloc_func,
|
|
delegate* unmanaged[Cdecl]<nuint, nuint, void*> calloc_func,
|
|
delegate* unmanaged[Cdecl]<void*, nuint, void*> realloc_func,
|
|
delegate* unmanaged[Cdecl]<void*, void> free_func
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetMemoryFunctions(malloc_func, calloc_func, realloc_func, free_func);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_aligned_alloc")]
|
|
private static partial void* _AlignedAlloc(nuint alignment, nuint size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* AlignedAlloc(nuint alignment, nuint size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AlignedAlloc(alignment, size);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_aligned_free")]
|
|
private static partial void _AlignedFree(void* mem);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void AlignedFree(void* mem)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_AlignedFree(mem);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumAllocations")]
|
|
private static partial int _GetNumAllocations();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumAllocations()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumAllocations();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetEnvironment")]
|
|
private static partial nint _GetEnvironment();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint GetEnvironment()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetEnvironment();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateEnvironment")]
|
|
private static partial nint _CreateEnvironment(byte populated);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateEnvironment(byte populated)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateEnvironment(populated);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetEnvironmentVariable",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetEnvironmentVariable(nint env, string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetEnvironmentVariable(nint env, string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetEnvironmentVariable(env, name);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetEnvironmentVariables")]
|
|
private static partial byte** _GetEnvironmentVariables(nint env);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte** GetEnvironmentVariables(nint env)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetEnvironmentVariables(env);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetEnvironmentVariable",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetEnvironmentVariable(nint env, string name, string value, byte overwrite);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetEnvironmentVariable(nint env, string name, string value, byte overwrite)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetEnvironmentVariable(env, name, value, overwrite);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_UnsetEnvironmentVariable",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _UnsetEnvironmentVariable(nint env, string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte UnsetEnvironmentVariable(nint env, string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _UnsetEnvironmentVariable(env, name);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyEnvironment")]
|
|
private static partial void _DestroyEnvironment(nint env);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyEnvironment(nint env)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyEnvironment(env);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_getenv",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _Getenv(string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? Getenv(string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Getenv(name);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_getenv_unsafe",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetenvUnsafe(string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetenvUnsafe(string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetenvUnsafe(name);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_setenv_unsafe",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial int _SetenvUnsafe(string name, string value, int overwrite);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int SetenvUnsafe(string name, string value, int overwrite)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetenvUnsafe(name, value, overwrite);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_unsetenv_unsafe",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial int _UnsetenvUnsafe(string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int UnsetenvUnsafe(string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _UnsetenvUnsafe(name);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_qsort")]
|
|
private static partial void _Qsort(
|
|
void* @base,
|
|
nuint nmemb,
|
|
nuint size,
|
|
delegate* unmanaged[Cdecl]<void*, void*, int> compare
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void Qsort(
|
|
void* @base,
|
|
nuint nmemb,
|
|
nuint size,
|
|
delegate* unmanaged[Cdecl]<void*, void*, int> compare
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_Qsort(@base, nmemb, size, compare);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_bsearch")]
|
|
private static partial void* _Bsearch(
|
|
void* key,
|
|
void* @base,
|
|
nuint nmemb,
|
|
nuint size,
|
|
delegate* unmanaged[Cdecl]<void*, void*, int> compare
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* Bsearch(
|
|
void* key,
|
|
void* @base,
|
|
nuint nmemb,
|
|
nuint size,
|
|
delegate* unmanaged[Cdecl]<void*, void*, int> compare
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Bsearch(key, @base, nmemb, size, compare);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_qsort_r")]
|
|
private static partial void _QsortR(
|
|
void* @base,
|
|
nuint nmemb,
|
|
nuint size,
|
|
delegate* unmanaged[Cdecl]<void*, void*, void*, int> compare,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void QsortR(
|
|
void* @base,
|
|
nuint nmemb,
|
|
nuint size,
|
|
delegate* unmanaged[Cdecl]<void*, void*, void*, int> compare,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_QsortR(@base, nmemb, size, compare, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_bsearch_r")]
|
|
private static partial void* _BsearchR(
|
|
void* key,
|
|
void* @base,
|
|
nuint nmemb,
|
|
nuint size,
|
|
delegate* unmanaged[Cdecl]<void*, void*, void*, int> compare,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* BsearchR(
|
|
void* key,
|
|
void* @base,
|
|
nuint nmemb,
|
|
nuint size,
|
|
delegate* unmanaged[Cdecl]<void*, void*, void*, int> compare,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BsearchR(key, @base, nmemb, size, compare, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_abs")]
|
|
private static partial int _Abs(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Abs(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Abs(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isalpha")]
|
|
private static partial int _Isalpha(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isalpha(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isalpha(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isalnum")]
|
|
private static partial int _Isalnum(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isalnum(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isalnum(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isblank")]
|
|
private static partial int _Isblank(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isblank(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isblank(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_iscntrl")]
|
|
private static partial int _Iscntrl(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Iscntrl(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Iscntrl(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isdigit")]
|
|
private static partial int _Isdigit(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isdigit(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isdigit(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isxdigit")]
|
|
private static partial int _Isxdigit(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isxdigit(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isxdigit(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ispunct")]
|
|
private static partial int _Ispunct(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Ispunct(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Ispunct(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isspace")]
|
|
private static partial int _Isspace(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isspace(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isspace(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isupper")]
|
|
private static partial int _Isupper(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isupper(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isupper(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_islower")]
|
|
private static partial int _Islower(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Islower(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Islower(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isprint")]
|
|
private static partial int _Isprint(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isprint(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isprint(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isgraph")]
|
|
private static partial int _Isgraph(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isgraph(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isgraph(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_toupper")]
|
|
private static partial int _Toupper(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Toupper(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Toupper(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_tolower")]
|
|
private static partial int _Tolower(int x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Tolower(int x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Tolower(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_crc16")]
|
|
private static partial ushort _Crc16(ushort crc, void* data, nuint len);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort Crc16(ushort crc, void* data, nuint len)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Crc16(crc, data, len);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_crc32")]
|
|
private static partial uint _Crc32(uint crc, void* data, nuint len);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint Crc32(uint crc, void* data, nuint len)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Crc32(crc, data, len);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_murmur3_32")]
|
|
private static partial uint _Murmur332(void* data, nuint len, uint seed);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint Murmur332(void* data, nuint len, uint seed)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Murmur332(data, len, seed);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_memcpy")]
|
|
private static partial void* _Memcpy(void* dst, void* src, nuint len);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* Memcpy(void* dst, void* src, nuint len)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Memcpy(dst, src, len);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_memmove")]
|
|
private static partial void* _Memmove(void* dst, void* src, nuint len);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* Memmove(void* dst, void* src, nuint len)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Memmove(dst, src, len);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_memset")]
|
|
private static partial void* _Memset(void* dst, int c, nuint len);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* Memset(void* dst, int c, nuint len)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Memset(dst, c, len);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_memset4")]
|
|
private static partial void* _Memset4(void* dst, uint val, nuint dwords);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* Memset4(void* dst, uint val, nuint dwords)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Memset4(dst, val, dwords);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_memcmp")]
|
|
private static partial int _Memcmp(void* s1, void* s2, nuint len);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Memcmp(void* s1, void* s2, nuint len)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Memcmp(s1, s2, len);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strlen",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nuint _Strlen(string str);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nuint Strlen(string str)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strlen(str);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strnlen",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nuint _Strnlen(string str, nuint maxlen);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nuint Strnlen(string str, nuint maxlen)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strnlen(str, maxlen);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strlcpy",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nuint _Strlcpy(byte* dst, string src, nuint maxlen);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nuint Strlcpy(byte* dst, string src, nuint maxlen)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strlcpy(dst, src, maxlen);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_utf8strlcpy",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nuint _Utf8strlcpy(byte* dst, string src, nuint dst_bytes);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nuint Utf8strlcpy(byte* dst, string src, nuint dst_bytes)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Utf8strlcpy(dst, src, dst_bytes);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strlcat",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nuint _Strlcat(byte* dst, string src, nuint maxlen);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nuint Strlcat(byte* dst, string src, nuint maxlen)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strlcat(dst, src, maxlen);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strdup",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte* _Strdup(string str);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Strdup(string str)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strdup(str);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strndup",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte* _Strndup(string str, nuint maxlen);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Strndup(string str, nuint maxlen)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strndup(str, maxlen);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_strrev")]
|
|
private static partial byte* _Strrev(byte* str);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Strrev(byte* str)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strrev(str);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_strupr")]
|
|
private static partial byte* _Strupr(byte* str);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Strupr(byte* str)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strupr(str);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_strlwr")]
|
|
private static partial byte* _Strlwr(byte* str);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Strlwr(byte* str)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strlwr(str);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strchr",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte* _Strchr(string str, int c);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Strchr(string str, int c)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strchr(str, c);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strrchr",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte* _Strrchr(string str, int c);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Strrchr(string str, int c)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strrchr(str, c);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strstr",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte* _Strstr(string haystack, string needle);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Strstr(string haystack, string needle)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strstr(haystack, needle);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strnstr",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte* _Strnstr(string haystack, string needle, nuint maxlen);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Strnstr(string haystack, string needle, nuint maxlen)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strnstr(haystack, needle, maxlen);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strcasestr",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte* _Strcasestr(string haystack, string needle);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Strcasestr(string haystack, string needle)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strcasestr(haystack, needle);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strtok_r",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte* _StrtokR(byte* str, string delim, byte** saveptr);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* StrtokR(byte* str, string delim, byte** saveptr)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _StrtokR(str, delim, saveptr);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_utf8strlen",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nuint _Utf8strlen(string str);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nuint Utf8strlen(string str)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Utf8strlen(str);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_utf8strnlen",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nuint _Utf8strnlen(string str, nuint bytes);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nuint Utf8strnlen(string str, nuint bytes)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Utf8strnlen(str, bytes);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_itoa")]
|
|
private static partial byte* _Itoa(int value, byte* str, int radix);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Itoa(int value, byte* str, int radix)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Itoa(value, str, radix);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_uitoa")]
|
|
private static partial byte* _Uitoa(uint value, byte* str, int radix);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Uitoa(uint value, byte* str, int radix)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Uitoa(value, str, radix);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_lltoa")]
|
|
private static partial byte* _Lltoa(long value, byte* str, int radix);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Lltoa(long value, byte* str, int radix)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Lltoa(value, str, radix);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ulltoa")]
|
|
private static partial byte* _Ulltoa(ulong value, byte* str, int radix);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Ulltoa(ulong value, byte* str, int radix)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Ulltoa(value, str, radix);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_atoi",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial int _Atoi(string str);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Atoi(string str)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Atoi(str);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_atof",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial double _Atof(string str);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Atof(string str)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Atof(str);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strtoll",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial long _Strtoll(string str, byte** endp, int @base);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static long Strtoll(string str, byte** endp, int @base)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strtoll(str, endp, @base);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strtoull",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial ulong _Strtoull(string str, byte** endp, int @base);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ulong Strtoull(string str, byte** endp, int @base)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strtoull(str, endp, @base);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strtod",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial double _Strtod(string str, byte** endp);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Strtod(string str, byte** endp)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strtod(str, endp);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strcmp",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial int _Strcmp(string str1, string str2);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Strcmp(string str1, string str2)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strcmp(str1, str2);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strncmp",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial int _Strncmp(string str1, string str2, nuint maxlen);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Strncmp(string str1, string str2, nuint maxlen)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strncmp(str1, str2, maxlen);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strcasecmp",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial int _Strcasecmp(string str1, string str2);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Strcasecmp(string str1, string str2)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strcasecmp(str1, str2);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strncasecmp",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial int _Strncasecmp(string str1, string str2, nuint maxlen);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Strncasecmp(string str1, string str2, nuint maxlen)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strncasecmp(str1, str2, maxlen);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_strpbrk",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte* _Strpbrk(string str, string breakset);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* Strpbrk(string str, string breakset)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Strpbrk(str, breakset);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_StepUTF8")]
|
|
private static partial uint _StepUTF8(byte** pstr, nuint* pslen);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint StepUTF8(byte** pstr, nuint* pslen)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _StepUTF8(pstr, pslen);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_StepBackUTF8",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial uint _StepBackUTF8(string start, byte** pstr);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint StepBackUTF8(string start, byte** pstr)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _StepBackUTF8(start, pstr);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UCS4ToUTF8")]
|
|
private static partial byte* _UCS4ToUTF8(uint codepoint, byte* dst);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* UCS4ToUTF8(uint codepoint, byte* dst)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _UCS4ToUTF8(codepoint, dst);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_vsscanf",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial int _Vsscanf(string text, string fmt, byte* ap);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Vsscanf(string text, string fmt, byte* ap)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Vsscanf(text, fmt, ap);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_vsnprintf",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial int _Vsnprintf(byte* text, nuint maxlen, string fmt, byte* ap);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Vsnprintf(byte* text, nuint maxlen, string fmt, byte* ap)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Vsnprintf(text, maxlen, fmt, ap);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_vasprintf",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial int _Vasprintf(byte** strp, string fmt, byte* ap);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Vasprintf(byte** strp, string fmt, byte* ap)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Vasprintf(strp, fmt, ap);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_srand")]
|
|
private static partial void _Srand(ulong seed);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void Srand(ulong seed)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_Srand(seed);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_rand")]
|
|
private static partial int _Rand(int n);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Rand(int n)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Rand(n);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_randf")]
|
|
private static partial float _Randf();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Randf()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Randf();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_rand_bits")]
|
|
private static partial uint _RandBits();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint RandBits()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RandBits();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_rand_r")]
|
|
private static partial int _RandR(ulong* state, int n);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int RandR(ulong* state, int n)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RandR(state, n);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_randf_r")]
|
|
private static partial float _RandfR(ulong* state);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float RandfR(ulong* state)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RandfR(state);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_rand_bits_r")]
|
|
private static partial uint _RandBitsR(ulong* state);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint RandBitsR(ulong* state)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RandBitsR(state);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_acos")]
|
|
private static partial double _Acos(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Acos(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Acos(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_acosf")]
|
|
private static partial float _Acosf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Acosf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Acosf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_asin")]
|
|
private static partial double _Asin(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Asin(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Asin(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_asinf")]
|
|
private static partial float _Asinf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Asinf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Asinf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_atan")]
|
|
private static partial double _Atan(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Atan(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Atan(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_atanf")]
|
|
private static partial float _Atanf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Atanf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Atanf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_atan2")]
|
|
private static partial double _Atan2(double y, double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Atan2(double y, double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Atan2(y, x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_atan2f")]
|
|
private static partial float _Atan2f(float y, float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Atan2f(float y, float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Atan2f(y, x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ceil")]
|
|
private static partial double _Ceil(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Ceil(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Ceil(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ceilf")]
|
|
private static partial float _Ceilf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Ceilf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Ceilf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_copysign")]
|
|
private static partial double _Copysign(double x, double y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Copysign(double x, double y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Copysign(x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_copysignf")]
|
|
private static partial float _Copysignf(float x, float y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Copysignf(float x, float y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Copysignf(x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_cos")]
|
|
private static partial double _Cos(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Cos(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Cos(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_cosf")]
|
|
private static partial float _Cosf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Cosf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Cosf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_exp")]
|
|
private static partial double _Exp(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Exp(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Exp(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_expf")]
|
|
private static partial float _Expf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Expf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Expf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_fabs")]
|
|
private static partial double _Fabs(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Fabs(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Fabs(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_fabsf")]
|
|
private static partial float _Fabsf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Fabsf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Fabsf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_floor")]
|
|
private static partial double _Floor(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Floor(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Floor(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_floorf")]
|
|
private static partial float _Floorf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Floorf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Floorf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_trunc")]
|
|
private static partial double _Trunc(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Trunc(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Trunc(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_truncf")]
|
|
private static partial float _Truncf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Truncf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Truncf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_fmod")]
|
|
private static partial double _Fmod(double x, double y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Fmod(double x, double y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Fmod(x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_fmodf")]
|
|
private static partial float _Fmodf(float x, float y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Fmodf(float x, float y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Fmodf(x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isinf")]
|
|
private static partial int _Isinf(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isinf(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isinf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isinff")]
|
|
private static partial int _Isinff(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isinff(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isinff(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isnan")]
|
|
private static partial int _Isnan(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isnan(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isnan(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_isnanf")]
|
|
private static partial int _Isnanf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int Isnanf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Isnanf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_log")]
|
|
private static partial double _Log(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Log(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Log(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_logf")]
|
|
private static partial float _Logf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Logf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Logf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_log10")]
|
|
private static partial double _Log10(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Log10(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Log10(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_log10f")]
|
|
private static partial float _Log10f(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Log10f(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Log10f(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_modf")]
|
|
private static partial double _Modf(double x, double* y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Modf(double x, double* y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Modf(x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_modff")]
|
|
private static partial float _Modff(float x, float* y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Modff(float x, float* y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Modff(x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_pow")]
|
|
private static partial double _Pow(double x, double y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Pow(double x, double y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Pow(x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_powf")]
|
|
private static partial float _Powf(float x, float y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Powf(float x, float y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Powf(x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_round")]
|
|
private static partial double _Round(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Round(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Round(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_roundf")]
|
|
private static partial float _Roundf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Roundf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Roundf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_scalbn")]
|
|
private static partial double _Scalbn(double x, int n);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Scalbn(double x, int n)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Scalbn(x, n);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_scalbnf")]
|
|
private static partial float _Scalbnf(float x, int n);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Scalbnf(float x, int n)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Scalbnf(x, n);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_sin")]
|
|
private static partial double _Sin(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Sin(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Sin(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_sinf")]
|
|
private static partial float _Sinf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Sinf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Sinf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_sqrt")]
|
|
private static partial double _Sqrt(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Sqrt(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Sqrt(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_sqrtf")]
|
|
private static partial float _Sqrtf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Sqrtf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Sqrtf(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_tan")]
|
|
private static partial double _Tan(double x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static double Tan(double x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Tan(x);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_tanf")]
|
|
private static partial float _Tanf(float x);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float Tanf(float x)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Tanf(x);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_iconv_open",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nint _IconvOpen(string tocode, string fromcode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint IconvOpen(string tocode, string fromcode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IconvOpen(tocode, fromcode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_iconv_close")]
|
|
private static partial int _IconvClose(nint cd);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int IconvClose(nint cd)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IconvClose(cd);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_iconv")]
|
|
private static partial nuint _Iconv(
|
|
nint cd,
|
|
byte** inbuf,
|
|
nuint* inbytesleft,
|
|
byte** outbuf,
|
|
nuint* outbytesleft
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nuint Iconv(nint cd, byte** inbuf, nuint* inbytesleft, byte** outbuf, nuint* outbytesleft)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_iconv_string",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte* _IconvString(string tocode, string fromcode, string inbuf, nuint inbytesleft);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* IconvString(string tocode, string fromcode, string inbuf, nuint inbytesleft)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IconvString(tocode, fromcode, inbuf, inbytesleft);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_ReportAssertion",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlAssertState _ReportAssertion(
|
|
SdlAssertData* data,
|
|
string func,
|
|
string file,
|
|
int line
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlAssertState ReportAssertion(SdlAssertData* data, string func, string file, int line)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReportAssertion(data, func, file, line);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAssertionHandler")]
|
|
private static partial void _SetAssertionHandler(
|
|
delegate* unmanaged[Cdecl]<SdlAssertData*, void*, SdlAssertState> handler,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetAssertionHandler(
|
|
delegate* unmanaged[Cdecl]<SdlAssertData*, void*, SdlAssertState> handler,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetAssertionHandler(handler, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDefaultAssertionHandler")]
|
|
private static partial delegate* unmanaged[Cdecl]<
|
|
SdlAssertData*,
|
|
void*,
|
|
SdlAssertState> _GetDefaultAssertionHandler();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static delegate* unmanaged[Cdecl]<SdlAssertData*, void*, SdlAssertState> GetDefaultAssertionHandler()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDefaultAssertionHandler();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAssertionHandler")]
|
|
private static partial delegate* unmanaged[Cdecl]<
|
|
SdlAssertData*,
|
|
void*,
|
|
SdlAssertState> _GetAssertionHandler(void** puserdata);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static delegate* unmanaged[Cdecl]<SdlAssertData*, void*, SdlAssertState> GetAssertionHandler(
|
|
void** puserdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAssertionHandler(puserdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAssertionReport")]
|
|
private static partial SdlAssertData* _GetAssertionReport();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlAssertData* GetAssertionReport()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAssertionReport();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ResetAssertionReport")]
|
|
private static partial void _ResetAssertionReport();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ResetAssertionReport()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ResetAssertionReport();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_AsyncIOFromFile",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nint _AsyncIOFromFile(string file, string mode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint AsyncIOFromFile(string file, string mode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AsyncIOFromFile(file, mode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAsyncIOSize")]
|
|
private static partial long _GetAsyncIOSize(nint asyncio);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static long GetAsyncIOSize(nint asyncio)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAsyncIOSize(asyncio);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadAsyncIO")]
|
|
private static partial byte _ReadAsyncIO(
|
|
nint asyncio,
|
|
void* ptr,
|
|
ulong offset,
|
|
ulong size,
|
|
nint queue,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadAsyncIO(
|
|
nint asyncio,
|
|
void* ptr,
|
|
ulong offset,
|
|
ulong size,
|
|
nint queue,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadAsyncIO(asyncio, ptr, offset, size, queue, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteAsyncIO")]
|
|
private static partial byte _WriteAsyncIO(
|
|
nint asyncio,
|
|
void* ptr,
|
|
ulong offset,
|
|
ulong size,
|
|
nint queue,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteAsyncIO(
|
|
nint asyncio,
|
|
void* ptr,
|
|
ulong offset,
|
|
ulong size,
|
|
nint queue,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteAsyncIO(asyncio, ptr, offset, size, queue, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CloseAsyncIO")]
|
|
private static partial byte _CloseAsyncIO(nint asyncio, byte flush, nint queue, void* userdata);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CloseAsyncIO(nint asyncio, byte flush, nint queue, void* userdata)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CloseAsyncIO(asyncio, flush, queue, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateAsyncIOQueue")]
|
|
private static partial nint _CreateAsyncIOQueue();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateAsyncIOQueue()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateAsyncIOQueue();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyAsyncIOQueue")]
|
|
private static partial void _DestroyAsyncIOQueue(nint queue);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyAsyncIOQueue(nint queue)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyAsyncIOQueue(queue);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAsyncIOResult")]
|
|
private static partial byte _GetAsyncIOResult(nint queue, SdlAsyncIOOutcome* outcome);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetAsyncIOResult(nint queue, SdlAsyncIOOutcome* outcome)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAsyncIOResult(queue, outcome);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitAsyncIOResult")]
|
|
private static partial byte _WaitAsyncIOResult(nint queue, SdlAsyncIOOutcome* outcome, int timeoutMS);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WaitAsyncIOResult(nint queue, SdlAsyncIOOutcome* outcome, int timeoutMS)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WaitAsyncIOResult(queue, outcome, timeoutMS);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SignalAsyncIOQueue")]
|
|
private static partial void _SignalAsyncIOQueue(nint queue);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SignalAsyncIOQueue(nint queue)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SignalAsyncIOQueue(queue);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_LoadFileAsync",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _LoadFileAsync(string file, nint queue, void* userdata);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte LoadFileAsync(string file, nint queue, void* userdata)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadFileAsync(file, queue, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_TryLockSpinlock")]
|
|
private static partial byte _TryLockSpinlock(int* @lock);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte TryLockSpinlock(int* @lock)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _TryLockSpinlock(@lock);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LockSpinlock")]
|
|
private static partial void _LockSpinlock(int* @lock);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void LockSpinlock(int* @lock)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_LockSpinlock(@lock);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UnlockSpinlock")]
|
|
private static partial void _UnlockSpinlock(int* @lock);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UnlockSpinlock(int* @lock)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UnlockSpinlock(@lock);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_MemoryBarrierReleaseFunction")]
|
|
private static partial void _MemoryBarrierReleaseFunction();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void MemoryBarrierReleaseFunction()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_MemoryBarrierReleaseFunction();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_MemoryBarrierAcquireFunction")]
|
|
private static partial void _MemoryBarrierAcquireFunction();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void MemoryBarrierAcquireFunction()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_MemoryBarrierAcquireFunction();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CompareAndSwapAtomicInt")]
|
|
private static partial byte _CompareAndSwapAtomicInt(SdlAtomicInt* a, int oldval, int newval);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CompareAndSwapAtomicInt(SdlAtomicInt* a, int oldval, int newval)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CompareAndSwapAtomicInt(a, oldval, newval);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAtomicInt")]
|
|
private static partial int _SetAtomicInt(SdlAtomicInt* a, int v);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int SetAtomicInt(SdlAtomicInt* a, int v)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAtomicInt(a, v);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAtomicInt")]
|
|
private static partial int _GetAtomicInt(SdlAtomicInt* a);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetAtomicInt(SdlAtomicInt* a)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAtomicInt(a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AddAtomicInt")]
|
|
private static partial int _AddAtomicInt(SdlAtomicInt* a, int v);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int AddAtomicInt(SdlAtomicInt* a, int v)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AddAtomicInt(a, v);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CompareAndSwapAtomicU32")]
|
|
private static partial byte _CompareAndSwapAtomicU32(SdlAtomicU32* a, uint oldval, uint newval);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CompareAndSwapAtomicU32(SdlAtomicU32* a, uint oldval, uint newval)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CompareAndSwapAtomicU32(a, oldval, newval);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAtomicU32")]
|
|
private static partial uint _SetAtomicU32(SdlAtomicU32* a, uint v);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint SetAtomicU32(SdlAtomicU32* a, uint v)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAtomicU32(a, v);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAtomicU32")]
|
|
private static partial uint _GetAtomicU32(SdlAtomicU32* a);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetAtomicU32(SdlAtomicU32* a)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAtomicU32(a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AddAtomicU32")]
|
|
private static partial uint _AddAtomicU32(SdlAtomicU32* a, int v);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint AddAtomicU32(SdlAtomicU32* a, int v)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AddAtomicU32(a, v);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CompareAndSwapAtomicPointer")]
|
|
private static partial byte _CompareAndSwapAtomicPointer(void** a, void* oldval, void* newval);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CompareAndSwapAtomicPointer(void** a, void* oldval, void* newval)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CompareAndSwapAtomicPointer(a, oldval, newval);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAtomicPointer")]
|
|
private static partial void* _SetAtomicPointer(void** a, void* v);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* SetAtomicPointer(void** a, void* v)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAtomicPointer(a, v);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAtomicPointer")]
|
|
private static partial void* _GetAtomicPointer(void** a);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* GetAtomicPointer(void** a)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAtomicPointer(a);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetErrorV",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetErrorV(string fmt, byte* ap);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetErrorV(string fmt, byte* ap)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetErrorV(fmt, ap);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OutOfMemory")]
|
|
private static partial byte _OutOfMemory();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte OutOfMemory()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OutOfMemory();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetError",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetError();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetError()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetError();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ClearError")]
|
|
private static partial byte _ClearError();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ClearError()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ClearError();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGlobalProperties")]
|
|
private static partial uint _GetGlobalProperties();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetGlobalProperties()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGlobalProperties();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateProperties")]
|
|
private static partial uint _CreateProperties();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint CreateProperties()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateProperties();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CopyProperties")]
|
|
private static partial byte _CopyProperties(uint src, uint dst);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CopyProperties(uint src, uint dst)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CopyProperties(src, dst);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LockProperties")]
|
|
private static partial byte _LockProperties(uint props);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte LockProperties(uint props)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LockProperties(props);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UnlockProperties")]
|
|
private static partial void _UnlockProperties(uint props);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UnlockProperties(uint props)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UnlockProperties(props);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetPointerPropertyWithCleanup",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetPointerPropertyWithCleanup(
|
|
uint props,
|
|
string name,
|
|
void* value,
|
|
delegate* unmanaged[Cdecl]<void*, void*, void> cleanup,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetPointerPropertyWithCleanup(
|
|
uint props,
|
|
string name,
|
|
void* value,
|
|
delegate* unmanaged[Cdecl]<void*, void*, void> cleanup,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetPointerPropertyWithCleanup(props, name, value, cleanup, userdata);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetPointerProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetPointerProperty(uint props, string name, void* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetPointerProperty(uint props, string name, void* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetPointerProperty(props, name, value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetStringProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetStringProperty(uint props, string name, string value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetStringProperty(uint props, string name, string value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetStringProperty(props, name, value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetNumberProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetNumberProperty(uint props, string name, long value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetNumberProperty(uint props, string name, long value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetNumberProperty(props, name, value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetFloatProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetFloatProperty(uint props, string name, float value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetFloatProperty(uint props, string name, float value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetFloatProperty(props, name, value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetBooleanProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetBooleanProperty(uint props, string name, byte value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetBooleanProperty(uint props, string name, byte value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetBooleanProperty(props, name, value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_HasProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _HasProperty(uint props, string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasProperty(uint props, string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasProperty(props, name);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetPropertyType",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlPropertyType _GetPropertyType(uint props, string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPropertyType GetPropertyType(uint props, string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPropertyType(props, name);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetPointerProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void* _GetPointerProperty(uint props, string name, void* default_value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* GetPointerProperty(uint props, string name, void* default_value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPointerProperty(props, name, default_value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetStringProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetStringProperty(uint props, string name, string default_value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetStringProperty(uint props, string name, string default_value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetStringProperty(props, name, default_value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetNumberProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial long _GetNumberProperty(uint props, string name, long default_value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static long GetNumberProperty(uint props, string name, long default_value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumberProperty(props, name, default_value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetFloatProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial float _GetFloatProperty(uint props, string name, float default_value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float GetFloatProperty(uint props, string name, float default_value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetFloatProperty(props, name, default_value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetBooleanProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _GetBooleanProperty(uint props, string name, byte default_value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetBooleanProperty(uint props, string name, byte default_value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetBooleanProperty(props, name, default_value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_ClearProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _ClearProperty(uint props, string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ClearProperty(uint props, string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ClearProperty(props, name);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_EnumerateProperties")]
|
|
private static partial byte _EnumerateProperties(
|
|
uint props,
|
|
delegate* unmanaged[Cdecl]<void*, uint, byte*, void> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte EnumerateProperties(
|
|
uint props,
|
|
delegate* unmanaged[Cdecl]<void*, uint, byte*, void> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _EnumerateProperties(props, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyProperties")]
|
|
private static partial void _DestroyProperties(uint props);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyProperties(uint props)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyProperties(props);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_CreateThreadRuntime",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nint _CreateThreadRuntime(
|
|
delegate* unmanaged[Cdecl]<void*, int> fn,
|
|
string name,
|
|
void* data,
|
|
delegate* unmanaged[Cdecl]<void> pfnBeginThread,
|
|
delegate* unmanaged[Cdecl]<void> pfnEndThread
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateThreadRuntime(
|
|
delegate* unmanaged[Cdecl]<void*, int> fn,
|
|
string name,
|
|
void* data,
|
|
delegate* unmanaged[Cdecl]<void> pfnBeginThread,
|
|
delegate* unmanaged[Cdecl]<void> pfnEndThread
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateThreadRuntime(fn, name, data, pfnBeginThread, pfnEndThread);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateThreadWithPropertiesRuntime")]
|
|
private static partial nint _CreateThreadWithPropertiesRuntime(
|
|
uint props,
|
|
delegate* unmanaged[Cdecl]<void> pfnBeginThread,
|
|
delegate* unmanaged[Cdecl]<void> pfnEndThread
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateThreadWithPropertiesRuntime(
|
|
uint props,
|
|
delegate* unmanaged[Cdecl]<void> pfnBeginThread,
|
|
delegate* unmanaged[Cdecl]<void> pfnEndThread
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateThreadWithPropertiesRuntime(props, pfnBeginThread, pfnEndThread);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetThreadName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetThreadName(nint thread);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetThreadName(nint thread)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetThreadName(thread);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCurrentThreadID")]
|
|
private static partial ulong _GetCurrentThreadID();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ulong GetCurrentThreadID()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCurrentThreadID();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetThreadID")]
|
|
private static partial ulong _GetThreadID(nint thread);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ulong GetThreadID(nint thread)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetThreadID(thread);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetCurrentThreadPriority")]
|
|
private static partial byte _SetCurrentThreadPriority(SdlThreadPriority priority);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetCurrentThreadPriority(SdlThreadPriority priority)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetCurrentThreadPriority(priority);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitThread")]
|
|
private static partial void _WaitThread(nint thread, int* status);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void WaitThread(nint thread, int* status)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_WaitThread(thread, status);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetThreadState")]
|
|
private static partial SdlThreadState _GetThreadState(nint thread);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlThreadState GetThreadState(nint thread)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetThreadState(thread);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DetachThread")]
|
|
private static partial void _DetachThread(nint thread);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DetachThread(nint thread)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DetachThread(thread);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTLS")]
|
|
private static partial void* _GetTLS(SdlAtomicInt* id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* GetTLS(SdlAtomicInt* id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTLS(id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTLS")]
|
|
private static partial byte _SetTLS(
|
|
SdlAtomicInt* id,
|
|
void* value,
|
|
delegate* unmanaged[Cdecl]<void*, void> destructor
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetTLS(SdlAtomicInt* id, void* value, delegate* unmanaged[Cdecl]<void*, void> destructor)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetTLS(id, value, destructor);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CleanupTLS")]
|
|
private static partial void _CleanupTLS();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void CleanupTLS()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_CleanupTLS();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateMutex")]
|
|
private static partial nint _CreateMutex();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateMutex()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateMutex();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LockMutex")]
|
|
private static partial void _LockMutex(nint mutex);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void LockMutex(nint mutex)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_LockMutex(mutex);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_TryLockMutex")]
|
|
private static partial byte _TryLockMutex(nint mutex);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte TryLockMutex(nint mutex)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _TryLockMutex(mutex);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UnlockMutex")]
|
|
private static partial void _UnlockMutex(nint mutex);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UnlockMutex(nint mutex)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UnlockMutex(mutex);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyMutex")]
|
|
private static partial void _DestroyMutex(nint mutex);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyMutex(nint mutex)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyMutex(mutex);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateRWLock")]
|
|
private static partial nint _CreateRWLock();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateRWLock()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateRWLock();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LockRWLockForReading")]
|
|
private static partial void _LockRWLockForReading(nint rwlock);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void LockRWLockForReading(nint rwlock)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_LockRWLockForReading(rwlock);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LockRWLockForWriting")]
|
|
private static partial void _LockRWLockForWriting(nint rwlock);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void LockRWLockForWriting(nint rwlock)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_LockRWLockForWriting(rwlock);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_TryLockRWLockForReading")]
|
|
private static partial byte _TryLockRWLockForReading(nint rwlock);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte TryLockRWLockForReading(nint rwlock)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _TryLockRWLockForReading(rwlock);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_TryLockRWLockForWriting")]
|
|
private static partial byte _TryLockRWLockForWriting(nint rwlock);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte TryLockRWLockForWriting(nint rwlock)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _TryLockRWLockForWriting(rwlock);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UnlockRWLock")]
|
|
private static partial void _UnlockRWLock(nint rwlock);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UnlockRWLock(nint rwlock)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UnlockRWLock(rwlock);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyRWLock")]
|
|
private static partial void _DestroyRWLock(nint rwlock);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyRWLock(nint rwlock)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyRWLock(rwlock);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateSemaphore")]
|
|
private static partial nint _CreateSemaphore(uint initial_value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateSemaphore(uint initial_value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateSemaphore(initial_value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroySemaphore")]
|
|
private static partial void _DestroySemaphore(nint sem);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroySemaphore(nint sem)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroySemaphore(sem);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitSemaphore")]
|
|
private static partial void _WaitSemaphore(nint sem);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void WaitSemaphore(nint sem)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_WaitSemaphore(sem);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_TryWaitSemaphore")]
|
|
private static partial byte _TryWaitSemaphore(nint sem);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte TryWaitSemaphore(nint sem)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _TryWaitSemaphore(sem);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitSemaphoreTimeout")]
|
|
private static partial byte _WaitSemaphoreTimeout(nint sem, int timeoutMS);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WaitSemaphoreTimeout(nint sem, int timeoutMS)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WaitSemaphoreTimeout(sem, timeoutMS);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SignalSemaphore")]
|
|
private static partial void _SignalSemaphore(nint sem);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SignalSemaphore(nint sem)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SignalSemaphore(sem);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSemaphoreValue")]
|
|
private static partial uint _GetSemaphoreValue(nint sem);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetSemaphoreValue(nint sem)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSemaphoreValue(sem);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateCondition")]
|
|
private static partial nint _CreateCondition();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateCondition()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateCondition();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyCondition")]
|
|
private static partial void _DestroyCondition(nint cond);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyCondition(nint cond)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyCondition(cond);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SignalCondition")]
|
|
private static partial void _SignalCondition(nint cond);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SignalCondition(nint cond)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SignalCondition(cond);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BroadcastCondition")]
|
|
private static partial void _BroadcastCondition(nint cond);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BroadcastCondition(nint cond)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BroadcastCondition(cond);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitCondition")]
|
|
private static partial void _WaitCondition(nint cond, nint mutex);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void WaitCondition(nint cond, nint mutex)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_WaitCondition(cond, mutex);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitConditionTimeout")]
|
|
private static partial byte _WaitConditionTimeout(nint cond, nint mutex, int timeoutMS);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WaitConditionTimeout(nint cond, nint mutex, int timeoutMS)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WaitConditionTimeout(cond, mutex, timeoutMS);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ShouldInit")]
|
|
private static partial byte _ShouldInit(SdlInitState* state);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ShouldInit(SdlInitState* state)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ShouldInit(state);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ShouldQuit")]
|
|
private static partial byte _ShouldQuit(SdlInitState* state);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ShouldQuit(SdlInitState* state)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ShouldQuit(state);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetInitialized")]
|
|
private static partial void _SetInitialized(SdlInitState* state, byte initialized);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetInitialized(SdlInitState* state, byte initialized)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetInitialized(state, initialized);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_IOFromFile",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nint _IOFromFile(string file, string mode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint IOFromFile(string file, string mode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IOFromFile(file, mode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_IOFromMem")]
|
|
private static partial nint _IOFromMem(void* mem, nuint size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint IOFromMem(void* mem, nuint size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IOFromMem(mem, size);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_IOFromConstMem")]
|
|
private static partial nint _IOFromConstMem(void* mem, nuint size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint IOFromConstMem(void* mem, nuint size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IOFromConstMem(mem, size);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_IOFromDynamicMem")]
|
|
private static partial nint _IOFromDynamicMem();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint IOFromDynamicMem()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IOFromDynamicMem();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OpenIO")]
|
|
private static partial nint _OpenIO(SdlIOStreamInterface* iface, void* userdata);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint OpenIO(SdlIOStreamInterface* iface, void* userdata)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenIO(iface, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CloseIO")]
|
|
private static partial byte _CloseIO(nint context);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CloseIO(nint context)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CloseIO(context);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetIOProperties")]
|
|
private static partial uint _GetIOProperties(nint context);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetIOProperties(nint context)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetIOProperties(context);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetIOStatus")]
|
|
private static partial SdlIOStatus _GetIOStatus(nint context);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlIOStatus GetIOStatus(nint context)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetIOStatus(context);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetIOSize")]
|
|
private static partial long _GetIOSize(nint context);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static long GetIOSize(nint context)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetIOSize(context);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SeekIO")]
|
|
private static partial long _SeekIO(nint context, long offset, SdlIOWhence whence);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static long SeekIO(nint context, long offset, SdlIOWhence whence)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SeekIO(context, offset, whence);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_TellIO")]
|
|
private static partial long _TellIO(nint context);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static long TellIO(nint context)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _TellIO(context);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadIO")]
|
|
private static partial nuint _ReadIO(nint context, void* ptr, nuint size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nuint ReadIO(nint context, void* ptr, nuint size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadIO(context, ptr, size);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteIO")]
|
|
private static partial nuint _WriteIO(nint context, void* ptr, nuint size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nuint WriteIO(nint context, void* ptr, nuint size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteIO(context, ptr, size);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_IOvprintf",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nuint _IOvprintf(nint context, string fmt, byte* ap);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nuint IOvprintf(nint context, string fmt, byte* ap)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IOvprintf(context, fmt, ap);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_FlushIO")]
|
|
private static partial byte _FlushIO(nint context);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte FlushIO(nint context)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _FlushIO(context);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LoadFile_IO")]
|
|
private static partial void* _LoadFileIO(nint src, nuint* datasize, byte closeio);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* LoadFileIO(nint src, nuint* datasize, byte closeio)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadFileIO(src, datasize, closeio);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_LoadFile",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void* _LoadFile(string file, nuint* datasize);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* LoadFile(string file, nuint* datasize)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadFile(file, datasize);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SaveFile_IO")]
|
|
private static partial byte _SaveFileIO(nint src, void* data, nuint datasize, byte closeio);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SaveFileIO(nint src, void* data, nuint datasize, byte closeio)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SaveFileIO(src, data, datasize, closeio);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SaveFile",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SaveFile(string file, void* data, nuint datasize);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SaveFile(string file, void* data, nuint datasize)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SaveFile(file, data, datasize);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadU8")]
|
|
private static partial byte _ReadU8(nint src, byte* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadU8(nint src, byte* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadU8(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadS8")]
|
|
private static partial byte _ReadS8(nint src, sbyte* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadS8(nint src, sbyte* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadS8(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadU16LE")]
|
|
private static partial byte _ReadU16LE(nint src, ushort* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadU16LE(nint src, ushort* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadU16LE(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadS16LE")]
|
|
private static partial byte _ReadS16LE(nint src, short* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadS16LE(nint src, short* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadS16LE(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadU16BE")]
|
|
private static partial byte _ReadU16BE(nint src, ushort* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadU16BE(nint src, ushort* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadU16BE(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadS16BE")]
|
|
private static partial byte _ReadS16BE(nint src, short* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadS16BE(nint src, short* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadS16BE(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadU32LE")]
|
|
private static partial byte _ReadU32LE(nint src, uint* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadU32LE(nint src, uint* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadU32LE(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadS32LE")]
|
|
private static partial byte _ReadS32LE(nint src, int* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadS32LE(nint src, int* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadS32LE(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadU32BE")]
|
|
private static partial byte _ReadU32BE(nint src, uint* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadU32BE(nint src, uint* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadU32BE(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadS32BE")]
|
|
private static partial byte _ReadS32BE(nint src, int* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadS32BE(nint src, int* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadS32BE(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadU64LE")]
|
|
private static partial byte _ReadU64LE(nint src, ulong* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadU64LE(nint src, ulong* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadU64LE(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadS64LE")]
|
|
private static partial byte _ReadS64LE(nint src, long* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadS64LE(nint src, long* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadS64LE(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadU64BE")]
|
|
private static partial byte _ReadU64BE(nint src, ulong* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadU64BE(nint src, ulong* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadU64BE(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadS64BE")]
|
|
private static partial byte _ReadS64BE(nint src, long* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadS64BE(nint src, long* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadS64BE(src, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteU8")]
|
|
private static partial byte _WriteU8(nint dst, byte value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteU8(nint dst, byte value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteU8(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteS8")]
|
|
private static partial byte _WriteS8(nint dst, sbyte value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteS8(nint dst, sbyte value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteS8(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteU16LE")]
|
|
private static partial byte _WriteU16LE(nint dst, ushort value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteU16LE(nint dst, ushort value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteU16LE(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteS16LE")]
|
|
private static partial byte _WriteS16LE(nint dst, short value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteS16LE(nint dst, short value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteS16LE(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteU16BE")]
|
|
private static partial byte _WriteU16BE(nint dst, ushort value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteU16BE(nint dst, ushort value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteU16BE(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteS16BE")]
|
|
private static partial byte _WriteS16BE(nint dst, short value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteS16BE(nint dst, short value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteS16BE(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteU32LE")]
|
|
private static partial byte _WriteU32LE(nint dst, uint value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteU32LE(nint dst, uint value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteU32LE(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteS32LE")]
|
|
private static partial byte _WriteS32LE(nint dst, int value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteS32LE(nint dst, int value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteS32LE(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteU32BE")]
|
|
private static partial byte _WriteU32BE(nint dst, uint value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteU32BE(nint dst, uint value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteU32BE(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteS32BE")]
|
|
private static partial byte _WriteS32BE(nint dst, int value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteS32BE(nint dst, int value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteS32BE(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteU64LE")]
|
|
private static partial byte _WriteU64LE(nint dst, ulong value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteU64LE(nint dst, ulong value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteU64LE(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteS64LE")]
|
|
private static partial byte _WriteS64LE(nint dst, long value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteS64LE(nint dst, long value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteS64LE(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteU64BE")]
|
|
private static partial byte _WriteU64BE(nint dst, ulong value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteU64BE(nint dst, ulong value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteU64BE(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteS64BE")]
|
|
private static partial byte _WriteS64BE(nint dst, long value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteS64BE(nint dst, long value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteS64BE(dst, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumAudioDrivers")]
|
|
private static partial int _GetNumAudioDrivers();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumAudioDrivers()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumAudioDrivers();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetAudioDriver",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetAudioDriver(int index);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetAudioDriver(int index)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioDriver(index);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetCurrentAudioDriver",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetCurrentAudioDriver();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetCurrentAudioDriver()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCurrentAudioDriver();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioPlaybackDevices")]
|
|
private static partial uint* _GetAudioPlaybackDevices(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint* GetAudioPlaybackDevices(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioPlaybackDevices(count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioRecordingDevices")]
|
|
private static partial uint* _GetAudioRecordingDevices(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint* GetAudioRecordingDevices(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioRecordingDevices(count);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetAudioDeviceName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetAudioDeviceName(uint devid);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetAudioDeviceName(uint devid)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioDeviceName(devid);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioDeviceFormat")]
|
|
private static partial byte _GetAudioDeviceFormat(uint devid, SdlAudioSpec* spec, int* sample_frames);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetAudioDeviceFormat(uint devid, SdlAudioSpec* spec, int* sample_frames)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioDeviceFormat(devid, spec, sample_frames);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioDeviceChannelMap")]
|
|
private static partial int* _GetAudioDeviceChannelMap(uint devid, int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int* GetAudioDeviceChannelMap(uint devid, int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioDeviceChannelMap(devid, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OpenAudioDevice")]
|
|
private static partial uint _OpenAudioDevice(uint devid, SdlAudioSpec* spec);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint OpenAudioDevice(uint devid, SdlAudioSpec* spec)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenAudioDevice(devid, spec);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_IsAudioDevicePhysical")]
|
|
private static partial byte _IsAudioDevicePhysical(uint devid);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte IsAudioDevicePhysical(uint devid)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IsAudioDevicePhysical(devid);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_IsAudioDevicePlayback")]
|
|
private static partial byte _IsAudioDevicePlayback(uint devid);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte IsAudioDevicePlayback(uint devid)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IsAudioDevicePlayback(devid);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PauseAudioDevice")]
|
|
private static partial byte _PauseAudioDevice(uint devid);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte PauseAudioDevice(uint devid)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _PauseAudioDevice(devid);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ResumeAudioDevice")]
|
|
private static partial byte _ResumeAudioDevice(uint devid);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ResumeAudioDevice(uint devid)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ResumeAudioDevice(devid);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AudioDevicePaused")]
|
|
private static partial byte _AudioDevicePaused(uint devid);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte AudioDevicePaused(uint devid)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AudioDevicePaused(devid);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioDeviceGain")]
|
|
private static partial float _GetAudioDeviceGain(uint devid);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float GetAudioDeviceGain(uint devid)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioDeviceGain(devid);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAudioDeviceGain")]
|
|
private static partial byte _SetAudioDeviceGain(uint devid, float gain);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetAudioDeviceGain(uint devid, float gain)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAudioDeviceGain(devid, gain);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CloseAudioDevice")]
|
|
private static partial void _CloseAudioDevice(uint devid);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void CloseAudioDevice(uint devid)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_CloseAudioDevice(devid);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindAudioStreams")]
|
|
private static partial byte _BindAudioStreams(uint devid, SdlAudioStream* streams, int num_streams);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte BindAudioStreams(uint devid, SdlAudioStream* streams, int num_streams)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BindAudioStreams(devid, streams, num_streams);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindAudioStream")]
|
|
private static partial byte _BindAudioStream(uint devid, SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte BindAudioStream(uint devid, SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BindAudioStream(devid, stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UnbindAudioStreams")]
|
|
private static partial void _UnbindAudioStreams(SdlAudioStream* streams, int num_streams);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UnbindAudioStreams(SdlAudioStream* streams, int num_streams)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UnbindAudioStreams(streams, num_streams);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UnbindAudioStream")]
|
|
private static partial void _UnbindAudioStream(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UnbindAudioStream(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UnbindAudioStream(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamDevice")]
|
|
private static partial uint _GetAudioStreamDevice(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetAudioStreamDevice(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioStreamDevice(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateAudioStream")]
|
|
private static partial SdlAudioStream _CreateAudioStream(SdlAudioSpec* src_spec, SdlAudioSpec* dst_spec);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlAudioStream CreateAudioStream(SdlAudioSpec* src_spec, SdlAudioSpec* dst_spec)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateAudioStream(src_spec, dst_spec);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamProperties")]
|
|
private static partial uint _GetAudioStreamProperties(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetAudioStreamProperties(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioStreamProperties(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamFormat")]
|
|
private static partial byte _GetAudioStreamFormat(
|
|
SdlAudioStream stream,
|
|
SdlAudioSpec* src_spec,
|
|
SdlAudioSpec* dst_spec
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetAudioStreamFormat(
|
|
SdlAudioStream stream,
|
|
SdlAudioSpec* src_spec,
|
|
SdlAudioSpec* dst_spec
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioStreamFormat(stream, src_spec, dst_spec);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamFormat")]
|
|
private static partial byte _SetAudioStreamFormat(
|
|
SdlAudioStream stream,
|
|
SdlAudioSpec* src_spec,
|
|
SdlAudioSpec* dst_spec
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetAudioStreamFormat(
|
|
SdlAudioStream stream,
|
|
SdlAudioSpec* src_spec,
|
|
SdlAudioSpec* dst_spec
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAudioStreamFormat(stream, src_spec, dst_spec);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamFrequencyRatio")]
|
|
private static partial float _GetAudioStreamFrequencyRatio(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float GetAudioStreamFrequencyRatio(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioStreamFrequencyRatio(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamFrequencyRatio")]
|
|
private static partial byte _SetAudioStreamFrequencyRatio(SdlAudioStream stream, float ratio);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetAudioStreamFrequencyRatio(SdlAudioStream stream, float ratio)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAudioStreamFrequencyRatio(stream, ratio);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamGain")]
|
|
private static partial float _GetAudioStreamGain(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float GetAudioStreamGain(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioStreamGain(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamGain")]
|
|
private static partial byte _SetAudioStreamGain(SdlAudioStream stream, float gain);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetAudioStreamGain(SdlAudioStream stream, float gain)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAudioStreamGain(stream, gain);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamInputChannelMap")]
|
|
private static partial int* _GetAudioStreamInputChannelMap(SdlAudioStream stream, int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int* GetAudioStreamInputChannelMap(SdlAudioStream stream, int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioStreamInputChannelMap(stream, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamOutputChannelMap")]
|
|
private static partial int* _GetAudioStreamOutputChannelMap(SdlAudioStream stream, int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int* GetAudioStreamOutputChannelMap(SdlAudioStream stream, int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioStreamOutputChannelMap(stream, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamInputChannelMap")]
|
|
private static partial byte _SetAudioStreamInputChannelMap(SdlAudioStream stream, int* chmap, int count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetAudioStreamInputChannelMap(SdlAudioStream stream, int* chmap, int count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAudioStreamInputChannelMap(stream, chmap, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamOutputChannelMap")]
|
|
private static partial byte _SetAudioStreamOutputChannelMap(SdlAudioStream stream, int* chmap, int count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetAudioStreamOutputChannelMap(SdlAudioStream stream, int* chmap, int count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAudioStreamOutputChannelMap(stream, chmap, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PutAudioStreamData")]
|
|
private static partial byte _PutAudioStreamData(SdlAudioStream stream, void* buf, int len);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte PutAudioStreamData(SdlAudioStream stream, void* buf, int len)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _PutAudioStreamData(stream, buf, len);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PutAudioStreamDataNoCopy")]
|
|
private static partial byte _PutAudioStreamDataNoCopy(
|
|
SdlAudioStream stream,
|
|
void* buf,
|
|
int len,
|
|
delegate* unmanaged[Cdecl]<void*, void*, int, void> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte PutAudioStreamDataNoCopy(
|
|
SdlAudioStream stream,
|
|
void* buf,
|
|
int len,
|
|
delegate* unmanaged[Cdecl]<void*, void*, int, void> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _PutAudioStreamDataNoCopy(stream, buf, len, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PutAudioStreamPlanarData")]
|
|
private static partial byte _PutAudioStreamPlanarData(
|
|
SdlAudioStream stream,
|
|
void** channel_buffers,
|
|
int num_channels,
|
|
int num_samples
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte PutAudioStreamPlanarData(
|
|
SdlAudioStream stream,
|
|
void** channel_buffers,
|
|
int num_channels,
|
|
int num_samples
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _PutAudioStreamPlanarData(stream, channel_buffers, num_channels, num_samples);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamData")]
|
|
private static partial int _GetAudioStreamData(SdlAudioStream stream, void* buf, int len);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetAudioStreamData(SdlAudioStream stream, void* buf, int len)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioStreamData(stream, buf, len);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamAvailable")]
|
|
private static partial int _GetAudioStreamAvailable(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetAudioStreamAvailable(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioStreamAvailable(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamQueued")]
|
|
private static partial int _GetAudioStreamQueued(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetAudioStreamQueued(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioStreamQueued(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_FlushAudioStream")]
|
|
private static partial byte _FlushAudioStream(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte FlushAudioStream(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _FlushAudioStream(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ClearAudioStream")]
|
|
private static partial byte _ClearAudioStream(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ClearAudioStream(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ClearAudioStream(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PauseAudioStreamDevice")]
|
|
private static partial byte _PauseAudioStreamDevice(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte PauseAudioStreamDevice(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _PauseAudioStreamDevice(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ResumeAudioStreamDevice")]
|
|
private static partial byte _ResumeAudioStreamDevice(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ResumeAudioStreamDevice(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ResumeAudioStreamDevice(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AudioStreamDevicePaused")]
|
|
private static partial byte _AudioStreamDevicePaused(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte AudioStreamDevicePaused(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AudioStreamDevicePaused(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LockAudioStream")]
|
|
private static partial byte _LockAudioStream(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte LockAudioStream(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LockAudioStream(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UnlockAudioStream")]
|
|
private static partial byte _UnlockAudioStream(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte UnlockAudioStream(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _UnlockAudioStream(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamGetCallback")]
|
|
private static partial byte _SetAudioStreamGetCallback(
|
|
SdlAudioStream stream,
|
|
delegate* unmanaged[Cdecl]<void*, SdlAudioStream, int, int, void> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetAudioStreamGetCallback(
|
|
SdlAudioStream stream,
|
|
delegate* unmanaged[Cdecl]<void*, SdlAudioStream, int, int, void> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAudioStreamGetCallback(stream, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamPutCallback")]
|
|
private static partial byte _SetAudioStreamPutCallback(
|
|
SdlAudioStream stream,
|
|
delegate* unmanaged[Cdecl]<void*, SdlAudioStream, int, int, void> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetAudioStreamPutCallback(
|
|
SdlAudioStream stream,
|
|
delegate* unmanaged[Cdecl]<void*, SdlAudioStream, int, int, void> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAudioStreamPutCallback(stream, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyAudioStream")]
|
|
private static partial void _DestroyAudioStream(SdlAudioStream stream);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyAudioStream(SdlAudioStream stream)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyAudioStream(stream);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OpenAudioDeviceStream")]
|
|
private static partial SdlAudioStream _OpenAudioDeviceStream(
|
|
uint devid,
|
|
SdlAudioSpec* spec,
|
|
delegate* unmanaged[Cdecl]<void*, SdlAudioStream, int, int, void> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlAudioStream OpenAudioDeviceStream(
|
|
uint devid,
|
|
SdlAudioSpec* spec,
|
|
delegate* unmanaged[Cdecl]<void*, SdlAudioStream, int, int, void> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenAudioDeviceStream(devid, spec, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetAudioPostmixCallback")]
|
|
private static partial byte _SetAudioPostmixCallback(
|
|
uint devid,
|
|
delegate* unmanaged[Cdecl]<void*, SdlAudioSpec*, float*, int, void> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetAudioPostmixCallback(
|
|
uint devid,
|
|
delegate* unmanaged[Cdecl]<void*, SdlAudioSpec*, float*, int, void> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAudioPostmixCallback(devid, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LoadWAV_IO")]
|
|
private static partial byte _LoadWAVIO(
|
|
nint src,
|
|
byte closeio,
|
|
SdlAudioSpec* spec,
|
|
byte** audio_buf,
|
|
uint* audio_len
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte LoadWAVIO(nint src, byte closeio, SdlAudioSpec* spec, byte** audio_buf, uint* audio_len)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadWAVIO(src, closeio, spec, audio_buf, audio_len);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_LoadWAV",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _LoadWAV(string path, SdlAudioSpec* spec, byte** audio_buf, uint* audio_len);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte LoadWAV(string path, SdlAudioSpec* spec, byte** audio_buf, uint* audio_len)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadWAV(path, spec, audio_buf, audio_len);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_MixAudio")]
|
|
private static partial byte _MixAudio(byte* dst, byte* src, SdlAudioFormat format, uint len, float volume);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte MixAudio(byte* dst, byte* src, SdlAudioFormat format, uint len, float volume)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _MixAudio(dst, src, format, len, volume);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ConvertAudioSamples")]
|
|
private static partial byte _ConvertAudioSamples(
|
|
SdlAudioSpec* src_spec,
|
|
byte* src_data,
|
|
int src_len,
|
|
SdlAudioSpec* dst_spec,
|
|
byte** dst_data,
|
|
int* dst_len
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ConvertAudioSamples(
|
|
SdlAudioSpec* src_spec,
|
|
byte* src_data,
|
|
int src_len,
|
|
SdlAudioSpec* dst_spec,
|
|
byte** dst_data,
|
|
int* dst_len
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ConvertAudioSamples(src_spec, src_data, src_len, dst_spec, dst_data, dst_len);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetAudioFormatName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetAudioFormatName(SdlAudioFormat format);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetAudioFormatName(SdlAudioFormat format)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAudioFormatName(format);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSilenceValueForFormat")]
|
|
private static partial int _GetSilenceValueForFormat(SdlAudioFormat format);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetSilenceValueForFormat(SdlAudioFormat format)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSilenceValueForFormat(format);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ComposeCustomBlendMode")]
|
|
private static partial uint _ComposeCustomBlendMode(
|
|
SdlBlendFactor srcColorFactor,
|
|
SdlBlendFactor dstColorFactor,
|
|
SdlBlendOperation colorOperation,
|
|
SdlBlendFactor srcAlphaFactor,
|
|
SdlBlendFactor dstAlphaFactor,
|
|
SdlBlendOperation alphaOperation
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint ComposeCustomBlendMode(
|
|
SdlBlendFactor srcColorFactor,
|
|
SdlBlendFactor dstColorFactor,
|
|
SdlBlendOperation colorOperation,
|
|
SdlBlendFactor srcAlphaFactor,
|
|
SdlBlendFactor dstAlphaFactor,
|
|
SdlBlendOperation alphaOperation
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ComposeCustomBlendMode(
|
|
srcColorFactor,
|
|
dstColorFactor,
|
|
colorOperation,
|
|
srcAlphaFactor,
|
|
dstAlphaFactor,
|
|
alphaOperation
|
|
);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetPixelFormatName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetPixelFormatName(SdlPixelFormat format);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetPixelFormatName(SdlPixelFormat format)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPixelFormatName(format);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetMasksForPixelFormat")]
|
|
private static partial byte _GetMasksForPixelFormat(
|
|
SdlPixelFormat format,
|
|
int* bpp,
|
|
uint* Rmask,
|
|
uint* Gmask,
|
|
uint* Bmask,
|
|
uint* Amask
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetMasksForPixelFormat(
|
|
SdlPixelFormat format,
|
|
int* bpp,
|
|
uint* Rmask,
|
|
uint* Gmask,
|
|
uint* Bmask,
|
|
uint* Amask
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetMasksForPixelFormat(format, bpp, Rmask, Gmask, Bmask, Amask);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetPixelFormatForMasks")]
|
|
private static partial SdlPixelFormat _GetPixelFormatForMasks(
|
|
int bpp,
|
|
uint Rmask,
|
|
uint Gmask,
|
|
uint Bmask,
|
|
uint Amask
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPixelFormat GetPixelFormatForMasks(int bpp, uint Rmask, uint Gmask, uint Bmask, uint Amask)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPixelFormatForMasks(bpp, Rmask, Gmask, Bmask, Amask);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetPixelFormatDetails")]
|
|
private static partial SdlPixelFormatDetails* _GetPixelFormatDetails(SdlPixelFormat format);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPixelFormatDetails* GetPixelFormatDetails(SdlPixelFormat format)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPixelFormatDetails(format);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreatePalette")]
|
|
private static partial SdlPalette* _CreatePalette(int ncolors);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPalette* CreatePalette(int ncolors)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreatePalette(ncolors);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetPaletteColors")]
|
|
private static partial byte _SetPaletteColors(
|
|
SdlPalette* palette,
|
|
SdlColor* colors,
|
|
int firstcolor,
|
|
int ncolors
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetPaletteColors(SdlPalette* palette, SdlColor* colors, int firstcolor, int ncolors)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetPaletteColors(palette, colors, firstcolor, ncolors);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyPalette")]
|
|
private static partial void _DestroyPalette(SdlPalette* palette);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyPalette(SdlPalette* palette)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyPalette(palette);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_MapRGB")]
|
|
private static partial uint _MapRGB(
|
|
SdlPixelFormatDetails* format,
|
|
SdlPalette* palette,
|
|
byte r,
|
|
byte g,
|
|
byte b
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint MapRGB(SdlPixelFormatDetails* format, SdlPalette* palette, byte r, byte g, byte b)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _MapRGB(format, palette, r, g, b);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_MapRGBA")]
|
|
private static partial uint _MapRGBA(
|
|
SdlPixelFormatDetails* format,
|
|
SdlPalette* palette,
|
|
byte r,
|
|
byte g,
|
|
byte b,
|
|
byte a
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint MapRGBA(
|
|
SdlPixelFormatDetails* format,
|
|
SdlPalette* palette,
|
|
byte r,
|
|
byte g,
|
|
byte b,
|
|
byte a
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _MapRGBA(format, palette, r, g, b, a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRGB")]
|
|
private static partial void _GetRGB(
|
|
uint pixelvalue,
|
|
SdlPixelFormatDetails* format,
|
|
SdlPalette* palette,
|
|
byte* r,
|
|
byte* g,
|
|
byte* b
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void GetRGB(
|
|
uint pixelvalue,
|
|
SdlPixelFormatDetails* format,
|
|
SdlPalette* palette,
|
|
byte* r,
|
|
byte* g,
|
|
byte* b
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_GetRGB(pixelvalue, format, palette, r, g, b);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRGBA")]
|
|
private static partial void _GetRGBA(
|
|
uint pixelvalue,
|
|
SdlPixelFormatDetails* format,
|
|
SdlPalette* palette,
|
|
byte* r,
|
|
byte* g,
|
|
byte* b,
|
|
byte* a
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void GetRGBA(
|
|
uint pixelvalue,
|
|
SdlPixelFormatDetails* format,
|
|
SdlPalette* palette,
|
|
byte* r,
|
|
byte* g,
|
|
byte* b,
|
|
byte* a
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_GetRGBA(pixelvalue, format, palette, r, g, b, a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasRectIntersection")]
|
|
private static partial byte _HasRectIntersection(SdlRect* A, SdlRect* B);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasRectIntersection(SdlRect* A, SdlRect* B)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasRectIntersection(A, B);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRectIntersection")]
|
|
private static partial byte _GetRectIntersection(SdlRect* A, SdlRect* B, SdlRect* result);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRectIntersection(SdlRect* A, SdlRect* B, SdlRect* result)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRectIntersection(A, B, result);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRectUnion")]
|
|
private static partial byte _GetRectUnion(SdlRect* A, SdlRect* B, SdlRect* result);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRectUnion(SdlRect* A, SdlRect* B, SdlRect* result)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRectUnion(A, B, result);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRectEnclosingPoints")]
|
|
private static partial byte _GetRectEnclosingPoints(
|
|
SdlPoint* points,
|
|
int count,
|
|
SdlRect* clip,
|
|
SdlRect* result
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRectEnclosingPoints(SdlPoint* points, int count, SdlRect* clip, SdlRect* result)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRectEnclosingPoints(points, count, clip, result);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRectAndLineIntersection")]
|
|
private static partial byte _GetRectAndLineIntersection(SdlRect* rect, int* X1, int* Y1, int* X2, int* Y2);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRectAndLineIntersection(SdlRect* rect, int* X1, int* Y1, int* X2, int* Y2)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRectAndLineIntersection(rect, X1, Y1, X2, Y2);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasRectIntersectionFloat")]
|
|
private static partial byte _HasRectIntersectionFloat(SdlFRect* A, SdlFRect* B);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasRectIntersectionFloat(SdlFRect* A, SdlFRect* B)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasRectIntersectionFloat(A, B);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRectIntersectionFloat")]
|
|
private static partial byte _GetRectIntersectionFloat(SdlFRect* A, SdlFRect* B, SdlFRect* result);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRectIntersectionFloat(SdlFRect* A, SdlFRect* B, SdlFRect* result)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRectIntersectionFloat(A, B, result);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRectUnionFloat")]
|
|
private static partial byte _GetRectUnionFloat(SdlFRect* A, SdlFRect* B, SdlFRect* result);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRectUnionFloat(SdlFRect* A, SdlFRect* B, SdlFRect* result)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRectUnionFloat(A, B, result);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRectEnclosingPointsFloat")]
|
|
private static partial byte _GetRectEnclosingPointsFloat(
|
|
SdlFPoint* points,
|
|
int count,
|
|
SdlFRect* clip,
|
|
SdlFRect* result
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRectEnclosingPointsFloat(
|
|
SdlFPoint* points,
|
|
int count,
|
|
SdlFRect* clip,
|
|
SdlFRect* result
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRectEnclosingPointsFloat(points, count, clip, result);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRectAndLineIntersectionFloat")]
|
|
private static partial byte _GetRectAndLineIntersectionFloat(
|
|
SdlFRect* rect,
|
|
float* X1,
|
|
float* Y1,
|
|
float* X2,
|
|
float* Y2
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRectAndLineIntersectionFloat(
|
|
SdlFRect* rect,
|
|
float* X1,
|
|
float* Y1,
|
|
float* X2,
|
|
float* Y2
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRectAndLineIntersectionFloat(rect, X1, Y1, X2, Y2);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateSurface")]
|
|
private static partial SdlSurface* _CreateSurface(int width, int height, SdlPixelFormat format);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* CreateSurface(int width, int height, SdlPixelFormat format)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateSurface(width, height, format);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateSurfaceFrom")]
|
|
private static partial SdlSurface* _CreateSurfaceFrom(
|
|
int width,
|
|
int height,
|
|
SdlPixelFormat format,
|
|
void* pixels,
|
|
int pitch
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* CreateSurfaceFrom(
|
|
int width,
|
|
int height,
|
|
SdlPixelFormat format,
|
|
void* pixels,
|
|
int pitch
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateSurfaceFrom(width, height, format, pixels, pitch);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroySurface")]
|
|
private static partial void _DestroySurface(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroySurface(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroySurface(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceProperties")]
|
|
private static partial uint _GetSurfaceProperties(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetSurfaceProperties(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSurfaceProperties(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceColorspace")]
|
|
private static partial byte _SetSurfaceColorspace(SdlSurface* surface, SdlColorspace colorspace);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetSurfaceColorspace(SdlSurface* surface, SdlColorspace colorspace)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetSurfaceColorspace(surface, colorspace);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceColorspace")]
|
|
private static partial SdlColorspace _GetSurfaceColorspace(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlColorspace GetSurfaceColorspace(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSurfaceColorspace(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateSurfacePalette")]
|
|
private static partial SdlPalette* _CreateSurfacePalette(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPalette* CreateSurfacePalette(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateSurfacePalette(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetSurfacePalette")]
|
|
private static partial byte _SetSurfacePalette(SdlSurface* surface, SdlPalette* palette);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetSurfacePalette(SdlSurface* surface, SdlPalette* palette)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetSurfacePalette(surface, palette);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSurfacePalette")]
|
|
private static partial SdlPalette* _GetSurfacePalette(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPalette* GetSurfacePalette(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSurfacePalette(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AddSurfaceAlternateImage")]
|
|
private static partial byte _AddSurfaceAlternateImage(SdlSurface* surface, SdlSurface* image);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte AddSurfaceAlternateImage(SdlSurface* surface, SdlSurface* image)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AddSurfaceAlternateImage(surface, image);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SurfaceHasAlternateImages")]
|
|
private static partial byte _SurfaceHasAlternateImages(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SurfaceHasAlternateImages(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SurfaceHasAlternateImages(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceImages")]
|
|
private static partial SdlSurface** _GetSurfaceImages(SdlSurface* surface, int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface** GetSurfaceImages(SdlSurface* surface, int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSurfaceImages(surface, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RemoveSurfaceAlternateImages")]
|
|
private static partial void _RemoveSurfaceAlternateImages(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void RemoveSurfaceAlternateImages(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_RemoveSurfaceAlternateImages(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LockSurface")]
|
|
private static partial byte _LockSurface(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte LockSurface(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LockSurface(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UnlockSurface")]
|
|
private static partial void _UnlockSurface(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UnlockSurface(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UnlockSurface(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LoadSurface_IO")]
|
|
private static partial SdlSurface* _LoadSurfaceIO(nint src, byte closeio);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* LoadSurfaceIO(nint src, byte closeio)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadSurfaceIO(src, closeio);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_LoadSurface",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlSurface* _LoadSurface(string file);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* LoadSurface(string file)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadSurface(file);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LoadBMP_IO")]
|
|
private static partial SdlSurface* _LoadBMPIO(nint src, byte closeio);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* LoadBMPIO(nint src, byte closeio)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadBMPIO(src, closeio);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_LoadBMP",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlSurface* _LoadBMP(string file);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* LoadBMP(string file)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadBMP(file);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SaveBMP_IO")]
|
|
private static partial byte _SaveBMPIO(SdlSurface* surface, nint dst, byte closeio);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SaveBMPIO(SdlSurface* surface, nint dst, byte closeio)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SaveBMPIO(surface, dst, closeio);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SaveBMP",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SaveBMP(SdlSurface* surface, string file);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SaveBMP(SdlSurface* surface, string file)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SaveBMP(surface, file);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LoadPNG_IO")]
|
|
private static partial SdlSurface* _LoadPNGIO(nint src, byte closeio);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* LoadPNGIO(nint src, byte closeio)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadPNGIO(src, closeio);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_LoadPNG",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlSurface* _LoadPNG(string file);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* LoadPNG(string file)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadPNG(file);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SavePNG_IO")]
|
|
private static partial byte _SavePNGIO(SdlSurface* surface, nint dst, byte closeio);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SavePNGIO(SdlSurface* surface, nint dst, byte closeio)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SavePNGIO(surface, dst, closeio);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SavePNG",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SavePNG(SdlSurface* surface, string file);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SavePNG(SdlSurface* surface, string file)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SavePNG(surface, file);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceRLE")]
|
|
private static partial byte _SetSurfaceRLE(SdlSurface* surface, byte enabled);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetSurfaceRLE(SdlSurface* surface, byte enabled)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetSurfaceRLE(surface, enabled);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SurfaceHasRLE")]
|
|
private static partial byte _SurfaceHasRLE(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SurfaceHasRLE(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SurfaceHasRLE(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceColorKey")]
|
|
private static partial byte _SetSurfaceColorKey(SdlSurface* surface, byte enabled, uint key);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetSurfaceColorKey(SdlSurface* surface, byte enabled, uint key)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetSurfaceColorKey(surface, enabled, key);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SurfaceHasColorKey")]
|
|
private static partial byte _SurfaceHasColorKey(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SurfaceHasColorKey(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SurfaceHasColorKey(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceColorKey")]
|
|
private static partial byte _GetSurfaceColorKey(SdlSurface* surface, uint* key);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetSurfaceColorKey(SdlSurface* surface, uint* key)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSurfaceColorKey(surface, key);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceColorMod")]
|
|
private static partial byte _SetSurfaceColorMod(SdlSurface* surface, byte r, byte g, byte b);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetSurfaceColorMod(SdlSurface* surface, byte r, byte g, byte b)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetSurfaceColorMod(surface, r, g, b);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceColorMod")]
|
|
private static partial byte _GetSurfaceColorMod(SdlSurface* surface, byte* r, byte* g, byte* b);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetSurfaceColorMod(SdlSurface* surface, byte* r, byte* g, byte* b)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSurfaceColorMod(surface, r, g, b);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceAlphaMod")]
|
|
private static partial byte _SetSurfaceAlphaMod(SdlSurface* surface, byte alpha);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetSurfaceAlphaMod(SdlSurface* surface, byte alpha)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetSurfaceAlphaMod(surface, alpha);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceAlphaMod")]
|
|
private static partial byte _GetSurfaceAlphaMod(SdlSurface* surface, byte* alpha);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetSurfaceAlphaMod(SdlSurface* surface, byte* alpha)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSurfaceAlphaMod(surface, alpha);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceBlendMode")]
|
|
private static partial byte _SetSurfaceBlendMode(SdlSurface* surface, uint blendMode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetSurfaceBlendMode(SdlSurface* surface, uint blendMode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetSurfaceBlendMode(surface, blendMode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceBlendMode")]
|
|
private static partial byte _GetSurfaceBlendMode(SdlSurface* surface, uint* blendMode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetSurfaceBlendMode(SdlSurface* surface, uint* blendMode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSurfaceBlendMode(surface, blendMode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceClipRect")]
|
|
private static partial byte _SetSurfaceClipRect(SdlSurface* surface, SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetSurfaceClipRect(SdlSurface* surface, SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetSurfaceClipRect(surface, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceClipRect")]
|
|
private static partial byte _GetSurfaceClipRect(SdlSurface* surface, SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetSurfaceClipRect(SdlSurface* surface, SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSurfaceClipRect(surface, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_FlipSurface")]
|
|
private static partial byte _FlipSurface(SdlSurface* surface, SdlFlipMode flip);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte FlipSurface(SdlSurface* surface, SdlFlipMode flip)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _FlipSurface(surface, flip);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RotateSurface")]
|
|
private static partial SdlSurface* _RotateSurface(SdlSurface* surface, float angle);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* RotateSurface(SdlSurface* surface, float angle)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RotateSurface(surface, angle);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DuplicateSurface")]
|
|
private static partial SdlSurface* _DuplicateSurface(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* DuplicateSurface(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _DuplicateSurface(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ScaleSurface")]
|
|
private static partial SdlSurface* _ScaleSurface(
|
|
SdlSurface* surface,
|
|
int width,
|
|
int height,
|
|
SdlScaleMode scaleMode
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* ScaleSurface(SdlSurface* surface, int width, int height, SdlScaleMode scaleMode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ScaleSurface(surface, width, height, scaleMode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ConvertSurface")]
|
|
private static partial SdlSurface* _ConvertSurface(SdlSurface* surface, SdlPixelFormat format);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* ConvertSurface(SdlSurface* surface, SdlPixelFormat format)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ConvertSurface(surface, format);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ConvertSurfaceAndColorspace")]
|
|
private static partial SdlSurface* _ConvertSurfaceAndColorspace(
|
|
SdlSurface* surface,
|
|
SdlPixelFormat format,
|
|
SdlPalette* palette,
|
|
SdlColorspace colorspace,
|
|
uint props
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* ConvertSurfaceAndColorspace(
|
|
SdlSurface* surface,
|
|
SdlPixelFormat format,
|
|
SdlPalette* palette,
|
|
SdlColorspace colorspace,
|
|
uint props
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ConvertSurfaceAndColorspace(surface, format, palette, colorspace, props);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ConvertPixels")]
|
|
private static partial byte _ConvertPixels(
|
|
int width,
|
|
int height,
|
|
SdlPixelFormat src_format,
|
|
void* src,
|
|
int src_pitch,
|
|
SdlPixelFormat dst_format,
|
|
void* dst,
|
|
int dst_pitch
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ConvertPixels(
|
|
int width,
|
|
int height,
|
|
SdlPixelFormat src_format,
|
|
void* src,
|
|
int src_pitch,
|
|
SdlPixelFormat dst_format,
|
|
void* dst,
|
|
int dst_pitch
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ConvertPixels(width, height, src_format, src, src_pitch, dst_format, dst, dst_pitch);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ConvertPixelsAndColorspace")]
|
|
private static partial byte _ConvertPixelsAndColorspace(
|
|
int width,
|
|
int height,
|
|
SdlPixelFormat src_format,
|
|
SdlColorspace src_colorspace,
|
|
uint src_properties,
|
|
void* src,
|
|
int src_pitch,
|
|
SdlPixelFormat dst_format,
|
|
SdlColorspace dst_colorspace,
|
|
uint dst_properties,
|
|
void* dst,
|
|
int dst_pitch
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ConvertPixelsAndColorspace(
|
|
int width,
|
|
int height,
|
|
SdlPixelFormat src_format,
|
|
SdlColorspace src_colorspace,
|
|
uint src_properties,
|
|
void* src,
|
|
int src_pitch,
|
|
SdlPixelFormat dst_format,
|
|
SdlColorspace dst_colorspace,
|
|
uint dst_properties,
|
|
void* dst,
|
|
int dst_pitch
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ConvertPixelsAndColorspace(
|
|
width,
|
|
height,
|
|
src_format,
|
|
src_colorspace,
|
|
src_properties,
|
|
src,
|
|
src_pitch,
|
|
dst_format,
|
|
dst_colorspace,
|
|
dst_properties,
|
|
dst,
|
|
dst_pitch
|
|
);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PremultiplyAlpha")]
|
|
private static partial byte _PremultiplyAlpha(
|
|
int width,
|
|
int height,
|
|
SdlPixelFormat src_format,
|
|
void* src,
|
|
int src_pitch,
|
|
SdlPixelFormat dst_format,
|
|
void* dst,
|
|
int dst_pitch,
|
|
byte linear
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte PremultiplyAlpha(
|
|
int width,
|
|
int height,
|
|
SdlPixelFormat src_format,
|
|
void* src,
|
|
int src_pitch,
|
|
SdlPixelFormat dst_format,
|
|
void* dst,
|
|
int dst_pitch,
|
|
byte linear
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _PremultiplyAlpha(width, height, src_format, src, src_pitch, dst_format, dst, dst_pitch, linear);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PremultiplySurfaceAlpha")]
|
|
private static partial byte _PremultiplySurfaceAlpha(SdlSurface* surface, byte linear);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte PremultiplySurfaceAlpha(SdlSurface* surface, byte linear)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _PremultiplySurfaceAlpha(surface, linear);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ClearSurface")]
|
|
private static partial byte _ClearSurface(SdlSurface* surface, float r, float g, float b, float a);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ClearSurface(SdlSurface* surface, float r, float g, float b, float a)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ClearSurface(surface, r, g, b, a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_FillSurfaceRect")]
|
|
private static partial byte _FillSurfaceRect(SdlSurface* dst, SdlRect* rect, uint color);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte FillSurfaceRect(SdlSurface* dst, SdlRect* rect, uint color)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _FillSurfaceRect(dst, rect, color);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_FillSurfaceRects")]
|
|
private static partial byte _FillSurfaceRects(SdlSurface* dst, SdlRect* rects, int count, uint color);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte FillSurfaceRects(SdlSurface* dst, SdlRect* rects, int count, uint color)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _FillSurfaceRects(dst, rects, count, color);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BlitSurface")]
|
|
private static partial byte _BlitSurface(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte BlitSurface(SdlSurface* src, SdlRect* srcrect, SdlSurface* dst, SdlRect* dstrect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BlitSurface(src, srcrect, dst, dstrect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BlitSurfaceUnchecked")]
|
|
private static partial byte _BlitSurfaceUnchecked(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte BlitSurfaceUnchecked(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BlitSurfaceUnchecked(src, srcrect, dst, dstrect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BlitSurfaceScaled")]
|
|
private static partial byte _BlitSurfaceScaled(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect,
|
|
SdlScaleMode scaleMode
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte BlitSurfaceScaled(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect,
|
|
SdlScaleMode scaleMode
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BlitSurfaceScaled(src, srcrect, dst, dstrect, scaleMode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BlitSurfaceUncheckedScaled")]
|
|
private static partial byte _BlitSurfaceUncheckedScaled(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect,
|
|
SdlScaleMode scaleMode
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte BlitSurfaceUncheckedScaled(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect,
|
|
SdlScaleMode scaleMode
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BlitSurfaceUncheckedScaled(src, srcrect, dst, dstrect, scaleMode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_StretchSurface")]
|
|
private static partial byte _StretchSurface(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect,
|
|
SdlScaleMode scaleMode
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte StretchSurface(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect,
|
|
SdlScaleMode scaleMode
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _StretchSurface(src, srcrect, dst, dstrect, scaleMode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BlitSurfaceTiled")]
|
|
private static partial byte _BlitSurfaceTiled(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte BlitSurfaceTiled(SdlSurface* src, SdlRect* srcrect, SdlSurface* dst, SdlRect* dstrect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BlitSurfaceTiled(src, srcrect, dst, dstrect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BlitSurfaceTiledWithScale")]
|
|
private static partial byte _BlitSurfaceTiledWithScale(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
float scale,
|
|
SdlScaleMode scaleMode,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte BlitSurfaceTiledWithScale(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
float scale,
|
|
SdlScaleMode scaleMode,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BlitSurfaceTiledWithScale(src, srcrect, scale, scaleMode, dst, dstrect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BlitSurface9Grid")]
|
|
private static partial byte _BlitSurface9Grid(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
int left_width,
|
|
int right_width,
|
|
int top_height,
|
|
int bottom_height,
|
|
float scale,
|
|
SdlScaleMode scaleMode,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte BlitSurface9Grid(
|
|
SdlSurface* src,
|
|
SdlRect* srcrect,
|
|
int left_width,
|
|
int right_width,
|
|
int top_height,
|
|
int bottom_height,
|
|
float scale,
|
|
SdlScaleMode scaleMode,
|
|
SdlSurface* dst,
|
|
SdlRect* dstrect
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BlitSurface9Grid(
|
|
src,
|
|
srcrect,
|
|
left_width,
|
|
right_width,
|
|
top_height,
|
|
bottom_height,
|
|
scale,
|
|
scaleMode,
|
|
dst,
|
|
dstrect
|
|
);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_MapSurfaceRGB")]
|
|
private static partial uint _MapSurfaceRGB(SdlSurface* surface, byte r, byte g, byte b);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint MapSurfaceRGB(SdlSurface* surface, byte r, byte g, byte b)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _MapSurfaceRGB(surface, r, g, b);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_MapSurfaceRGBA")]
|
|
private static partial uint _MapSurfaceRGBA(SdlSurface* surface, byte r, byte g, byte b, byte a);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint MapSurfaceRGBA(SdlSurface* surface, byte r, byte g, byte b, byte a)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _MapSurfaceRGBA(surface, r, g, b, a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadSurfacePixel")]
|
|
private static partial byte _ReadSurfacePixel(
|
|
SdlSurface* surface,
|
|
int x,
|
|
int y,
|
|
byte* r,
|
|
byte* g,
|
|
byte* b,
|
|
byte* a
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadSurfacePixel(SdlSurface* surface, int x, int y, byte* r, byte* g, byte* b, byte* a)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadSurfacePixel(surface, x, y, r, g, b, a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadSurfacePixelFloat")]
|
|
private static partial byte _ReadSurfacePixelFloat(
|
|
SdlSurface* surface,
|
|
int x,
|
|
int y,
|
|
float* r,
|
|
float* g,
|
|
float* b,
|
|
float* a
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadSurfacePixelFloat(
|
|
SdlSurface* surface,
|
|
int x,
|
|
int y,
|
|
float* r,
|
|
float* g,
|
|
float* b,
|
|
float* a
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadSurfacePixelFloat(surface, x, y, r, g, b, a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteSurfacePixel")]
|
|
private static partial byte _WriteSurfacePixel(
|
|
SdlSurface* surface,
|
|
int x,
|
|
int y,
|
|
byte r,
|
|
byte g,
|
|
byte b,
|
|
byte a
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteSurfacePixel(SdlSurface* surface, int x, int y, byte r, byte g, byte b, byte a)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteSurfacePixel(surface, x, y, r, g, b, a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WriteSurfacePixelFloat")]
|
|
private static partial byte _WriteSurfacePixelFloat(
|
|
SdlSurface* surface,
|
|
int x,
|
|
int y,
|
|
float r,
|
|
float g,
|
|
float b,
|
|
float a
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteSurfacePixelFloat(
|
|
SdlSurface* surface,
|
|
int x,
|
|
int y,
|
|
float r,
|
|
float g,
|
|
float b,
|
|
float a
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteSurfacePixelFloat(surface, x, y, r, g, b, a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumCameraDrivers")]
|
|
private static partial int _GetNumCameraDrivers();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumCameraDrivers()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumCameraDrivers();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetCameraDriver",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetCameraDriver(int index);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetCameraDriver(int index)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCameraDriver(index);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetCurrentCameraDriver",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetCurrentCameraDriver();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetCurrentCameraDriver()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCurrentCameraDriver();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCameras")]
|
|
private static partial uint* _GetCameras(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint* GetCameras(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCameras(count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCameraSupportedFormats")]
|
|
private static partial SdlCameraSpec** _GetCameraSupportedFormats(uint instance_id, int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlCameraSpec** GetCameraSupportedFormats(uint instance_id, int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCameraSupportedFormats(instance_id, count);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetCameraName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetCameraName(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetCameraName(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCameraName(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCameraPosition")]
|
|
private static partial SdlCameraPosition _GetCameraPosition(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlCameraPosition GetCameraPosition(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCameraPosition(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OpenCamera")]
|
|
private static partial SdlCamera _OpenCamera(uint instance_id, SdlCameraSpec* spec);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlCamera OpenCamera(uint instance_id, SdlCameraSpec* spec)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenCamera(instance_id, spec);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCameraPermissionState")]
|
|
private static partial SdlCameraPermissionState _GetCameraPermissionState(SdlCamera camera);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlCameraPermissionState GetCameraPermissionState(SdlCamera camera)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCameraPermissionState(camera);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCameraID")]
|
|
private static partial uint _GetCameraID(SdlCamera camera);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetCameraID(SdlCamera camera)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCameraID(camera);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCameraProperties")]
|
|
private static partial uint _GetCameraProperties(SdlCamera camera);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetCameraProperties(SdlCamera camera)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCameraProperties(camera);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCameraFormat")]
|
|
private static partial byte _GetCameraFormat(SdlCamera camera, SdlCameraSpec* spec);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetCameraFormat(SdlCamera camera, SdlCameraSpec* spec)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCameraFormat(camera, spec);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AcquireCameraFrame")]
|
|
private static partial SdlSurface* _AcquireCameraFrame(SdlCamera camera, ulong* timestampNS);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* AcquireCameraFrame(SdlCamera camera, ulong* timestampNS)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AcquireCameraFrame(camera, timestampNS);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReleaseCameraFrame")]
|
|
private static partial void _ReleaseCameraFrame(SdlCamera camera, SdlSurface* frame);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ReleaseCameraFrame(SdlCamera camera, SdlSurface* frame)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ReleaseCameraFrame(camera, frame);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CloseCamera")]
|
|
private static partial void _CloseCamera(SdlCamera camera);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void CloseCamera(SdlCamera camera)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_CloseCamera(camera);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetClipboardText",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetClipboardText(string text);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetClipboardText(string text)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetClipboardText(text);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetClipboardText")]
|
|
private static partial byte* _GetClipboardText();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* GetClipboardText()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetClipboardText();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasClipboardText")]
|
|
private static partial byte _HasClipboardText();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasClipboardText()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasClipboardText();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetPrimarySelectionText",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetPrimarySelectionText(string text);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetPrimarySelectionText(string text)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetPrimarySelectionText(text);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetPrimarySelectionText")]
|
|
private static partial byte* _GetPrimarySelectionText();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* GetPrimarySelectionText()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPrimarySelectionText();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasPrimarySelectionText")]
|
|
private static partial byte _HasPrimarySelectionText();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasPrimarySelectionText()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasPrimarySelectionText();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetClipboardData")]
|
|
private static partial byte _SetClipboardData(
|
|
delegate* unmanaged[Cdecl]<void*, byte*, nuint*, void*> callback,
|
|
delegate* unmanaged[Cdecl]<void*, void> cleanup,
|
|
void* userdata,
|
|
byte** mime_types,
|
|
nuint num_mime_types
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetClipboardData(
|
|
delegate* unmanaged[Cdecl]<void*, byte*, nuint*, void*> callback,
|
|
delegate* unmanaged[Cdecl]<void*, void> cleanup,
|
|
void* userdata,
|
|
byte** mime_types,
|
|
nuint num_mime_types
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetClipboardData(callback, cleanup, userdata, mime_types, num_mime_types);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ClearClipboardData")]
|
|
private static partial byte _ClearClipboardData();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ClearClipboardData()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ClearClipboardData();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetClipboardData",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void* _GetClipboardData(string mime_type, nuint* size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* GetClipboardData(string mime_type, nuint* size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetClipboardData(mime_type, size);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_HasClipboardData",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _HasClipboardData(string mime_type);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasClipboardData(string mime_type)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasClipboardData(mime_type);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetClipboardMimeTypes")]
|
|
private static partial byte** _GetClipboardMimeTypes(nuint* num_mime_types);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte** GetClipboardMimeTypes(nuint* num_mime_types)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetClipboardMimeTypes(num_mime_types);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumLogicalCPUCores")]
|
|
private static partial int _GetNumLogicalCPUCores();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumLogicalCPUCores()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumLogicalCPUCores();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCPUCacheLineSize")]
|
|
private static partial int _GetCPUCacheLineSize();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetCPUCacheLineSize()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCPUCacheLineSize();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasAltiVec")]
|
|
private static partial byte _HasAltiVec();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasAltiVec()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasAltiVec();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasMMX")]
|
|
private static partial byte _HasMMX();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasMMX()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasMMX();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasSSE")]
|
|
private static partial byte _HasSSE();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasSSE()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasSSE();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasSSE2")]
|
|
private static partial byte _HasSSE2();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasSSE2()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasSSE2();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasSSE3")]
|
|
private static partial byte _HasSSE3();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasSSE3()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasSSE3();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasSSE41")]
|
|
private static partial byte _HasSSE41();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasSSE41()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasSSE41();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasSSE42")]
|
|
private static partial byte _HasSSE42();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasSSE42()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasSSE42();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasAVX")]
|
|
private static partial byte _HasAVX();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasAVX()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasAVX();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasAVX2")]
|
|
private static partial byte _HasAVX2();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasAVX2()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasAVX2();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasAVX512F")]
|
|
private static partial byte _HasAVX512F();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasAVX512F()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasAVX512F();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasARMSIMD")]
|
|
private static partial byte _HasARMSIMD();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasARMSIMD()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasARMSIMD();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasNEON")]
|
|
private static partial byte _HasNEON();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasNEON()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasNEON();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasLSX")]
|
|
private static partial byte _HasLSX();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasLSX()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasLSX();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasLASX")]
|
|
private static partial byte _HasLASX();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasLASX()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasLASX();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSystemRAM")]
|
|
private static partial int _GetSystemRAM();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetSystemRAM()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSystemRAM();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSIMDAlignment")]
|
|
private static partial nuint _GetSIMDAlignment();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nuint GetSIMDAlignment()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSIMDAlignment();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSystemPageSize")]
|
|
private static partial int _GetSystemPageSize();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetSystemPageSize()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSystemPageSize();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumVideoDrivers")]
|
|
private static partial int _GetNumVideoDrivers();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumVideoDrivers()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumVideoDrivers();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetVideoDriver",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetVideoDriver(int index);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetVideoDriver(int index)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetVideoDriver(index);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetCurrentVideoDriver",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetCurrentVideoDriver();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetCurrentVideoDriver()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCurrentVideoDriver();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSystemTheme")]
|
|
private static partial SdlSystemTheme _GetSystemTheme();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSystemTheme GetSystemTheme()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSystemTheme();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDisplays")]
|
|
private static partial uint* _GetDisplays(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint* GetDisplays(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDisplays(count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetPrimaryDisplay")]
|
|
private static partial uint _GetPrimaryDisplay();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetPrimaryDisplay()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPrimaryDisplay();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDisplayProperties")]
|
|
private static partial uint _GetDisplayProperties(uint displayID);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetDisplayProperties(uint displayID)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDisplayProperties(displayID);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetDisplayName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetDisplayName(uint displayID);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetDisplayName(uint displayID)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDisplayName(displayID);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDisplayBounds")]
|
|
private static partial byte _GetDisplayBounds(uint displayID, SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetDisplayBounds(uint displayID, SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDisplayBounds(displayID, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDisplayUsableBounds")]
|
|
private static partial byte _GetDisplayUsableBounds(uint displayID, SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetDisplayUsableBounds(uint displayID, SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDisplayUsableBounds(displayID, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNaturalDisplayOrientation")]
|
|
private static partial SdlDisplayOrientation _GetNaturalDisplayOrientation(uint displayID);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlDisplayOrientation GetNaturalDisplayOrientation(uint displayID)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNaturalDisplayOrientation(displayID);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCurrentDisplayOrientation")]
|
|
private static partial SdlDisplayOrientation _GetCurrentDisplayOrientation(uint displayID);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlDisplayOrientation GetCurrentDisplayOrientation(uint displayID)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCurrentDisplayOrientation(displayID);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDisplayContentScale")]
|
|
private static partial float _GetDisplayContentScale(uint displayID);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float GetDisplayContentScale(uint displayID)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDisplayContentScale(displayID);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetFullscreenDisplayModes")]
|
|
private static partial SdlDisplayMode** _GetFullscreenDisplayModes(uint displayID, int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlDisplayMode** GetFullscreenDisplayModes(uint displayID, int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetFullscreenDisplayModes(displayID, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetClosestFullscreenDisplayMode")]
|
|
private static partial byte _GetClosestFullscreenDisplayMode(
|
|
uint displayID,
|
|
int w,
|
|
int h,
|
|
float refresh_rate,
|
|
byte include_high_density_modes,
|
|
SdlDisplayMode* closest
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetClosestFullscreenDisplayMode(
|
|
uint displayID,
|
|
int w,
|
|
int h,
|
|
float refresh_rate,
|
|
byte include_high_density_modes,
|
|
SdlDisplayMode* closest
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetClosestFullscreenDisplayMode(
|
|
displayID,
|
|
w,
|
|
h,
|
|
refresh_rate,
|
|
include_high_density_modes,
|
|
closest
|
|
);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDesktopDisplayMode")]
|
|
private static partial SdlDisplayMode* _GetDesktopDisplayMode(uint displayID);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlDisplayMode* GetDesktopDisplayMode(uint displayID)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDesktopDisplayMode(displayID);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCurrentDisplayMode")]
|
|
private static partial SdlDisplayMode* _GetCurrentDisplayMode(uint displayID);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlDisplayMode* GetCurrentDisplayMode(uint displayID)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCurrentDisplayMode(displayID);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDisplayForPoint")]
|
|
private static partial uint _GetDisplayForPoint(SdlPoint* point);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetDisplayForPoint(SdlPoint* point)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDisplayForPoint(point);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDisplayForRect")]
|
|
private static partial uint _GetDisplayForRect(SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetDisplayForRect(SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDisplayForRect(rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDisplayForWindow")]
|
|
private static partial uint _GetDisplayForWindow(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetDisplayForWindow(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDisplayForWindow(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowPixelDensity")]
|
|
private static partial float _GetWindowPixelDensity(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float GetWindowPixelDensity(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowPixelDensity(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowDisplayScale")]
|
|
private static partial float _GetWindowDisplayScale(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float GetWindowDisplayScale(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowDisplayScale(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowFullscreenMode")]
|
|
private static partial byte _SetWindowFullscreenMode(SdlWindow window, SdlDisplayMode* mode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowFullscreenMode(SdlWindow window, SdlDisplayMode* mode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowFullscreenMode(window, mode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowFullscreenMode")]
|
|
private static partial SdlDisplayMode* _GetWindowFullscreenMode(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlDisplayMode* GetWindowFullscreenMode(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowFullscreenMode(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowICCProfile")]
|
|
private static partial void* _GetWindowICCProfile(SdlWindow window, nuint* size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* GetWindowICCProfile(SdlWindow window, nuint* size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowICCProfile(window, size);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowPixelFormat")]
|
|
private static partial SdlPixelFormat _GetWindowPixelFormat(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPixelFormat GetWindowPixelFormat(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowPixelFormat(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindows")]
|
|
private static partial SdlWindow* _GetWindows(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindow* GetWindows(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindows(count);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_CreateWindow",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlWindow _CreateWindow(string title, int w, int h, SdlWindowFlags flags);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindow CreateWindow(string title, int w, int h, SdlWindowFlags flags)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateWindow(title, w, h, flags);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreatePopupWindow")]
|
|
private static partial SdlWindow _CreatePopupWindow(
|
|
SdlWindow parent,
|
|
int offset_x,
|
|
int offset_y,
|
|
int w,
|
|
int h,
|
|
SdlWindowFlags flags
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindow CreatePopupWindow(
|
|
SdlWindow parent,
|
|
int offset_x,
|
|
int offset_y,
|
|
int w,
|
|
int h,
|
|
SdlWindowFlags flags
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreatePopupWindow(parent, offset_x, offset_y, w, h, flags);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateWindowWithProperties")]
|
|
private static partial SdlWindow _CreateWindowWithProperties(uint props);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindow CreateWindowWithProperties(uint props)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateWindowWithProperties(props);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowID")]
|
|
private static partial uint _GetWindowID(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetWindowID(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowID(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowFromID")]
|
|
private static partial SdlWindow _GetWindowFromID(uint id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindow GetWindowFromID(uint id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowFromID(id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowParent")]
|
|
private static partial SdlWindow _GetWindowParent(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindow GetWindowParent(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowParent(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowProperties")]
|
|
private static partial uint _GetWindowProperties(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetWindowProperties(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowProperties(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowFlags")]
|
|
private static partial SdlWindowFlags _GetWindowFlags(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindowFlags GetWindowFlags(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowFlags(window);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetWindowTitle",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetWindowTitle(SdlWindow window, string title);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowTitle(SdlWindow window, string title)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowTitle(window, title);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetWindowTitle",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetWindowTitle(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetWindowTitle(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowTitle(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowIcon")]
|
|
private static partial byte _SetWindowIcon(SdlWindow window, SdlSurface* icon);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowIcon(SdlWindow window, SdlSurface* icon)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowIcon(window, icon);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowPosition")]
|
|
private static partial byte _SetWindowPosition(SdlWindow window, int x, int y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowPosition(SdlWindow window, int x, int y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowPosition(window, x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowPosition")]
|
|
private static partial byte _GetWindowPosition(SdlWindow window, int* x, int* y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetWindowPosition(SdlWindow window, int* x, int* y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowPosition(window, x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowSize")]
|
|
private static partial byte _SetWindowSize(SdlWindow window, int w, int h);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowSize(SdlWindow window, int w, int h)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowSize(window, w, h);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowSize")]
|
|
private static partial byte _GetWindowSize(SdlWindow window, int* w, int* h);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetWindowSize(SdlWindow window, int* w, int* h)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowSize(window, w, h);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowSafeArea")]
|
|
private static partial byte _GetWindowSafeArea(SdlWindow window, SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetWindowSafeArea(SdlWindow window, SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowSafeArea(window, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowAspectRatio")]
|
|
private static partial byte _SetWindowAspectRatio(SdlWindow window, float min_aspect, float max_aspect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowAspectRatio(SdlWindow window, float min_aspect, float max_aspect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowAspectRatio(window, min_aspect, max_aspect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowAspectRatio")]
|
|
private static partial byte _GetWindowAspectRatio(SdlWindow window, float* min_aspect, float* max_aspect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetWindowAspectRatio(SdlWindow window, float* min_aspect, float* max_aspect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowAspectRatio(window, min_aspect, max_aspect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowBordersSize")]
|
|
private static partial byte _GetWindowBordersSize(
|
|
SdlWindow window,
|
|
int* top,
|
|
int* left,
|
|
int* bottom,
|
|
int* right
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetWindowBordersSize(SdlWindow window, int* top, int* left, int* bottom, int* right)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowBordersSize(window, top, left, bottom, right);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowSizeInPixels")]
|
|
private static partial byte _GetWindowSizeInPixels(SdlWindow window, int* w, int* h);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetWindowSizeInPixels(SdlWindow window, int* w, int* h)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowSizeInPixels(window, w, h);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowMinimumSize")]
|
|
private static partial byte _SetWindowMinimumSize(SdlWindow window, int min_w, int min_h);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowMinimumSize(SdlWindow window, int min_w, int min_h)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowMinimumSize(window, min_w, min_h);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowMinimumSize")]
|
|
private static partial byte _GetWindowMinimumSize(SdlWindow window, int* w, int* h);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetWindowMinimumSize(SdlWindow window, int* w, int* h)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowMinimumSize(window, w, h);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowMaximumSize")]
|
|
private static partial byte _SetWindowMaximumSize(SdlWindow window, int max_w, int max_h);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowMaximumSize(SdlWindow window, int max_w, int max_h)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowMaximumSize(window, max_w, max_h);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowMaximumSize")]
|
|
private static partial byte _GetWindowMaximumSize(SdlWindow window, int* w, int* h);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetWindowMaximumSize(SdlWindow window, int* w, int* h)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowMaximumSize(window, w, h);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowBordered")]
|
|
private static partial byte _SetWindowBordered(SdlWindow window, byte bordered);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowBordered(SdlWindow window, byte bordered)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowBordered(window, bordered);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowResizable")]
|
|
private static partial byte _SetWindowResizable(SdlWindow window, byte resizable);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowResizable(SdlWindow window, byte resizable)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowResizable(window, resizable);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowAlwaysOnTop")]
|
|
private static partial byte _SetWindowAlwaysOnTop(SdlWindow window, byte on_top);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowAlwaysOnTop(SdlWindow window, byte on_top)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowAlwaysOnTop(window, on_top);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowFillDocument")]
|
|
private static partial byte _SetWindowFillDocument(SdlWindow window, byte fill);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowFillDocument(SdlWindow window, byte fill)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowFillDocument(window, fill);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ShowWindow")]
|
|
private static partial byte _ShowWindow(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ShowWindow(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ShowWindow(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HideWindow")]
|
|
private static partial byte _HideWindow(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HideWindow(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HideWindow(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RaiseWindow")]
|
|
private static partial byte _RaiseWindow(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RaiseWindow(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RaiseWindow(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_MaximizeWindow")]
|
|
private static partial byte _MaximizeWindow(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte MaximizeWindow(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _MaximizeWindow(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_MinimizeWindow")]
|
|
private static partial byte _MinimizeWindow(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte MinimizeWindow(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _MinimizeWindow(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RestoreWindow")]
|
|
private static partial byte _RestoreWindow(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RestoreWindow(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RestoreWindow(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowFullscreen")]
|
|
private static partial byte _SetWindowFullscreen(SdlWindow window, byte fullscreen);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowFullscreen(SdlWindow window, byte fullscreen)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowFullscreen(window, fullscreen);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SyncWindow")]
|
|
private static partial byte _SyncWindow(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SyncWindow(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SyncWindow(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WindowHasSurface")]
|
|
private static partial byte _WindowHasSurface(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WindowHasSurface(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WindowHasSurface(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowSurface")]
|
|
private static partial SdlSurface* _GetWindowSurface(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* GetWindowSurface(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowSurface(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowSurfaceVSync")]
|
|
private static partial byte _SetWindowSurfaceVSync(SdlWindow window, int vsync);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowSurfaceVSync(SdlWindow window, int vsync)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowSurfaceVSync(window, vsync);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowSurfaceVSync")]
|
|
private static partial byte _GetWindowSurfaceVSync(SdlWindow window, int* vsync);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetWindowSurfaceVSync(SdlWindow window, int* vsync)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowSurfaceVSync(window, vsync);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UpdateWindowSurface")]
|
|
private static partial byte _UpdateWindowSurface(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte UpdateWindowSurface(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _UpdateWindowSurface(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UpdateWindowSurfaceRects")]
|
|
private static partial byte _UpdateWindowSurfaceRects(SdlWindow window, SdlRect* rects, int numrects);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte UpdateWindowSurfaceRects(SdlWindow window, SdlRect* rects, int numrects)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _UpdateWindowSurfaceRects(window, rects, numrects);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyWindowSurface")]
|
|
private static partial byte _DestroyWindowSurface(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte DestroyWindowSurface(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _DestroyWindowSurface(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowKeyboardGrab")]
|
|
private static partial byte _SetWindowKeyboardGrab(SdlWindow window, byte grabbed);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowKeyboardGrab(SdlWindow window, byte grabbed)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowKeyboardGrab(window, grabbed);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowMouseGrab")]
|
|
private static partial byte _SetWindowMouseGrab(SdlWindow window, byte grabbed);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowMouseGrab(SdlWindow window, byte grabbed)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowMouseGrab(window, grabbed);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowKeyboardGrab")]
|
|
private static partial byte _GetWindowKeyboardGrab(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetWindowKeyboardGrab(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowKeyboardGrab(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowMouseGrab")]
|
|
private static partial byte _GetWindowMouseGrab(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetWindowMouseGrab(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowMouseGrab(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGrabbedWindow")]
|
|
private static partial SdlWindow _GetGrabbedWindow();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindow GetGrabbedWindow()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGrabbedWindow();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowMouseRect")]
|
|
private static partial byte _SetWindowMouseRect(SdlWindow window, SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowMouseRect(SdlWindow window, SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowMouseRect(window, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowMouseRect")]
|
|
private static partial SdlRect* _GetWindowMouseRect(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlRect* GetWindowMouseRect(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowMouseRect(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowOpacity")]
|
|
private static partial byte _SetWindowOpacity(SdlWindow window, float opacity);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowOpacity(SdlWindow window, float opacity)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowOpacity(window, opacity);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowOpacity")]
|
|
private static partial float _GetWindowOpacity(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float GetWindowOpacity(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowOpacity(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowParent")]
|
|
private static partial byte _SetWindowParent(SdlWindow window, SdlWindow parent);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowParent(SdlWindow window, SdlWindow parent)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowParent(window, parent);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowModal")]
|
|
private static partial byte _SetWindowModal(SdlWindow window, byte modal);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowModal(SdlWindow window, byte modal)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowModal(window, modal);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowFocusable")]
|
|
private static partial byte _SetWindowFocusable(SdlWindow window, byte focusable);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowFocusable(SdlWindow window, byte focusable)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowFocusable(window, focusable);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ShowWindowSystemMenu")]
|
|
private static partial byte _ShowWindowSystemMenu(SdlWindow window, int x, int y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ShowWindowSystemMenu(SdlWindow window, int x, int y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ShowWindowSystemMenu(window, x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowHitTest")]
|
|
private static partial byte _SetWindowHitTest(
|
|
SdlWindow window,
|
|
delegate* unmanaged[Cdecl]<SdlWindow, SdlPoint*, void*, SdlHitTestResult> callback,
|
|
void* callback_data
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowHitTest(
|
|
SdlWindow window,
|
|
delegate* unmanaged[Cdecl]<SdlWindow, SdlPoint*, void*, SdlHitTestResult> callback,
|
|
void* callback_data
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowHitTest(window, callback, callback_data);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowShape")]
|
|
private static partial byte _SetWindowShape(SdlWindow window, SdlSurface* shape);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowShape(SdlWindow window, SdlSurface* shape)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowShape(window, shape);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_FlashWindow")]
|
|
private static partial byte _FlashWindow(SdlWindow window, SdlFlashOperation operation);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte FlashWindow(SdlWindow window, SdlFlashOperation operation)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _FlashWindow(window, operation);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowProgressState")]
|
|
private static partial byte _SetWindowProgressState(SdlWindow window, SdlProgressState state);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowProgressState(SdlWindow window, SdlProgressState state)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowProgressState(window, state);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowProgressState")]
|
|
private static partial SdlProgressState _GetWindowProgressState(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlProgressState GetWindowProgressState(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowProgressState(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowProgressValue")]
|
|
private static partial byte _SetWindowProgressValue(SdlWindow window, float value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowProgressValue(SdlWindow window, float value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowProgressValue(window, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowProgressValue")]
|
|
private static partial float _GetWindowProgressValue(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float GetWindowProgressValue(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowProgressValue(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyWindow")]
|
|
private static partial void _DestroyWindow(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyWindow(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyWindow(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ScreenSaverEnabled")]
|
|
private static partial byte _ScreenSaverEnabled();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ScreenSaverEnabled()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ScreenSaverEnabled();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_EnableScreenSaver")]
|
|
private static partial byte _EnableScreenSaver();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte EnableScreenSaver()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _EnableScreenSaver();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DisableScreenSaver")]
|
|
private static partial byte _DisableScreenSaver();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte DisableScreenSaver()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _DisableScreenSaver();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GL_LoadLibrary",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _GLLoadLibrary(string path);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GLLoadLibrary(string path)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLLoadLibrary(path);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GL_GetProcAddress",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial delegate* unmanaged[Cdecl]<void> _GLGetProcAddress(string proc);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static delegate* unmanaged[Cdecl]<void> GLGetProcAddress(string proc)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLGetProcAddress(proc);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_EGL_GetProcAddress",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial delegate* unmanaged[Cdecl]<void> _EGLGetProcAddress(string proc);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static delegate* unmanaged[Cdecl]<void> EGLGetProcAddress(string proc)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _EGLGetProcAddress(proc);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GL_UnloadLibrary")]
|
|
private static partial void _GLUnloadLibrary();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void GLUnloadLibrary()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_GLUnloadLibrary();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GL_ExtensionSupported",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _GLExtensionSupported(string extension);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GLExtensionSupported(string extension)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLExtensionSupported(extension);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GL_ResetAttributes")]
|
|
private static partial void _GLResetAttributes();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void GLResetAttributes()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_GLResetAttributes();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GL_SetAttribute")]
|
|
private static partial byte _GLSetAttribute(SdlGLAttr attr, int value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GLSetAttribute(SdlGLAttr attr, int value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLSetAttribute(attr, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GL_GetAttribute")]
|
|
private static partial byte _GLGetAttribute(SdlGLAttr attr, int* value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GLGetAttribute(SdlGLAttr attr, int* value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLGetAttribute(attr, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GL_CreateContext")]
|
|
private static partial nint _GLCreateContext(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint GLCreateContext(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLCreateContext(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GL_MakeCurrent")]
|
|
private static partial byte _GLMakeCurrent(SdlWindow window, nint context);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GLMakeCurrent(SdlWindow window, nint context)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLMakeCurrent(window, context);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GL_GetCurrentWindow")]
|
|
private static partial SdlWindow _GLGetCurrentWindow();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindow GLGetCurrentWindow()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLGetCurrentWindow();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GL_GetCurrentContext")]
|
|
private static partial nint _GLGetCurrentContext();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint GLGetCurrentContext()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLGetCurrentContext();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_EGL_GetCurrentDisplay")]
|
|
private static partial void* _EGLGetCurrentDisplay();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* EGLGetCurrentDisplay()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _EGLGetCurrentDisplay();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_EGL_GetCurrentConfig")]
|
|
private static partial void* _EGLGetCurrentConfig();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* EGLGetCurrentConfig()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _EGLGetCurrentConfig();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_EGL_GetWindowSurface")]
|
|
private static partial void* _EGLGetWindowSurface(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* EGLGetWindowSurface(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _EGLGetWindowSurface(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_EGL_SetAttributeCallbacks")]
|
|
private static partial void _EGLSetAttributeCallbacks(
|
|
delegate* unmanaged[Cdecl]<void*, long*> platformAttribCallback,
|
|
delegate* unmanaged[Cdecl]<void*, void*, void*, int*> surfaceAttribCallback,
|
|
delegate* unmanaged[Cdecl]<void*, void*, void*, int*> contextAttribCallback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void EGLSetAttributeCallbacks(
|
|
delegate* unmanaged[Cdecl]<void*, long*> platformAttribCallback,
|
|
delegate* unmanaged[Cdecl]<void*, void*, void*, int*> surfaceAttribCallback,
|
|
delegate* unmanaged[Cdecl]<void*, void*, void*, int*> contextAttribCallback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_EGLSetAttributeCallbacks(
|
|
platformAttribCallback,
|
|
surfaceAttribCallback,
|
|
contextAttribCallback,
|
|
userdata
|
|
);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GL_SetSwapInterval")]
|
|
private static partial byte _GLSetSwapInterval(int interval);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GLSetSwapInterval(int interval)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLSetSwapInterval(interval);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GL_GetSwapInterval")]
|
|
private static partial byte _GLGetSwapInterval(int* interval);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GLGetSwapInterval(int* interval)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLGetSwapInterval(interval);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GL_SwapWindow")]
|
|
private static partial byte _GLSwapWindow(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GLSwapWindow(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLSwapWindow(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GL_DestroyContext")]
|
|
private static partial byte _GLDestroyContext(nint context);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GLDestroyContext(nint context)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GLDestroyContext(context);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_ShowOpenFileDialog",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void _ShowOpenFileDialog(
|
|
delegate* unmanaged[Cdecl]<void*, byte**, int, void> callback,
|
|
void* userdata,
|
|
SdlWindow window,
|
|
SdlDialogFileFilter* filters,
|
|
int nfilters,
|
|
string default_location,
|
|
byte allow_many
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ShowOpenFileDialog(
|
|
delegate* unmanaged[Cdecl]<void*, byte**, int, void> callback,
|
|
void* userdata,
|
|
SdlWindow window,
|
|
SdlDialogFileFilter* filters,
|
|
int nfilters,
|
|
string default_location,
|
|
byte allow_many
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ShowOpenFileDialog(callback, userdata, window, filters, nfilters, default_location, allow_many);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_ShowSaveFileDialog",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void _ShowSaveFileDialog(
|
|
delegate* unmanaged[Cdecl]<void*, byte**, int, void> callback,
|
|
void* userdata,
|
|
SdlWindow window,
|
|
SdlDialogFileFilter* filters,
|
|
int nfilters,
|
|
string default_location
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ShowSaveFileDialog(
|
|
delegate* unmanaged[Cdecl]<void*, byte**, int, void> callback,
|
|
void* userdata,
|
|
SdlWindow window,
|
|
SdlDialogFileFilter* filters,
|
|
int nfilters,
|
|
string default_location
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ShowSaveFileDialog(callback, userdata, window, filters, nfilters, default_location);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_ShowOpenFolderDialog",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void _ShowOpenFolderDialog(
|
|
delegate* unmanaged[Cdecl]<void*, byte**, int, void> callback,
|
|
void* userdata,
|
|
SdlWindow window,
|
|
string default_location,
|
|
byte allow_many
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ShowOpenFolderDialog(
|
|
delegate* unmanaged[Cdecl]<void*, byte**, int, void> callback,
|
|
void* userdata,
|
|
SdlWindow window,
|
|
string default_location,
|
|
byte allow_many
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ShowOpenFolderDialog(callback, userdata, window, default_location, allow_many);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ShowFileDialogWithProperties")]
|
|
private static partial void _ShowFileDialogWithProperties(
|
|
SdlFileDialogType type,
|
|
delegate* unmanaged[Cdecl]<void*, byte**, int, void> callback,
|
|
void* userdata,
|
|
uint props
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ShowFileDialogWithProperties(
|
|
SdlFileDialogType type,
|
|
delegate* unmanaged[Cdecl]<void*, byte**, int, void> callback,
|
|
void* userdata,
|
|
uint props
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ShowFileDialogWithProperties(type, callback, userdata, props);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GUIDToString")]
|
|
private static partial void _GuidToString(SdlGuid guid, byte* pszGUID, int cbGUID);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void GuidToString(SdlGuid guid, byte* pszGUID, int cbGUID)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_GuidToString(guid, pszGUID, cbGUID);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_StringToGUID",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlGuid _StringToGuid(string pchGUID);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGuid StringToGuid(string pchGUID)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _StringToGuid(pchGUID);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetPowerInfo")]
|
|
private static partial SdlPowerState _GetPowerInfo(int* seconds, int* percent);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPowerState GetPowerInfo(int* seconds, int* percent)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPowerInfo(seconds, percent);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSensors")]
|
|
private static partial uint* _GetSensors(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint* GetSensors(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSensors(count);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetSensorNameForID",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetSensorNameForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetSensorNameForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSensorNameForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSensorTypeForID")]
|
|
private static partial SdlSensorType _GetSensorTypeForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSensorType GetSensorTypeForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSensorTypeForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSensorNonPortableTypeForID")]
|
|
private static partial int _GetSensorNonPortableTypeForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetSensorNonPortableTypeForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSensorNonPortableTypeForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OpenSensor")]
|
|
private static partial nint _OpenSensor(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint OpenSensor(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenSensor(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSensorFromID")]
|
|
private static partial nint _GetSensorFromID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint GetSensorFromID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSensorFromID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSensorProperties")]
|
|
private static partial uint _GetSensorProperties(nint sensor);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetSensorProperties(nint sensor)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSensorProperties(sensor);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetSensorName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetSensorName(nint sensor);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetSensorName(nint sensor)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSensorName(sensor);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSensorType")]
|
|
private static partial SdlSensorType _GetSensorType(nint sensor);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSensorType GetSensorType(nint sensor)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSensorType(sensor);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSensorNonPortableType")]
|
|
private static partial int _GetSensorNonPortableType(nint sensor);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetSensorNonPortableType(nint sensor)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSensorNonPortableType(sensor);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSensorID")]
|
|
private static partial uint _GetSensorID(nint sensor);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetSensorID(nint sensor)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSensorID(sensor);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSensorData")]
|
|
private static partial byte _GetSensorData(nint sensor, float* data, int num_values);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetSensorData(nint sensor, float* data, int num_values)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSensorData(sensor, data, num_values);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CloseSensor")]
|
|
private static partial void _CloseSensor(nint sensor);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void CloseSensor(nint sensor)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_CloseSensor(sensor);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UpdateSensors")]
|
|
private static partial void _UpdateSensors();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UpdateSensors()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UpdateSensors();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LockJoysticks")]
|
|
private static partial void _LockJoysticks();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void LockJoysticks()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_LockJoysticks();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UnlockJoysticks")]
|
|
private static partial void _UnlockJoysticks();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UnlockJoysticks()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UnlockJoysticks();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasJoystick")]
|
|
private static partial byte _HasJoystick();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasJoystick()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasJoystick();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoysticks")]
|
|
private static partial uint* _GetJoysticks(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint* GetJoysticks(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoysticks(count);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetJoystickNameForID",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetJoystickNameForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetJoystickNameForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickNameForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetJoystickPathForID",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetJoystickPathForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetJoystickPathForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickPathForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickPlayerIndexForID")]
|
|
private static partial int _GetJoystickPlayerIndexForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetJoystickPlayerIndexForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickPlayerIndexForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickGUIDForID")]
|
|
private static partial SdlGuid _GetJoystickGuidForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGuid GetJoystickGuidForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickGuidForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickVendorForID")]
|
|
private static partial ushort _GetJoystickVendorForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetJoystickVendorForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickVendorForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickProductForID")]
|
|
private static partial ushort _GetJoystickProductForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetJoystickProductForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickProductForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickProductVersionForID")]
|
|
private static partial ushort _GetJoystickProductVersionForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetJoystickProductVersionForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickProductVersionForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickTypeForID")]
|
|
private static partial SdlJoystickType _GetJoystickTypeForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlJoystickType GetJoystickTypeForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickTypeForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OpenJoystick")]
|
|
private static partial SdlJoystick _OpenJoystick(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlJoystick OpenJoystick(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenJoystick(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickFromID")]
|
|
private static partial SdlJoystick _GetJoystickFromID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlJoystick GetJoystickFromID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickFromID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickFromPlayerIndex")]
|
|
private static partial SdlJoystick _GetJoystickFromPlayerIndex(int player_index);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlJoystick GetJoystickFromPlayerIndex(int player_index)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickFromPlayerIndex(player_index);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AttachVirtualJoystick")]
|
|
private static partial uint _AttachVirtualJoystick(SdlVirtualJoystickDesc* desc);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint AttachVirtualJoystick(SdlVirtualJoystickDesc* desc)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AttachVirtualJoystick(desc);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DetachVirtualJoystick")]
|
|
private static partial byte _DetachVirtualJoystick(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte DetachVirtualJoystick(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _DetachVirtualJoystick(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_IsJoystickVirtual")]
|
|
private static partial byte _IsJoystickVirtual(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte IsJoystickVirtual(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IsJoystickVirtual(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetJoystickVirtualAxis")]
|
|
private static partial byte _SetJoystickVirtualAxis(SdlJoystick joystick, int axis, short value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetJoystickVirtualAxis(SdlJoystick joystick, int axis, short value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetJoystickVirtualAxis(joystick, axis, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetJoystickVirtualBall")]
|
|
private static partial byte _SetJoystickVirtualBall(SdlJoystick joystick, int ball, short xrel, short yrel);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetJoystickVirtualBall(SdlJoystick joystick, int ball, short xrel, short yrel)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetJoystickVirtualBall(joystick, ball, xrel, yrel);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetJoystickVirtualButton")]
|
|
private static partial byte _SetJoystickVirtualButton(SdlJoystick joystick, int button, byte down);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetJoystickVirtualButton(SdlJoystick joystick, int button, byte down)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetJoystickVirtualButton(joystick, button, down);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetJoystickVirtualHat")]
|
|
private static partial byte _SetJoystickVirtualHat(SdlJoystick joystick, int hat, byte value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetJoystickVirtualHat(SdlJoystick joystick, int hat, byte value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetJoystickVirtualHat(joystick, hat, value);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetJoystickVirtualTouchpad")]
|
|
private static partial byte _SetJoystickVirtualTouchpad(
|
|
SdlJoystick joystick,
|
|
int touchpad,
|
|
int finger,
|
|
byte down,
|
|
float x,
|
|
float y,
|
|
float pressure
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetJoystickVirtualTouchpad(
|
|
SdlJoystick joystick,
|
|
int touchpad,
|
|
int finger,
|
|
byte down,
|
|
float x,
|
|
float y,
|
|
float pressure
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetJoystickVirtualTouchpad(joystick, touchpad, finger, down, x, y, pressure);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SendJoystickVirtualSensorData")]
|
|
private static partial byte _SendJoystickVirtualSensorData(
|
|
SdlJoystick joystick,
|
|
SdlSensorType type,
|
|
ulong sensor_timestamp,
|
|
float* data,
|
|
int num_values
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SendJoystickVirtualSensorData(
|
|
SdlJoystick joystick,
|
|
SdlSensorType type,
|
|
ulong sensor_timestamp,
|
|
float* data,
|
|
int num_values
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SendJoystickVirtualSensorData(joystick, type, sensor_timestamp, data, num_values);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickProperties")]
|
|
private static partial uint _GetJoystickProperties(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetJoystickProperties(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickProperties(joystick);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetJoystickName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetJoystickName(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetJoystickName(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickName(joystick);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetJoystickPath",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetJoystickPath(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetJoystickPath(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickPath(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickPlayerIndex")]
|
|
private static partial int _GetJoystickPlayerIndex(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetJoystickPlayerIndex(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickPlayerIndex(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetJoystickPlayerIndex")]
|
|
private static partial byte _SetJoystickPlayerIndex(SdlJoystick joystick, int player_index);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetJoystickPlayerIndex(SdlJoystick joystick, int player_index)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetJoystickPlayerIndex(joystick, player_index);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickGUID")]
|
|
private static partial SdlGuid _GetJoystickGuid(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGuid GetJoystickGuid(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickGuid(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickVendor")]
|
|
private static partial ushort _GetJoystickVendor(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetJoystickVendor(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickVendor(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickProduct")]
|
|
private static partial ushort _GetJoystickProduct(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetJoystickProduct(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickProduct(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickProductVersion")]
|
|
private static partial ushort _GetJoystickProductVersion(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetJoystickProductVersion(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickProductVersion(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickFirmwareVersion")]
|
|
private static partial ushort _GetJoystickFirmwareVersion(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetJoystickFirmwareVersion(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickFirmwareVersion(joystick);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetJoystickSerial",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetJoystickSerial(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetJoystickSerial(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickSerial(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickType")]
|
|
private static partial SdlJoystickType _GetJoystickType(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlJoystickType GetJoystickType(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickType(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickGUIDInfo")]
|
|
private static partial void _GetJoystickGuidInfo(
|
|
SdlGuid guid,
|
|
ushort* vendor,
|
|
ushort* product,
|
|
ushort* version,
|
|
ushort* crc16
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void GetJoystickGuidInfo(
|
|
SdlGuid guid,
|
|
ushort* vendor,
|
|
ushort* product,
|
|
ushort* version,
|
|
ushort* crc16
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_GetJoystickGuidInfo(guid, vendor, product, version, crc16);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_JoystickConnected")]
|
|
private static partial byte _JoystickConnected(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte JoystickConnected(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _JoystickConnected(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickID")]
|
|
private static partial uint _GetJoystickID(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetJoystickID(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickID(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumJoystickAxes")]
|
|
private static partial int _GetNumJoystickAxes(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumJoystickAxes(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumJoystickAxes(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumJoystickBalls")]
|
|
private static partial int _GetNumJoystickBalls(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumJoystickBalls(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumJoystickBalls(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumJoystickHats")]
|
|
private static partial int _GetNumJoystickHats(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumJoystickHats(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumJoystickHats(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumJoystickButtons")]
|
|
private static partial int _GetNumJoystickButtons(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumJoystickButtons(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumJoystickButtons(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetJoystickEventsEnabled")]
|
|
private static partial void _SetJoystickEventsEnabled(byte enabled);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetJoystickEventsEnabled(byte enabled)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetJoystickEventsEnabled(enabled);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_JoystickEventsEnabled")]
|
|
private static partial byte _JoystickEventsEnabled();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte JoystickEventsEnabled()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _JoystickEventsEnabled();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UpdateJoysticks")]
|
|
private static partial void _UpdateJoysticks();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UpdateJoysticks()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UpdateJoysticks();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickAxis")]
|
|
private static partial short _GetJoystickAxis(SdlJoystick joystick, int axis);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static short GetJoystickAxis(SdlJoystick joystick, int axis)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickAxis(joystick, axis);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickAxisInitialState")]
|
|
private static partial byte _GetJoystickAxisInitialState(SdlJoystick joystick, int axis, short* state);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetJoystickAxisInitialState(SdlJoystick joystick, int axis, short* state)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickAxisInitialState(joystick, axis, state);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickBall")]
|
|
private static partial byte _GetJoystickBall(SdlJoystick joystick, int ball, int* dx, int* dy);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetJoystickBall(SdlJoystick joystick, int ball, int* dx, int* dy)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickBall(joystick, ball, dx, dy);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickHat")]
|
|
private static partial byte _GetJoystickHat(SdlJoystick joystick, int hat);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetJoystickHat(SdlJoystick joystick, int hat)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickHat(joystick, hat);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickButton")]
|
|
private static partial byte _GetJoystickButton(SdlJoystick joystick, int button);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetJoystickButton(SdlJoystick joystick, int button)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickButton(joystick, button);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RumbleJoystick")]
|
|
private static partial byte _RumbleJoystick(
|
|
SdlJoystick joystick,
|
|
ushort low_frequency_rumble,
|
|
ushort high_frequency_rumble,
|
|
uint duration_ms
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RumbleJoystick(
|
|
SdlJoystick joystick,
|
|
ushort low_frequency_rumble,
|
|
ushort high_frequency_rumble,
|
|
uint duration_ms
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RumbleJoystick(joystick, low_frequency_rumble, high_frequency_rumble, duration_ms);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RumbleJoystickTriggers")]
|
|
private static partial byte _RumbleJoystickTriggers(
|
|
SdlJoystick joystick,
|
|
ushort left_rumble,
|
|
ushort right_rumble,
|
|
uint duration_ms
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RumbleJoystickTriggers(
|
|
SdlJoystick joystick,
|
|
ushort left_rumble,
|
|
ushort right_rumble,
|
|
uint duration_ms
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RumbleJoystickTriggers(joystick, left_rumble, right_rumble, duration_ms);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetJoystickLED")]
|
|
private static partial byte _SetJoystickLED(SdlJoystick joystick, byte red, byte green, byte blue);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetJoystickLED(SdlJoystick joystick, byte red, byte green, byte blue)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetJoystickLED(joystick, red, green, blue);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SendJoystickEffect")]
|
|
private static partial byte _SendJoystickEffect(SdlJoystick joystick, void* data, int size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SendJoystickEffect(SdlJoystick joystick, void* data, int size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SendJoystickEffect(joystick, data, size);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CloseJoystick")]
|
|
private static partial void _CloseJoystick(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void CloseJoystick(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_CloseJoystick(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickConnectionState")]
|
|
private static partial SdlJoystickConnectionState _GetJoystickConnectionState(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlJoystickConnectionState GetJoystickConnectionState(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickConnectionState(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetJoystickPowerInfo")]
|
|
private static partial SdlPowerState _GetJoystickPowerInfo(SdlJoystick joystick, int* percent);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPowerState GetJoystickPowerInfo(SdlJoystick joystick, int* percent)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetJoystickPowerInfo(joystick, percent);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_AddGamepadMapping",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial int _AddGamepadMapping(string mapping);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int AddGamepadMapping(string mapping)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AddGamepadMapping(mapping);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AddGamepadMappingsFromIO")]
|
|
private static partial int _AddGamepadMappingsFromIO(nint src, byte closeio);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int AddGamepadMappingsFromIO(nint src, byte closeio)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AddGamepadMappingsFromIO(src, closeio);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_AddGamepadMappingsFromFile",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial int _AddGamepadMappingsFromFile(string file);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int AddGamepadMappingsFromFile(string file)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AddGamepadMappingsFromFile(file);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReloadGamepadMappings")]
|
|
private static partial byte _ReloadGamepadMappings();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReloadGamepadMappings()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReloadGamepadMappings();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadMappings")]
|
|
private static partial byte** _GetGamepadMappings(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte** GetGamepadMappings(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadMappings(count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadMappingForGUID")]
|
|
private static partial byte* _GetGamepadMappingForGuid(SdlGuid guid);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* GetGamepadMappingForGuid(SdlGuid guid)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadMappingForGuid(guid);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadMapping")]
|
|
private static partial byte* _GetGamepadMapping(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* GetGamepadMapping(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadMapping(gamepad);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetGamepadMapping",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetGamepadMapping(uint instance_id, string mapping);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetGamepadMapping(uint instance_id, string mapping)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetGamepadMapping(instance_id, mapping);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasGamepad")]
|
|
private static partial byte _HasGamepad();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasGamepad()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasGamepad();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepads")]
|
|
private static partial uint* _GetGamepads(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint* GetGamepads(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepads(count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_IsGamepad")]
|
|
private static partial byte _IsGamepad(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte IsGamepad(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IsGamepad(instance_id);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadNameForID",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetGamepadNameForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetGamepadNameForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadNameForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadPathForID",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetGamepadPathForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetGamepadPathForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadPathForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadPlayerIndexForID")]
|
|
private static partial int _GetGamepadPlayerIndexForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetGamepadPlayerIndexForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadPlayerIndexForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadGUIDForID")]
|
|
private static partial SdlGuid _GetGamepadGuidForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGuid GetGamepadGuidForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadGuidForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadVendorForID")]
|
|
private static partial ushort _GetGamepadVendorForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetGamepadVendorForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadVendorForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadProductForID")]
|
|
private static partial ushort _GetGamepadProductForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetGamepadProductForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadProductForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadProductVersionForID")]
|
|
private static partial ushort _GetGamepadProductVersionForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetGamepadProductVersionForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadProductVersionForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadTypeForID")]
|
|
private static partial SdlGamepadType _GetGamepadTypeForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGamepadType GetGamepadTypeForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadTypeForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRealGamepadTypeForID")]
|
|
private static partial SdlGamepadType _GetRealGamepadTypeForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGamepadType GetRealGamepadTypeForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRealGamepadTypeForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadMappingForID")]
|
|
private static partial byte* _GetGamepadMappingForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* GetGamepadMappingForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadMappingForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OpenGamepad")]
|
|
private static partial SdlGamepad _OpenGamepad(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGamepad OpenGamepad(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenGamepad(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadFromID")]
|
|
private static partial SdlGamepad _GetGamepadFromID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGamepad GetGamepadFromID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadFromID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadFromPlayerIndex")]
|
|
private static partial SdlGamepad _GetGamepadFromPlayerIndex(int player_index);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGamepad GetGamepadFromPlayerIndex(int player_index)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadFromPlayerIndex(player_index);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadProperties")]
|
|
private static partial uint _GetGamepadProperties(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetGamepadProperties(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadProperties(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadID")]
|
|
private static partial uint _GetGamepadID(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetGamepadID(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadID(gamepad);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetGamepadName(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetGamepadName(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadName(gamepad);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadPath",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetGamepadPath(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetGamepadPath(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadPath(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadType")]
|
|
private static partial SdlGamepadType _GetGamepadType(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGamepadType GetGamepadType(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadType(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRealGamepadType")]
|
|
private static partial SdlGamepadType _GetRealGamepadType(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGamepadType GetRealGamepadType(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRealGamepadType(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadPlayerIndex")]
|
|
private static partial int _GetGamepadPlayerIndex(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetGamepadPlayerIndex(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadPlayerIndex(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetGamepadPlayerIndex")]
|
|
private static partial byte _SetGamepadPlayerIndex(SdlGamepad gamepad, int player_index);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetGamepadPlayerIndex(SdlGamepad gamepad, int player_index)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetGamepadPlayerIndex(gamepad, player_index);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadVendor")]
|
|
private static partial ushort _GetGamepadVendor(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetGamepadVendor(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadVendor(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadProduct")]
|
|
private static partial ushort _GetGamepadProduct(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetGamepadProduct(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadProduct(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadProductVersion")]
|
|
private static partial ushort _GetGamepadProductVersion(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetGamepadProductVersion(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadProductVersion(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadFirmwareVersion")]
|
|
private static partial ushort _GetGamepadFirmwareVersion(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetGamepadFirmwareVersion(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadFirmwareVersion(gamepad);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadSerial",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetGamepadSerial(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetGamepadSerial(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadSerial(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadSteamHandle")]
|
|
private static partial ulong _GetGamepadSteamHandle(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ulong GetGamepadSteamHandle(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadSteamHandle(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadConnectionState")]
|
|
private static partial SdlJoystickConnectionState _GetGamepadConnectionState(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlJoystickConnectionState GetGamepadConnectionState(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadConnectionState(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadPowerInfo")]
|
|
private static partial SdlPowerState _GetGamepadPowerInfo(SdlGamepad gamepad, int* percent);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPowerState GetGamepadPowerInfo(SdlGamepad gamepad, int* percent)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadPowerInfo(gamepad, percent);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GamepadConnected")]
|
|
private static partial byte _GamepadConnected(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GamepadConnected(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GamepadConnected(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadJoystick")]
|
|
private static partial SdlJoystick _GetGamepadJoystick(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlJoystick GetGamepadJoystick(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadJoystick(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetGamepadEventsEnabled")]
|
|
private static partial void _SetGamepadEventsEnabled(byte enabled);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetGamepadEventsEnabled(byte enabled)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetGamepadEventsEnabled(enabled);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GamepadEventsEnabled")]
|
|
private static partial byte _GamepadEventsEnabled();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GamepadEventsEnabled()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GamepadEventsEnabled();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadBindings")]
|
|
private static partial nint* _GetGamepadBindings(SdlGamepad gamepad, int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint* GetGamepadBindings(SdlGamepad gamepad, int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadBindings(gamepad, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UpdateGamepads")]
|
|
private static partial void _UpdateGamepads();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UpdateGamepads()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UpdateGamepads();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadTypeFromString",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlGamepadType _GetGamepadTypeFromString(string str);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGamepadType GetGamepadTypeFromString(string str)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadTypeFromString(str);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadStringForType",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetGamepadStringForType(SdlGamepadType type);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetGamepadStringForType(SdlGamepadType type)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadStringForType(type);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadAxisFromString",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlGamepadAxis _GetGamepadAxisFromString(string str);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGamepadAxis GetGamepadAxisFromString(string str)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadAxisFromString(str);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadStringForAxis",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetGamepadStringForAxis(SdlGamepadAxis axis);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetGamepadStringForAxis(SdlGamepadAxis axis)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadStringForAxis(axis);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GamepadHasAxis")]
|
|
private static partial byte _GamepadHasAxis(SdlGamepad gamepad, SdlGamepadAxis axis);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GamepadHasAxis(SdlGamepad gamepad, SdlGamepadAxis axis)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GamepadHasAxis(gamepad, axis);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadAxis")]
|
|
private static partial short _GetGamepadAxis(SdlGamepad gamepad, SdlGamepadAxis axis);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static short GetGamepadAxis(SdlGamepad gamepad, SdlGamepadAxis axis)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadAxis(gamepad, axis);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadButtonFromString",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlGamepadButton _GetGamepadButtonFromString(string str);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGamepadButton GetGamepadButtonFromString(string str)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadButtonFromString(str);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadStringForButton",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetGamepadStringForButton(SdlGamepadButton button);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetGamepadStringForButton(SdlGamepadButton button)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadStringForButton(button);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GamepadHasButton")]
|
|
private static partial byte _GamepadHasButton(SdlGamepad gamepad, SdlGamepadButton button);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GamepadHasButton(SdlGamepad gamepad, SdlGamepadButton button)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GamepadHasButton(gamepad, button);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadButton")]
|
|
private static partial byte _GetGamepadButton(SdlGamepad gamepad, SdlGamepadButton button);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetGamepadButton(SdlGamepad gamepad, SdlGamepadButton button)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadButton(gamepad, button);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadButtonLabelForType")]
|
|
private static partial SdlGamepadButtonLabel _GetGamepadButtonLabelForType(
|
|
SdlGamepadType type,
|
|
SdlGamepadButton button
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGamepadButtonLabel GetGamepadButtonLabelForType(
|
|
SdlGamepadType type,
|
|
SdlGamepadButton button
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadButtonLabelForType(type, button);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadButtonLabel")]
|
|
private static partial SdlGamepadButtonLabel _GetGamepadButtonLabel(
|
|
SdlGamepad gamepad,
|
|
SdlGamepadButton button
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGamepadButtonLabel GetGamepadButtonLabel(SdlGamepad gamepad, SdlGamepadButton button)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadButtonLabel(gamepad, button);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumGamepadTouchpads")]
|
|
private static partial int _GetNumGamepadTouchpads(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumGamepadTouchpads(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumGamepadTouchpads(gamepad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumGamepadTouchpadFingers")]
|
|
private static partial int _GetNumGamepadTouchpadFingers(SdlGamepad gamepad, int touchpad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumGamepadTouchpadFingers(SdlGamepad gamepad, int touchpad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumGamepadTouchpadFingers(gamepad, touchpad);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadTouchpadFinger")]
|
|
private static partial byte _GetGamepadTouchpadFinger(
|
|
SdlGamepad gamepad,
|
|
int touchpad,
|
|
int finger,
|
|
byte* down,
|
|
float* x,
|
|
float* y,
|
|
float* pressure
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetGamepadTouchpadFinger(
|
|
SdlGamepad gamepad,
|
|
int touchpad,
|
|
int finger,
|
|
byte* down,
|
|
float* x,
|
|
float* y,
|
|
float* pressure
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadTouchpadFinger(gamepad, touchpad, finger, down, x, y, pressure);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GamepadHasSensor")]
|
|
private static partial byte _GamepadHasSensor(SdlGamepad gamepad, SdlSensorType type);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GamepadHasSensor(SdlGamepad gamepad, SdlSensorType type)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GamepadHasSensor(gamepad, type);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetGamepadSensorEnabled")]
|
|
private static partial byte _SetGamepadSensorEnabled(SdlGamepad gamepad, SdlSensorType type, byte enabled);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetGamepadSensorEnabled(SdlGamepad gamepad, SdlSensorType type, byte enabled)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetGamepadSensorEnabled(gamepad, type, enabled);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GamepadSensorEnabled")]
|
|
private static partial byte _GamepadSensorEnabled(SdlGamepad gamepad, SdlSensorType type);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GamepadSensorEnabled(SdlGamepad gamepad, SdlSensorType type)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GamepadSensorEnabled(gamepad, type);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadSensorDataRate")]
|
|
private static partial float _GetGamepadSensorDataRate(SdlGamepad gamepad, SdlSensorType type);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static float GetGamepadSensorDataRate(SdlGamepad gamepad, SdlSensorType type)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadSensorDataRate(gamepad, type);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGamepadSensorData")]
|
|
private static partial byte _GetGamepadSensorData(
|
|
SdlGamepad gamepad,
|
|
SdlSensorType type,
|
|
float* data,
|
|
int num_values
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetGamepadSensorData(SdlGamepad gamepad, SdlSensorType type, float* data, int num_values)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadSensorData(gamepad, type, data, num_values);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RumbleGamepad")]
|
|
private static partial byte _RumbleGamepad(
|
|
SdlGamepad gamepad,
|
|
ushort low_frequency_rumble,
|
|
ushort high_frequency_rumble,
|
|
uint duration_ms
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RumbleGamepad(
|
|
SdlGamepad gamepad,
|
|
ushort low_frequency_rumble,
|
|
ushort high_frequency_rumble,
|
|
uint duration_ms
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RumbleGamepad(gamepad, low_frequency_rumble, high_frequency_rumble, duration_ms);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RumbleGamepadTriggers")]
|
|
private static partial byte _RumbleGamepadTriggers(
|
|
SdlGamepad gamepad,
|
|
ushort left_rumble,
|
|
ushort right_rumble,
|
|
uint duration_ms
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RumbleGamepadTriggers(
|
|
SdlGamepad gamepad,
|
|
ushort left_rumble,
|
|
ushort right_rumble,
|
|
uint duration_ms
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RumbleGamepadTriggers(gamepad, left_rumble, right_rumble, duration_ms);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetGamepadLED")]
|
|
private static partial byte _SetGamepadLED(SdlGamepad gamepad, byte red, byte green, byte blue);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetGamepadLED(SdlGamepad gamepad, byte red, byte green, byte blue)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetGamepadLED(gamepad, red, green, blue);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SendGamepadEffect")]
|
|
private static partial byte _SendGamepadEffect(SdlGamepad gamepad, void* data, int size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SendGamepadEffect(SdlGamepad gamepad, void* data, int size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SendGamepadEffect(gamepad, data, size);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CloseGamepad")]
|
|
private static partial void _CloseGamepad(SdlGamepad gamepad);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void CloseGamepad(SdlGamepad gamepad)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_CloseGamepad(gamepad);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadAppleSFSymbolsNameForButton",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetGamepadAppleSFSymbolsNameForButton(
|
|
SdlGamepad gamepad,
|
|
SdlGamepadButton button
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetGamepadAppleSFSymbolsNameForButton(SdlGamepad gamepad, SdlGamepadButton button)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadAppleSFSymbolsNameForButton(gamepad, button);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGamepadAppleSFSymbolsNameForAxis",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetGamepadAppleSFSymbolsNameForAxis(
|
|
SdlGamepad gamepad,
|
|
SdlGamepadAxis axis
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetGamepadAppleSFSymbolsNameForAxis(SdlGamepad gamepad, SdlGamepadAxis axis)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGamepadAppleSFSymbolsNameForAxis(gamepad, axis);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasKeyboard")]
|
|
private static partial byte _HasKeyboard();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasKeyboard()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasKeyboard();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetKeyboards")]
|
|
private static partial uint* _GetKeyboards(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint* GetKeyboards(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetKeyboards(count);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetKeyboardNameForID",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetKeyboardNameForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetKeyboardNameForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetKeyboardNameForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetKeyboardFocus")]
|
|
private static partial SdlWindow _GetKeyboardFocus();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindow GetKeyboardFocus()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetKeyboardFocus();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetKeyboardState")]
|
|
private static partial byte* _GetKeyboardState(int* numkeys);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* GetKeyboardState(int* numkeys)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetKeyboardState(numkeys);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ResetKeyboard")]
|
|
private static partial void _ResetKeyboard();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ResetKeyboard()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ResetKeyboard();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetModState")]
|
|
private static partial ushort _GetModState();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ushort GetModState()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetModState();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetModState")]
|
|
private static partial void _SetModState(ushort modstate);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetModState(ushort modstate)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetModState(modstate);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetKeyFromScancode")]
|
|
private static partial SdlKeycode _GetKeyFromScancode(
|
|
SdlScancode scancode,
|
|
ushort modstate,
|
|
byte key_event
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlKeycode GetKeyFromScancode(SdlScancode scancode, ushort modstate, byte key_event)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetKeyFromScancode(scancode, modstate, key_event);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetScancodeFromKey")]
|
|
private static partial SdlScancode _GetScancodeFromKey(SdlKeycode key, ushort* modstate);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlScancode GetScancodeFromKey(SdlKeycode key, ushort* modstate)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetScancodeFromKey(key, modstate);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetScancodeName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetScancodeName(SdlScancode scancode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetScancodeName(SdlScancode scancode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetScancodeName(scancode);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetScancodeFromName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlScancode _GetScancodeFromName(string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlScancode GetScancodeFromName(string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetScancodeFromName(name);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetKeyName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetKeyName(SdlKeycode key);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetKeyName(SdlKeycode key)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetKeyName(key);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetKeyFromName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlKeycode _GetKeyFromName(string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlKeycode GetKeyFromName(string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetKeyFromName(name);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_StartTextInput")]
|
|
private static partial byte _StartTextInput(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte StartTextInput(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _StartTextInput(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_StartTextInputWithProperties")]
|
|
private static partial byte _StartTextInputWithProperties(SdlWindow window, uint props);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte StartTextInputWithProperties(SdlWindow window, uint props)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _StartTextInputWithProperties(window, props);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_TextInputActive")]
|
|
private static partial byte _TextInputActive(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte TextInputActive(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _TextInputActive(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_StopTextInput")]
|
|
private static partial byte _StopTextInput(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte StopTextInput(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _StopTextInput(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ClearComposition")]
|
|
private static partial byte _ClearComposition(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ClearComposition(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ClearComposition(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTextInputArea")]
|
|
private static partial byte _SetTextInputArea(SdlWindow window, SdlRect* rect, int cursor);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetTextInputArea(SdlWindow window, SdlRect* rect, int cursor)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetTextInputArea(window, rect, cursor);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTextInputArea")]
|
|
private static partial byte _GetTextInputArea(SdlWindow window, SdlRect* rect, int* cursor);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetTextInputArea(SdlWindow window, SdlRect* rect, int* cursor)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTextInputArea(window, rect, cursor);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasScreenKeyboardSupport")]
|
|
private static partial byte _HasScreenKeyboardSupport();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasScreenKeyboardSupport()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasScreenKeyboardSupport();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ScreenKeyboardShown")]
|
|
private static partial byte _ScreenKeyboardShown(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ScreenKeyboardShown(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ScreenKeyboardShown(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasMouse")]
|
|
private static partial byte _HasMouse();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasMouse()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasMouse();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetMice")]
|
|
private static partial uint* _GetMice(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint* GetMice(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetMice(count);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetMouseNameForID",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetMouseNameForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetMouseNameForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetMouseNameForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetMouseFocus")]
|
|
private static partial SdlWindow _GetMouseFocus();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindow GetMouseFocus()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetMouseFocus();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetMouseState")]
|
|
private static partial SdlMouseButtonFlags _GetMouseState(float* x, float* y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlMouseButtonFlags GetMouseState(float* x, float* y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetMouseState(x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGlobalMouseState")]
|
|
private static partial SdlMouseButtonFlags _GetGlobalMouseState(float* x, float* y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlMouseButtonFlags GetGlobalMouseState(float* x, float* y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGlobalMouseState(x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRelativeMouseState")]
|
|
private static partial SdlMouseButtonFlags _GetRelativeMouseState(float* x, float* y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlMouseButtonFlags GetRelativeMouseState(float* x, float* y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRelativeMouseState(x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WarpMouseInWindow")]
|
|
private static partial void _WarpMouseInWindow(SdlWindow window, float x, float y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void WarpMouseInWindow(SdlWindow window, float x, float y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_WarpMouseInWindow(window, x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WarpMouseGlobal")]
|
|
private static partial byte _WarpMouseGlobal(float x, float y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WarpMouseGlobal(float x, float y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WarpMouseGlobal(x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetRelativeMouseTransform")]
|
|
private static partial byte _SetRelativeMouseTransform(
|
|
delegate* unmanaged[Cdecl]<void*, ulong, SdlWindow, uint, float*, float*, void> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetRelativeMouseTransform(
|
|
delegate* unmanaged[Cdecl]<void*, ulong, SdlWindow, uint, float*, float*, void> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetRelativeMouseTransform(callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetWindowRelativeMouseMode")]
|
|
private static partial byte _SetWindowRelativeMouseMode(SdlWindow window, byte enabled);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetWindowRelativeMouseMode(SdlWindow window, byte enabled)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetWindowRelativeMouseMode(window, enabled);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowRelativeMouseMode")]
|
|
private static partial byte _GetWindowRelativeMouseMode(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetWindowRelativeMouseMode(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowRelativeMouseMode(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CaptureMouse")]
|
|
private static partial byte _CaptureMouse(byte enabled);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CaptureMouse(byte enabled)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CaptureMouse(enabled);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateCursor")]
|
|
private static partial SdlCursor _CreateCursor(byte* data, byte* mask, int w, int h, int hot_x, int hot_y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlCursor CreateCursor(byte* data, byte* mask, int w, int h, int hot_x, int hot_y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateCursor(data, mask, w, h, hot_x, hot_y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateColorCursor")]
|
|
private static partial SdlCursor _CreateColorCursor(SdlSurface* surface, int hot_x, int hot_y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlCursor CreateColorCursor(SdlSurface* surface, int hot_x, int hot_y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateColorCursor(surface, hot_x, hot_y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateAnimatedCursor")]
|
|
private static partial SdlCursor _CreateAnimatedCursor(
|
|
SdlCursorFrameInfo* frames,
|
|
int frame_count,
|
|
int hot_x,
|
|
int hot_y
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlCursor CreateAnimatedCursor(
|
|
SdlCursorFrameInfo* frames,
|
|
int frame_count,
|
|
int hot_x,
|
|
int hot_y
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateAnimatedCursor(frames, frame_count, hot_x, hot_y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateSystemCursor")]
|
|
private static partial SdlCursor _CreateSystemCursor(SdlSystemCursor id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlCursor CreateSystemCursor(SdlSystemCursor id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateSystemCursor(id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetCursor")]
|
|
private static partial byte _SetCursor(SdlCursor cursor);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetCursor(SdlCursor cursor)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetCursor(cursor);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCursor")]
|
|
private static partial SdlCursor _GetCursor();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlCursor GetCursor()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCursor();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDefaultCursor")]
|
|
private static partial SdlCursor _GetDefaultCursor();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlCursor GetDefaultCursor()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDefaultCursor();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyCursor")]
|
|
private static partial void _DestroyCursor(SdlCursor cursor);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyCursor(SdlCursor cursor)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyCursor(cursor);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ShowCursor")]
|
|
private static partial byte _ShowCursor();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ShowCursor()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ShowCursor();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HideCursor")]
|
|
private static partial byte _HideCursor();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HideCursor()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HideCursor();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CursorVisible")]
|
|
private static partial byte _CursorVisible();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CursorVisible()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CursorVisible();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTouchDevices")]
|
|
private static partial ulong* _GetTouchDevices(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ulong* GetTouchDevices(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTouchDevices(count);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetTouchDeviceName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetTouchDeviceName(ulong touchID);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetTouchDeviceName(ulong touchID)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTouchDeviceName(touchID);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTouchDeviceType")]
|
|
private static partial SdlTouchDeviceType _GetTouchDeviceType(ulong touchID);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlTouchDeviceType GetTouchDeviceType(ulong touchID)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTouchDeviceType(touchID);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTouchFingers")]
|
|
private static partial SdlFinger** _GetTouchFingers(ulong touchID, int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlFinger** GetTouchFingers(ulong touchID, int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTouchFingers(touchID, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetPenDeviceType")]
|
|
private static partial SdlPenDeviceType _GetPenDeviceType(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPenDeviceType GetPenDeviceType(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPenDeviceType(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PumpEvents")]
|
|
private static partial void _PumpEvents();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void PumpEvents()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_PumpEvents();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PeepEvents")]
|
|
private static partial int _PeepEvents(
|
|
SdlEvent* events,
|
|
int numevents,
|
|
SdlEventAction action,
|
|
uint minType,
|
|
uint maxType
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int PeepEvents(
|
|
SdlEvent* events,
|
|
int numevents,
|
|
SdlEventAction action,
|
|
uint minType,
|
|
uint maxType
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _PeepEvents(events, numevents, action, minType, maxType);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasEvent")]
|
|
private static partial byte _HasEvent(uint type);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasEvent(uint type)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasEvent(type);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HasEvents")]
|
|
private static partial byte _HasEvents(uint minType, uint maxType);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HasEvents(uint minType, uint maxType)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HasEvents(minType, maxType);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_FlushEvent")]
|
|
private static partial void _FlushEvent(uint type);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void FlushEvent(uint type)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_FlushEvent(type);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_FlushEvents")]
|
|
private static partial void _FlushEvents(uint minType, uint maxType);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void FlushEvents(uint minType, uint maxType)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_FlushEvents(minType, maxType);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PollEvent")]
|
|
private static partial byte _PollEvent(SdlEvent* @event);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte PollEvent(SdlEvent* @event)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _PollEvent(@event);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitEvent")]
|
|
private static partial byte _WaitEvent(SdlEvent* @event);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WaitEvent(SdlEvent* @event)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WaitEvent(@event);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitEventTimeout")]
|
|
private static partial byte _WaitEventTimeout(SdlEvent* @event, int timeoutMS);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WaitEventTimeout(SdlEvent* @event, int timeoutMS)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WaitEventTimeout(@event, timeoutMS);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PushEvent")]
|
|
private static partial byte _PushEvent(SdlEvent* @event);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte PushEvent(SdlEvent* @event)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _PushEvent(@event);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetEventFilter")]
|
|
private static partial void _SetEventFilter(
|
|
delegate* unmanaged[Cdecl]<void*, SdlEvent*, byte> filter,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetEventFilter(delegate* unmanaged[Cdecl]<void*, SdlEvent*, byte> filter, void* userdata)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetEventFilter(filter, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetEventFilter")]
|
|
private static partial byte _GetEventFilter(
|
|
delegate* unmanaged[Cdecl]<void*, SdlEvent*, byte>* filter,
|
|
void** userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetEventFilter(
|
|
delegate* unmanaged[Cdecl]<void*, SdlEvent*, byte>* filter,
|
|
void** userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetEventFilter(filter, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AddEventWatch")]
|
|
private static partial byte _AddEventWatch(
|
|
delegate* unmanaged[Cdecl]<void*, SdlEvent*, byte> filter,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte AddEventWatch(delegate* unmanaged[Cdecl]<void*, SdlEvent*, byte> filter, void* userdata)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AddEventWatch(filter, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RemoveEventWatch")]
|
|
private static partial void _RemoveEventWatch(
|
|
delegate* unmanaged[Cdecl]<void*, SdlEvent*, byte> filter,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void RemoveEventWatch(
|
|
delegate* unmanaged[Cdecl]<void*, SdlEvent*, byte> filter,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_RemoveEventWatch(filter, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_FilterEvents")]
|
|
private static partial void _FilterEvents(
|
|
delegate* unmanaged[Cdecl]<void*, SdlEvent*, byte> filter,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void FilterEvents(delegate* unmanaged[Cdecl]<void*, SdlEvent*, byte> filter, void* userdata)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_FilterEvents(filter, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetEventEnabled")]
|
|
private static partial void _SetEventEnabled(uint type, byte enabled);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetEventEnabled(uint type, byte enabled)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetEventEnabled(type, enabled);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_EventEnabled")]
|
|
private static partial byte _EventEnabled(uint type);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte EventEnabled(uint type)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _EventEnabled(type);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RegisterEvents")]
|
|
private static partial uint _RegisterEvents(int numevents);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint RegisterEvents(int numevents)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RegisterEvents(numevents);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetWindowFromEvent")]
|
|
private static partial SdlWindow _GetWindowFromEvent(SdlEvent* @event);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindow GetWindowFromEvent(SdlEvent* @event)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetWindowFromEvent(@event);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetEventDescription")]
|
|
private static partial int _GetEventDescription(SdlEvent* @event, byte* buf, int buflen);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetEventDescription(SdlEvent* @event, byte* buf, int buflen)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetEventDescription(@event, buf, buflen);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetBasePath",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetBasePath();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetBasePath()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetBasePath();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetPrefPath",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte* _GetPrefPath(string org, string app);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* GetPrefPath(string org, string app)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPrefPath(org, app);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetUserFolder",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetUserFolder(SdlFolder folder);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetUserFolder(SdlFolder folder)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetUserFolder(folder);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_CreateDirectory",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _CreateDirectory(string path);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CreateDirectory(string path)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateDirectory(path);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_EnumerateDirectory",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _EnumerateDirectory(
|
|
string path,
|
|
delegate* unmanaged[Cdecl]<void*, byte*, byte*, SdlEnumerationResult> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte EnumerateDirectory(
|
|
string path,
|
|
delegate* unmanaged[Cdecl]<void*, byte*, byte*, SdlEnumerationResult> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _EnumerateDirectory(path, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_RemovePath",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _RemovePath(string path);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RemovePath(string path)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RemovePath(path);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_RenamePath",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _RenamePath(string oldpath, string newpath);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenamePath(string oldpath, string newpath)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenamePath(oldpath, newpath);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_CopyFile",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _CopyFile(string oldpath, string newpath);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CopyFile(string oldpath, string newpath)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CopyFile(oldpath, newpath);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetPathInfo",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _GetPathInfo(string path, SdlPathInfo* info);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetPathInfo(string path, SdlPathInfo* info)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPathInfo(path, info);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GlobDirectory",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte** _GlobDirectory(string path, string pattern, SdlGlobFlags flags, int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte** GlobDirectory(string path, string pattern, SdlGlobFlags flags, int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GlobDirectory(path, pattern, flags, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCurrentDirectory")]
|
|
private static partial byte* _GetCurrentDirectory();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte* GetCurrentDirectory()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCurrentDirectory();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GPUSupportsShaderFormats",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _GpuSupportsShaderFormats(uint format_flags, string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GpuSupportsShaderFormats(uint format_flags, string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GpuSupportsShaderFormats(format_flags, name);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GPUSupportsProperties")]
|
|
private static partial byte _GpuSupportsProperties(uint props);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GpuSupportsProperties(uint props)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GpuSupportsProperties(props);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_CreateGPUDevice",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlGpuDevice _CreateGpuDevice(uint format_flags, byte debug_mode, string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGpuDevice CreateGpuDevice(uint format_flags, byte debug_mode, string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateGpuDevice(format_flags, debug_mode, name);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateGPUDeviceWithProperties")]
|
|
private static partial SdlGpuDevice _CreateGpuDeviceWithProperties(uint props);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGpuDevice CreateGpuDeviceWithProperties(uint props)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateGpuDeviceWithProperties(props);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyGPUDevice")]
|
|
private static partial void _DestroyGpuDevice(SdlGpuDevice device);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyGpuDevice(SdlGpuDevice device)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyGpuDevice(device);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumGPUDrivers")]
|
|
private static partial int _GetNumGpuDrivers();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumGpuDrivers()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumGpuDrivers();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGPUDriver",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetGpuDriver(int index);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetGpuDriver(int index)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGpuDriver(index);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetGPUDeviceDriver",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetGpuDeviceDriver(SdlGpuDevice device);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetGpuDeviceDriver(SdlGpuDevice device)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGpuDeviceDriver(device);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGPUShaderFormats")]
|
|
private static partial uint _GetGpuShaderFormats(SdlGpuDevice device);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetGpuShaderFormats(SdlGpuDevice device)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGpuShaderFormats(device);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGPUDeviceProperties")]
|
|
private static partial uint _GetGpuDeviceProperties(SdlGpuDevice device);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetGpuDeviceProperties(SdlGpuDevice device)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGpuDeviceProperties(device);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateGPUComputePipeline")]
|
|
private static partial nint _CreateGpuComputePipeline(
|
|
SdlGpuDevice device,
|
|
SdlGpuComputePipelineCreateInfo* createinfo
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateGpuComputePipeline(
|
|
SdlGpuDevice device,
|
|
SdlGpuComputePipelineCreateInfo* createinfo
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateGpuComputePipeline(device, createinfo);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateGPUGraphicsPipeline")]
|
|
private static partial nint _CreateGpuGraphicsPipeline(
|
|
SdlGpuDevice device,
|
|
SdlGpuGraphicsPipelineCreateInfo* createinfo
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateGpuGraphicsPipeline(
|
|
SdlGpuDevice device,
|
|
SdlGpuGraphicsPipelineCreateInfo* createinfo
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateGpuGraphicsPipeline(device, createinfo);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateGPUSampler")]
|
|
private static partial nint _CreateGpuSampler(SdlGpuDevice device, SdlGpuSamplerCreateInfo* createinfo);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateGpuSampler(SdlGpuDevice device, SdlGpuSamplerCreateInfo* createinfo)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateGpuSampler(device, createinfo);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateGPUShader")]
|
|
private static partial nint _CreateGpuShader(SdlGpuDevice device, SdlGpuShaderCreateInfo* createinfo);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateGpuShader(SdlGpuDevice device, SdlGpuShaderCreateInfo* createinfo)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateGpuShader(device, createinfo);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateGPUTexture")]
|
|
private static partial nint _CreateGpuTexture(SdlGpuDevice device, SdlGpuTextureCreateInfo* createinfo);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateGpuTexture(SdlGpuDevice device, SdlGpuTextureCreateInfo* createinfo)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateGpuTexture(device, createinfo);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateGPUBuffer")]
|
|
private static partial nint _CreateGpuBuffer(SdlGpuDevice device, SdlGpuBufferCreateInfo* createinfo);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateGpuBuffer(SdlGpuDevice device, SdlGpuBufferCreateInfo* createinfo)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateGpuBuffer(device, createinfo);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateGPUTransferBuffer")]
|
|
private static partial nint _CreateGpuTransferBuffer(
|
|
SdlGpuDevice device,
|
|
SdlGpuTransferBufferCreateInfo* createinfo
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateGpuTransferBuffer(SdlGpuDevice device, SdlGpuTransferBufferCreateInfo* createinfo)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateGpuTransferBuffer(device, createinfo);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetGPUBufferName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void _SetGpuBufferName(SdlGpuDevice device, nint buffer, string text);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetGpuBufferName(SdlGpuDevice device, nint buffer, string text)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetGpuBufferName(device, buffer, text);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetGPUTextureName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void _SetGpuTextureName(SdlGpuDevice device, nint texture, string text);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetGpuTextureName(SdlGpuDevice device, nint texture, string text)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetGpuTextureName(device, texture, text);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_InsertGPUDebugLabel",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void _InsertGpuDebugLabel(nint command_buffer, string text);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void InsertGpuDebugLabel(nint command_buffer, string text)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_InsertGpuDebugLabel(command_buffer, text);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_PushGPUDebugGroup",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void _PushGpuDebugGroup(nint command_buffer, string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void PushGpuDebugGroup(nint command_buffer, string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_PushGpuDebugGroup(command_buffer, name);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PopGPUDebugGroup")]
|
|
private static partial void _PopGpuDebugGroup(nint command_buffer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void PopGpuDebugGroup(nint command_buffer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_PopGpuDebugGroup(command_buffer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUTexture")]
|
|
private static partial void _ReleaseGpuTexture(SdlGpuDevice device, nint texture);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ReleaseGpuTexture(SdlGpuDevice device, nint texture)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ReleaseGpuTexture(device, texture);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUSampler")]
|
|
private static partial void _ReleaseGpuSampler(SdlGpuDevice device, nint sampler);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ReleaseGpuSampler(SdlGpuDevice device, nint sampler)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ReleaseGpuSampler(device, sampler);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUBuffer")]
|
|
private static partial void _ReleaseGpuBuffer(SdlGpuDevice device, nint buffer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ReleaseGpuBuffer(SdlGpuDevice device, nint buffer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ReleaseGpuBuffer(device, buffer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUTransferBuffer")]
|
|
private static partial void _ReleaseGpuTransferBuffer(SdlGpuDevice device, nint transfer_buffer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ReleaseGpuTransferBuffer(SdlGpuDevice device, nint transfer_buffer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ReleaseGpuTransferBuffer(device, transfer_buffer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUComputePipeline")]
|
|
private static partial void _ReleaseGpuComputePipeline(SdlGpuDevice device, nint compute_pipeline);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ReleaseGpuComputePipeline(SdlGpuDevice device, nint compute_pipeline)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ReleaseGpuComputePipeline(device, compute_pipeline);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUShader")]
|
|
private static partial void _ReleaseGpuShader(SdlGpuDevice device, nint shader);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ReleaseGpuShader(SdlGpuDevice device, nint shader)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ReleaseGpuShader(device, shader);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUGraphicsPipeline")]
|
|
private static partial void _ReleaseGpuGraphicsPipeline(SdlGpuDevice device, nint graphics_pipeline);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ReleaseGpuGraphicsPipeline(SdlGpuDevice device, nint graphics_pipeline)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ReleaseGpuGraphicsPipeline(device, graphics_pipeline);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AcquireGPUCommandBuffer")]
|
|
private static partial nint _AcquireGpuCommandBuffer(SdlGpuDevice device);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint AcquireGpuCommandBuffer(SdlGpuDevice device)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AcquireGpuCommandBuffer(device);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PushGPUVertexUniformData")]
|
|
private static partial void _PushGpuVertexUniformData(
|
|
nint command_buffer,
|
|
uint slot_index,
|
|
void* data,
|
|
uint length
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void PushGpuVertexUniformData(nint command_buffer, uint slot_index, void* data, uint length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_PushGpuVertexUniformData(command_buffer, slot_index, data, length);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PushGPUFragmentUniformData")]
|
|
private static partial void _PushGpuFragmentUniformData(
|
|
nint command_buffer,
|
|
uint slot_index,
|
|
void* data,
|
|
uint length
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void PushGpuFragmentUniformData(nint command_buffer, uint slot_index, void* data, uint length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_PushGpuFragmentUniformData(command_buffer, slot_index, data, length);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PushGPUComputeUniformData")]
|
|
private static partial void _PushGpuComputeUniformData(
|
|
nint command_buffer,
|
|
uint slot_index,
|
|
void* data,
|
|
uint length
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void PushGpuComputeUniformData(nint command_buffer, uint slot_index, void* data, uint length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_PushGpuComputeUniformData(command_buffer, slot_index, data, length);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BeginGPURenderPass")]
|
|
private static partial nint _BeginGpuRenderPass(
|
|
nint command_buffer,
|
|
SdlGpuColorTargetInfo* color_target_infos,
|
|
uint num_color_targets,
|
|
SdlGpuDepthStencilTargetInfo* depth_stencil_target_info
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint BeginGpuRenderPass(
|
|
nint command_buffer,
|
|
SdlGpuColorTargetInfo* color_target_infos,
|
|
uint num_color_targets,
|
|
SdlGpuDepthStencilTargetInfo* depth_stencil_target_info
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BeginGpuRenderPass(
|
|
command_buffer,
|
|
color_target_infos,
|
|
num_color_targets,
|
|
depth_stencil_target_info
|
|
);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUGraphicsPipeline")]
|
|
private static partial void _BindGpuGraphicsPipeline(nint render_pass, nint graphics_pipeline);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuGraphicsPipeline(nint render_pass, nint graphics_pipeline)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuGraphicsPipeline(render_pass, graphics_pipeline);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetGPUViewport")]
|
|
private static partial void _SetGpuViewport(nint render_pass, SdlGpuViewport* viewport);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetGpuViewport(nint render_pass, SdlGpuViewport* viewport)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetGpuViewport(render_pass, viewport);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetGPUScissor")]
|
|
private static partial void _SetGpuScissor(nint render_pass, SdlRect* scissor);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetGpuScissor(nint render_pass, SdlRect* scissor)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetGpuScissor(render_pass, scissor);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetGPUBlendConstants")]
|
|
private static partial void _SetGpuBlendConstants(nint render_pass, SdlFColor blend_constants);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetGpuBlendConstants(nint render_pass, SdlFColor blend_constants)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetGpuBlendConstants(render_pass, blend_constants);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetGPUStencilReference")]
|
|
private static partial void _SetGpuStencilReference(nint render_pass, byte reference);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetGpuStencilReference(nint render_pass, byte reference)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetGpuStencilReference(render_pass, reference);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUVertexBuffers")]
|
|
private static partial void _BindGpuVertexBuffers(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
SdlGpuBufferBinding* bindings,
|
|
uint num_bindings
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuVertexBuffers(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
SdlGpuBufferBinding* bindings,
|
|
uint num_bindings
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuVertexBuffers(render_pass, first_slot, bindings, num_bindings);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUIndexBuffer")]
|
|
private static partial void _BindGpuIndexBuffer(
|
|
nint render_pass,
|
|
SdlGpuBufferBinding* binding,
|
|
SdlGpuIndexElementSize index_element_size
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuIndexBuffer(
|
|
nint render_pass,
|
|
SdlGpuBufferBinding* binding,
|
|
SdlGpuIndexElementSize index_element_size
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuIndexBuffer(render_pass, binding, index_element_size);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUVertexSamplers")]
|
|
private static partial void _BindGpuVertexSamplers(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
SdlGpuTextureSamplerBinding* texture_sampler_bindings,
|
|
uint num_bindings
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuVertexSamplers(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
SdlGpuTextureSamplerBinding* texture_sampler_bindings,
|
|
uint num_bindings
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuVertexSamplers(render_pass, first_slot, texture_sampler_bindings, num_bindings);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUVertexStorageTextures")]
|
|
private static partial void _BindGpuVertexStorageTextures(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
nint* storage_textures,
|
|
uint num_bindings
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuVertexStorageTextures(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
nint* storage_textures,
|
|
uint num_bindings
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuVertexStorageTextures(render_pass, first_slot, storage_textures, num_bindings);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUVertexStorageBuffers")]
|
|
private static partial void _BindGpuVertexStorageBuffers(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
nint* storage_buffers,
|
|
uint num_bindings
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuVertexStorageBuffers(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
nint* storage_buffers,
|
|
uint num_bindings
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuVertexStorageBuffers(render_pass, first_slot, storage_buffers, num_bindings);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUFragmentSamplers")]
|
|
private static partial void _BindGpuFragmentSamplers(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
SdlGpuTextureSamplerBinding* texture_sampler_bindings,
|
|
uint num_bindings
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuFragmentSamplers(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
SdlGpuTextureSamplerBinding* texture_sampler_bindings,
|
|
uint num_bindings
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuFragmentSamplers(render_pass, first_slot, texture_sampler_bindings, num_bindings);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUFragmentStorageTextures")]
|
|
private static partial void _BindGpuFragmentStorageTextures(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
nint* storage_textures,
|
|
uint num_bindings
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuFragmentStorageTextures(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
nint* storage_textures,
|
|
uint num_bindings
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuFragmentStorageTextures(render_pass, first_slot, storage_textures, num_bindings);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUFragmentStorageBuffers")]
|
|
private static partial void _BindGpuFragmentStorageBuffers(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
nint* storage_buffers,
|
|
uint num_bindings
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuFragmentStorageBuffers(
|
|
nint render_pass,
|
|
uint first_slot,
|
|
nint* storage_buffers,
|
|
uint num_bindings
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuFragmentStorageBuffers(render_pass, first_slot, storage_buffers, num_bindings);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DrawGPUIndexedPrimitives")]
|
|
private static partial void _DrawGpuIndexedPrimitives(
|
|
nint render_pass,
|
|
uint num_indices,
|
|
uint num_instances,
|
|
uint first_index,
|
|
int vertex_offset,
|
|
uint first_instance
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DrawGpuIndexedPrimitives(
|
|
nint render_pass,
|
|
uint num_indices,
|
|
uint num_instances,
|
|
uint first_index,
|
|
int vertex_offset,
|
|
uint first_instance
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DrawGpuIndexedPrimitives(
|
|
render_pass,
|
|
num_indices,
|
|
num_instances,
|
|
first_index,
|
|
vertex_offset,
|
|
first_instance
|
|
);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DrawGPUPrimitives")]
|
|
private static partial void _DrawGpuPrimitives(
|
|
nint render_pass,
|
|
uint num_vertices,
|
|
uint num_instances,
|
|
uint first_vertex,
|
|
uint first_instance
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DrawGpuPrimitives(
|
|
nint render_pass,
|
|
uint num_vertices,
|
|
uint num_instances,
|
|
uint first_vertex,
|
|
uint first_instance
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DrawGpuPrimitives(render_pass, num_vertices, num_instances, first_vertex, first_instance);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DrawGPUPrimitivesIndirect")]
|
|
private static partial void _DrawGpuPrimitivesIndirect(
|
|
nint render_pass,
|
|
nint buffer,
|
|
uint offset,
|
|
uint draw_count
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DrawGpuPrimitivesIndirect(nint render_pass, nint buffer, uint offset, uint draw_count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DrawGpuPrimitivesIndirect(render_pass, buffer, offset, draw_count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DrawGPUIndexedPrimitivesIndirect")]
|
|
private static partial void _DrawGpuIndexedPrimitivesIndirect(
|
|
nint render_pass,
|
|
nint buffer,
|
|
uint offset,
|
|
uint draw_count
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DrawGpuIndexedPrimitivesIndirect(
|
|
nint render_pass,
|
|
nint buffer,
|
|
uint offset,
|
|
uint draw_count
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DrawGpuIndexedPrimitivesIndirect(render_pass, buffer, offset, draw_count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_EndGPURenderPass")]
|
|
private static partial void _EndGpuRenderPass(nint render_pass);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void EndGpuRenderPass(nint render_pass)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_EndGpuRenderPass(render_pass);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BeginGPUComputePass")]
|
|
private static partial nint _BeginGpuComputePass(
|
|
nint command_buffer,
|
|
SdlGpuStorageTextureReadWriteBinding* storage_texture_bindings,
|
|
uint num_storage_texture_bindings,
|
|
SdlGpuStorageBufferReadWriteBinding* storage_buffer_bindings,
|
|
uint num_storage_buffer_bindings
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint BeginGpuComputePass(
|
|
nint command_buffer,
|
|
SdlGpuStorageTextureReadWriteBinding* storage_texture_bindings,
|
|
uint num_storage_texture_bindings,
|
|
SdlGpuStorageBufferReadWriteBinding* storage_buffer_bindings,
|
|
uint num_storage_buffer_bindings
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BeginGpuComputePass(
|
|
command_buffer,
|
|
storage_texture_bindings,
|
|
num_storage_texture_bindings,
|
|
storage_buffer_bindings,
|
|
num_storage_buffer_bindings
|
|
);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUComputePipeline")]
|
|
private static partial void _BindGpuComputePipeline(nint compute_pass, nint compute_pipeline);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuComputePipeline(nint compute_pass, nint compute_pipeline)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuComputePipeline(compute_pass, compute_pipeline);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUComputeSamplers")]
|
|
private static partial void _BindGpuComputeSamplers(
|
|
nint compute_pass,
|
|
uint first_slot,
|
|
SdlGpuTextureSamplerBinding* texture_sampler_bindings,
|
|
uint num_bindings
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuComputeSamplers(
|
|
nint compute_pass,
|
|
uint first_slot,
|
|
SdlGpuTextureSamplerBinding* texture_sampler_bindings,
|
|
uint num_bindings
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuComputeSamplers(compute_pass, first_slot, texture_sampler_bindings, num_bindings);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUComputeStorageTextures")]
|
|
private static partial void _BindGpuComputeStorageTextures(
|
|
nint compute_pass,
|
|
uint first_slot,
|
|
nint* storage_textures,
|
|
uint num_bindings
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuComputeStorageTextures(
|
|
nint compute_pass,
|
|
uint first_slot,
|
|
nint* storage_textures,
|
|
uint num_bindings
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuComputeStorageTextures(compute_pass, first_slot, storage_textures, num_bindings);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BindGPUComputeStorageBuffers")]
|
|
private static partial void _BindGpuComputeStorageBuffers(
|
|
nint compute_pass,
|
|
uint first_slot,
|
|
nint* storage_buffers,
|
|
uint num_bindings
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BindGpuComputeStorageBuffers(
|
|
nint compute_pass,
|
|
uint first_slot,
|
|
nint* storage_buffers,
|
|
uint num_bindings
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BindGpuComputeStorageBuffers(compute_pass, first_slot, storage_buffers, num_bindings);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DispatchGPUCompute")]
|
|
private static partial void _DispatchGpuCompute(
|
|
nint compute_pass,
|
|
uint groupcount_x,
|
|
uint groupcount_y,
|
|
uint groupcount_z
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DispatchGpuCompute(
|
|
nint compute_pass,
|
|
uint groupcount_x,
|
|
uint groupcount_y,
|
|
uint groupcount_z
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DispatchGpuCompute(compute_pass, groupcount_x, groupcount_y, groupcount_z);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DispatchGPUComputeIndirect")]
|
|
private static partial void _DispatchGpuComputeIndirect(nint compute_pass, nint buffer, uint offset);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DispatchGpuComputeIndirect(nint compute_pass, nint buffer, uint offset)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DispatchGpuComputeIndirect(compute_pass, buffer, offset);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_EndGPUComputePass")]
|
|
private static partial void _EndGpuComputePass(nint compute_pass);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void EndGpuComputePass(nint compute_pass)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_EndGpuComputePass(compute_pass);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_MapGPUTransferBuffer")]
|
|
private static partial void* _MapGpuTransferBuffer(SdlGpuDevice device, nint transfer_buffer, byte cycle);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* MapGpuTransferBuffer(SdlGpuDevice device, nint transfer_buffer, byte cycle)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _MapGpuTransferBuffer(device, transfer_buffer, cycle);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UnmapGPUTransferBuffer")]
|
|
private static partial void _UnmapGpuTransferBuffer(SdlGpuDevice device, nint transfer_buffer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UnmapGpuTransferBuffer(SdlGpuDevice device, nint transfer_buffer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UnmapGpuTransferBuffer(device, transfer_buffer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BeginGPUCopyPass")]
|
|
private static partial nint _BeginGpuCopyPass(nint command_buffer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint BeginGpuCopyPass(nint command_buffer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _BeginGpuCopyPass(command_buffer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UploadToGPUTexture")]
|
|
private static partial void _UploadToGpuTexture(
|
|
nint copy_pass,
|
|
SdlGpuTextureTransferInfo* source,
|
|
SdlGpuTextureRegion* destination,
|
|
byte cycle
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UploadToGpuTexture(
|
|
nint copy_pass,
|
|
SdlGpuTextureTransferInfo* source,
|
|
SdlGpuTextureRegion* destination,
|
|
byte cycle
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UploadToGpuTexture(copy_pass, source, destination, cycle);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UploadToGPUBuffer")]
|
|
private static partial void _UploadToGpuBuffer(
|
|
nint copy_pass,
|
|
SdlGpuTransferBufferLocation* source,
|
|
SdlGpuBufferRegion* destination,
|
|
byte cycle
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UploadToGpuBuffer(
|
|
nint copy_pass,
|
|
SdlGpuTransferBufferLocation* source,
|
|
SdlGpuBufferRegion* destination,
|
|
byte cycle
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UploadToGpuBuffer(copy_pass, source, destination, cycle);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CopyGPUTextureToTexture")]
|
|
private static partial void _CopyGpuTextureToTexture(
|
|
nint copy_pass,
|
|
SdlGpuTextureLocation* source,
|
|
SdlGpuTextureLocation* destination,
|
|
uint w,
|
|
uint h,
|
|
uint d,
|
|
byte cycle
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void CopyGpuTextureToTexture(
|
|
nint copy_pass,
|
|
SdlGpuTextureLocation* source,
|
|
SdlGpuTextureLocation* destination,
|
|
uint w,
|
|
uint h,
|
|
uint d,
|
|
byte cycle
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_CopyGpuTextureToTexture(copy_pass, source, destination, w, h, d, cycle);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CopyGPUBufferToBuffer")]
|
|
private static partial void _CopyGpuBufferToBuffer(
|
|
nint copy_pass,
|
|
SdlGpuBufferLocation* source,
|
|
SdlGpuBufferLocation* destination,
|
|
uint size,
|
|
byte cycle
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void CopyGpuBufferToBuffer(
|
|
nint copy_pass,
|
|
SdlGpuBufferLocation* source,
|
|
SdlGpuBufferLocation* destination,
|
|
uint size,
|
|
byte cycle
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_CopyGpuBufferToBuffer(copy_pass, source, destination, size, cycle);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DownloadFromGPUTexture")]
|
|
private static partial void _DownloadFromGpuTexture(
|
|
nint copy_pass,
|
|
SdlGpuTextureRegion* source,
|
|
SdlGpuTextureTransferInfo* destination
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DownloadFromGpuTexture(
|
|
nint copy_pass,
|
|
SdlGpuTextureRegion* source,
|
|
SdlGpuTextureTransferInfo* destination
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DownloadFromGpuTexture(copy_pass, source, destination);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DownloadFromGPUBuffer")]
|
|
private static partial void _DownloadFromGpuBuffer(
|
|
nint copy_pass,
|
|
SdlGpuBufferRegion* source,
|
|
SdlGpuTransferBufferLocation* destination
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DownloadFromGpuBuffer(
|
|
nint copy_pass,
|
|
SdlGpuBufferRegion* source,
|
|
SdlGpuTransferBufferLocation* destination
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DownloadFromGpuBuffer(copy_pass, source, destination);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_EndGPUCopyPass")]
|
|
private static partial void _EndGpuCopyPass(nint copy_pass);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void EndGpuCopyPass(nint copy_pass)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_EndGpuCopyPass(copy_pass);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GenerateMipmapsForGPUTexture")]
|
|
private static partial void _GenerateMipmapsForGpuTexture(nint command_buffer, nint texture);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void GenerateMipmapsForGpuTexture(nint command_buffer, nint texture)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_GenerateMipmapsForGpuTexture(command_buffer, texture);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_BlitGPUTexture")]
|
|
private static partial void _BlitGpuTexture(nint command_buffer, SdlGpuBlitInfo* info);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void BlitGpuTexture(nint command_buffer, SdlGpuBlitInfo* info)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_BlitGpuTexture(command_buffer, info);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WindowSupportsGPUSwapchainComposition")]
|
|
private static partial byte _WindowSupportsGpuSwapchainComposition(
|
|
SdlGpuDevice device,
|
|
SdlWindow window,
|
|
SdlGpuSwapchainComposition swapchain_composition
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WindowSupportsGpuSwapchainComposition(
|
|
SdlGpuDevice device,
|
|
SdlWindow window,
|
|
SdlGpuSwapchainComposition swapchain_composition
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WindowSupportsGpuSwapchainComposition(device, window, swapchain_composition);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WindowSupportsGPUPresentMode")]
|
|
private static partial byte _WindowSupportsGpuPresentMode(
|
|
SdlGpuDevice device,
|
|
SdlWindow window,
|
|
SdlGpuPresentMode present_mode
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WindowSupportsGpuPresentMode(
|
|
SdlGpuDevice device,
|
|
SdlWindow window,
|
|
SdlGpuPresentMode present_mode
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WindowSupportsGpuPresentMode(device, window, present_mode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ClaimWindowForGPUDevice")]
|
|
private static partial byte _ClaimWindowForGpuDevice(SdlGpuDevice device, SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ClaimWindowForGpuDevice(SdlGpuDevice device, SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ClaimWindowForGpuDevice(device, window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReleaseWindowFromGPUDevice")]
|
|
private static partial void _ReleaseWindowFromGpuDevice(SdlGpuDevice device, SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ReleaseWindowFromGpuDevice(SdlGpuDevice device, SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ReleaseWindowFromGpuDevice(device, window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetGPUSwapchainParameters")]
|
|
private static partial byte _SetGpuSwapchainParameters(
|
|
SdlGpuDevice device,
|
|
SdlWindow window,
|
|
SdlGpuSwapchainComposition swapchain_composition,
|
|
SdlGpuPresentMode present_mode
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetGpuSwapchainParameters(
|
|
SdlGpuDevice device,
|
|
SdlWindow window,
|
|
SdlGpuSwapchainComposition swapchain_composition,
|
|
SdlGpuPresentMode present_mode
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetGpuSwapchainParameters(device, window, swapchain_composition, present_mode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetGPUAllowedFramesInFlight")]
|
|
private static partial byte _SetGpuAllowedFramesInFlight(
|
|
SdlGpuDevice device,
|
|
uint allowed_frames_in_flight
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetGpuAllowedFramesInFlight(SdlGpuDevice device, uint allowed_frames_in_flight)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetGpuAllowedFramesInFlight(device, allowed_frames_in_flight);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGPUSwapchainTextureFormat")]
|
|
private static partial SdlGpuTextureFormat _GetGpuSwapchainTextureFormat(
|
|
SdlGpuDevice device,
|
|
SdlWindow window
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGpuTextureFormat GetGpuSwapchainTextureFormat(SdlGpuDevice device, SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGpuSwapchainTextureFormat(device, window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AcquireGPUSwapchainTexture")]
|
|
private static partial byte _AcquireGpuSwapchainTexture(
|
|
nint command_buffer,
|
|
SdlWindow window,
|
|
nint* swapchain_texture,
|
|
uint* swapchain_texture_width,
|
|
uint* swapchain_texture_height
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte AcquireGpuSwapchainTexture(
|
|
nint command_buffer,
|
|
SdlWindow window,
|
|
nint* swapchain_texture,
|
|
uint* swapchain_texture_width,
|
|
uint* swapchain_texture_height
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AcquireGpuSwapchainTexture(
|
|
command_buffer,
|
|
window,
|
|
swapchain_texture,
|
|
swapchain_texture_width,
|
|
swapchain_texture_height
|
|
);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitForGPUSwapchain")]
|
|
private static partial byte _WaitForGpuSwapchain(SdlGpuDevice device, SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WaitForGpuSwapchain(SdlGpuDevice device, SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WaitForGpuSwapchain(device, window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitAndAcquireGPUSwapchainTexture")]
|
|
private static partial byte _WaitAndAcquireGpuSwapchainTexture(
|
|
nint command_buffer,
|
|
SdlWindow window,
|
|
nint* swapchain_texture,
|
|
uint* swapchain_texture_width,
|
|
uint* swapchain_texture_height
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WaitAndAcquireGpuSwapchainTexture(
|
|
nint command_buffer,
|
|
SdlWindow window,
|
|
nint* swapchain_texture,
|
|
uint* swapchain_texture_width,
|
|
uint* swapchain_texture_height
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WaitAndAcquireGpuSwapchainTexture(
|
|
command_buffer,
|
|
window,
|
|
swapchain_texture,
|
|
swapchain_texture_width,
|
|
swapchain_texture_height
|
|
);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SubmitGPUCommandBuffer")]
|
|
private static partial byte _SubmitGpuCommandBuffer(nint command_buffer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SubmitGpuCommandBuffer(nint command_buffer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SubmitGpuCommandBuffer(command_buffer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SubmitGPUCommandBufferAndAcquireFence")]
|
|
private static partial nint _SubmitGpuCommandBufferAndAcquireFence(nint command_buffer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint SubmitGpuCommandBufferAndAcquireFence(nint command_buffer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SubmitGpuCommandBufferAndAcquireFence(command_buffer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CancelGPUCommandBuffer")]
|
|
private static partial byte _CancelGpuCommandBuffer(nint command_buffer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CancelGpuCommandBuffer(nint command_buffer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CancelGpuCommandBuffer(command_buffer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitForGPUIdle")]
|
|
private static partial byte _WaitForGpuIdle(SdlGpuDevice device);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WaitForGpuIdle(SdlGpuDevice device)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WaitForGpuIdle(device);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitForGPUFences")]
|
|
private static partial byte _WaitForGpuFences(
|
|
SdlGpuDevice device,
|
|
byte wait_all,
|
|
nint* fences,
|
|
uint num_fences
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WaitForGpuFences(SdlGpuDevice device, byte wait_all, nint* fences, uint num_fences)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WaitForGpuFences(device, wait_all, fences, num_fences);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_QueryGPUFence")]
|
|
private static partial byte _QueryGpuFence(SdlGpuDevice device, nint fence);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte QueryGpuFence(SdlGpuDevice device, nint fence)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _QueryGpuFence(device, fence);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUFence")]
|
|
private static partial void _ReleaseGpuFence(SdlGpuDevice device, nint fence);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ReleaseGpuFence(SdlGpuDevice device, nint fence)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ReleaseGpuFence(device, fence);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GPUTextureFormatTexelBlockSize")]
|
|
private static partial uint _GpuTextureFormatTexelBlockSize(SdlGpuTextureFormat format);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GpuTextureFormatTexelBlockSize(SdlGpuTextureFormat format)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GpuTextureFormatTexelBlockSize(format);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GPUTextureSupportsFormat")]
|
|
private static partial byte _GpuTextureSupportsFormat(
|
|
SdlGpuDevice device,
|
|
SdlGpuTextureFormat format,
|
|
SdlGpuTextureType type,
|
|
SdlGpuTextureUsageFlags usage
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GpuTextureSupportsFormat(
|
|
SdlGpuDevice device,
|
|
SdlGpuTextureFormat format,
|
|
SdlGpuTextureType type,
|
|
SdlGpuTextureUsageFlags usage
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GpuTextureSupportsFormat(device, format, type, usage);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GPUTextureSupportsSampleCount")]
|
|
private static partial byte _GpuTextureSupportsSampleCount(
|
|
SdlGpuDevice device,
|
|
SdlGpuTextureFormat format,
|
|
SdlGpuSampleCount sample_count
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GpuTextureSupportsSampleCount(
|
|
SdlGpuDevice device,
|
|
SdlGpuTextureFormat format,
|
|
SdlGpuSampleCount sample_count
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GpuTextureSupportsSampleCount(device, format, sample_count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CalculateGPUTextureFormatSize")]
|
|
private static partial uint _CalculateGpuTextureFormatSize(
|
|
SdlGpuTextureFormat format,
|
|
uint width,
|
|
uint height,
|
|
uint depth_or_layer_count
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint CalculateGpuTextureFormatSize(
|
|
SdlGpuTextureFormat format,
|
|
uint width,
|
|
uint height,
|
|
uint depth_or_layer_count
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CalculateGpuTextureFormatSize(format, width, height, depth_or_layer_count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetPixelFormatFromGPUTextureFormat")]
|
|
private static partial SdlPixelFormat _GetPixelFormatFromGpuTextureFormat(SdlGpuTextureFormat format);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPixelFormat GetPixelFormatFromGpuTextureFormat(SdlGpuTextureFormat format)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPixelFormatFromGpuTextureFormat(format);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGPUTextureFormatFromPixelFormat")]
|
|
private static partial SdlGpuTextureFormat _GetGpuTextureFormatFromPixelFormat(SdlPixelFormat format);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGpuTextureFormat GetGpuTextureFormatFromPixelFormat(SdlPixelFormat format)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGpuTextureFormatFromPixelFormat(format);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetHaptics")]
|
|
private static partial uint* _GetHaptics(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint* GetHaptics(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetHaptics(count);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetHapticNameForID",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetHapticNameForID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetHapticNameForID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetHapticNameForID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OpenHaptic")]
|
|
private static partial nint _OpenHaptic(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint OpenHaptic(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenHaptic(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetHapticFromID")]
|
|
private static partial nint _GetHapticFromID(uint instance_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint GetHapticFromID(uint instance_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetHapticFromID(instance_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetHapticID")]
|
|
private static partial uint _GetHapticID(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetHapticID(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetHapticID(haptic);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetHapticName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetHapticName(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetHapticName(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetHapticName(haptic);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_IsMouseHaptic")]
|
|
private static partial byte _IsMouseHaptic();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte IsMouseHaptic()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IsMouseHaptic();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OpenHapticFromMouse")]
|
|
private static partial nint _OpenHapticFromMouse();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint OpenHapticFromMouse()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenHapticFromMouse();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_IsJoystickHaptic")]
|
|
private static partial byte _IsJoystickHaptic(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte IsJoystickHaptic(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IsJoystickHaptic(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OpenHapticFromJoystick")]
|
|
private static partial nint _OpenHapticFromJoystick(SdlJoystick joystick);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint OpenHapticFromJoystick(SdlJoystick joystick)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenHapticFromJoystick(joystick);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CloseHaptic")]
|
|
private static partial void _CloseHaptic(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void CloseHaptic(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_CloseHaptic(haptic);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetMaxHapticEffects")]
|
|
private static partial int _GetMaxHapticEffects(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetMaxHapticEffects(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetMaxHapticEffects(haptic);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetMaxHapticEffectsPlaying")]
|
|
private static partial int _GetMaxHapticEffectsPlaying(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetMaxHapticEffectsPlaying(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetMaxHapticEffectsPlaying(haptic);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetHapticFeatures")]
|
|
private static partial uint _GetHapticFeatures(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetHapticFeatures(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetHapticFeatures(haptic);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumHapticAxes")]
|
|
private static partial int _GetNumHapticAxes(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumHapticAxes(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumHapticAxes(haptic);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HapticEffectSupported")]
|
|
private static partial byte _HapticEffectSupported(nint haptic, SdlHapticEffect* effect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HapticEffectSupported(nint haptic, SdlHapticEffect* effect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HapticEffectSupported(haptic, effect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateHapticEffect")]
|
|
private static partial int _CreateHapticEffect(nint haptic, SdlHapticEffect* effect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int CreateHapticEffect(nint haptic, SdlHapticEffect* effect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateHapticEffect(haptic, effect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UpdateHapticEffect")]
|
|
private static partial byte _UpdateHapticEffect(nint haptic, int effect, SdlHapticEffect* data);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte UpdateHapticEffect(nint haptic, int effect, SdlHapticEffect* data)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _UpdateHapticEffect(haptic, effect, data);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RunHapticEffect")]
|
|
private static partial byte _RunHapticEffect(nint haptic, int effect, uint iterations);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RunHapticEffect(nint haptic, int effect, uint iterations)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RunHapticEffect(haptic, effect, iterations);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_StopHapticEffect")]
|
|
private static partial byte _StopHapticEffect(nint haptic, int effect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte StopHapticEffect(nint haptic, int effect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _StopHapticEffect(haptic, effect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyHapticEffect")]
|
|
private static partial void _DestroyHapticEffect(nint haptic, int effect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyHapticEffect(nint haptic, int effect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyHapticEffect(haptic, effect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetHapticEffectStatus")]
|
|
private static partial byte _GetHapticEffectStatus(nint haptic, int effect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetHapticEffectStatus(nint haptic, int effect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetHapticEffectStatus(haptic, effect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetHapticGain")]
|
|
private static partial byte _SetHapticGain(nint haptic, int gain);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetHapticGain(nint haptic, int gain)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetHapticGain(haptic, gain);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetHapticAutocenter")]
|
|
private static partial byte _SetHapticAutocenter(nint haptic, int autocenter);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetHapticAutocenter(nint haptic, int autocenter)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetHapticAutocenter(haptic, autocenter);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PauseHaptic")]
|
|
private static partial byte _PauseHaptic(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte PauseHaptic(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _PauseHaptic(haptic);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ResumeHaptic")]
|
|
private static partial byte _ResumeHaptic(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ResumeHaptic(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ResumeHaptic(haptic);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_StopHapticEffects")]
|
|
private static partial byte _StopHapticEffects(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte StopHapticEffects(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _StopHapticEffects(haptic);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_HapticRumbleSupported")]
|
|
private static partial byte _HapticRumbleSupported(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte HapticRumbleSupported(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HapticRumbleSupported(haptic);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_InitHapticRumble")]
|
|
private static partial byte _InitHapticRumble(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte InitHapticRumble(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _InitHapticRumble(haptic);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_PlayHapticRumble")]
|
|
private static partial byte _PlayHapticRumble(nint haptic, float strength, uint length);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte PlayHapticRumble(nint haptic, float strength, uint length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _PlayHapticRumble(haptic, strength, length);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_StopHapticRumble")]
|
|
private static partial byte _StopHapticRumble(nint haptic);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte StopHapticRumble(nint haptic)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _StopHapticRumble(haptic);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_init")]
|
|
private static partial int _HidInit();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int HidInit()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidInit();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_exit")]
|
|
private static partial int _HidExit();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int HidExit()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidExit();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_device_change_count")]
|
|
private static partial uint _HidDeviceChangeCount();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint HidDeviceChangeCount()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidDeviceChangeCount();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_enumerate")]
|
|
private static partial SdlHidDeviceInfo* _HidEnumerate(ushort vendor_id, ushort product_id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlHidDeviceInfo* HidEnumerate(ushort vendor_id, ushort product_id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidEnumerate(vendor_id, product_id);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_free_enumeration")]
|
|
private static partial void _HidFreeEnumeration(SdlHidDeviceInfo* devs);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void HidFreeEnumeration(SdlHidDeviceInfo* devs)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_HidFreeEnumeration(devs);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_hid_open_path",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nint _HidOpenPath(string path);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint HidOpenPath(string path)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidOpenPath(path);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_get_properties")]
|
|
private static partial uint _HidGetProperties(nint dev);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint HidGetProperties(nint dev)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidGetProperties(dev);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_write")]
|
|
private static partial int _HidWrite(nint dev, byte* data, nuint length);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int HidWrite(nint dev, byte* data, nuint length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidWrite(dev, data, length);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_read_timeout")]
|
|
private static partial int _HidReadTimeout(nint dev, byte* data, nuint length, int milliseconds);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int HidReadTimeout(nint dev, byte* data, nuint length, int milliseconds)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidReadTimeout(dev, data, length, milliseconds);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_read")]
|
|
private static partial int _HidRead(nint dev, byte* data, nuint length);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int HidRead(nint dev, byte* data, nuint length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidRead(dev, data, length);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_set_nonblocking")]
|
|
private static partial int _HidSetNonblocking(nint dev, int nonblock);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int HidSetNonblocking(nint dev, int nonblock)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidSetNonblocking(dev, nonblock);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_send_feature_report")]
|
|
private static partial int _HidSendFeatureReport(nint dev, byte* data, nuint length);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int HidSendFeatureReport(nint dev, byte* data, nuint length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidSendFeatureReport(dev, data, length);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_get_feature_report")]
|
|
private static partial int _HidGetFeatureReport(nint dev, byte* data, nuint length);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int HidGetFeatureReport(nint dev, byte* data, nuint length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidGetFeatureReport(dev, data, length);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_get_input_report")]
|
|
private static partial int _HidGetInputReport(nint dev, byte* data, nuint length);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int HidGetInputReport(nint dev, byte* data, nuint length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidGetInputReport(dev, data, length);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_close")]
|
|
private static partial int _HidClose(nint dev);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int HidClose(nint dev)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidClose(dev);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_get_device_info")]
|
|
private static partial SdlHidDeviceInfo* _HidGetDeviceInfo(nint dev);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlHidDeviceInfo* HidGetDeviceInfo(nint dev)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidGetDeviceInfo(dev);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_get_report_descriptor")]
|
|
private static partial int _HidGetReportDescriptor(nint dev, byte* buf, nuint buf_size);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int HidGetReportDescriptor(nint dev, byte* buf, nuint buf_size)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _HidGetReportDescriptor(dev, buf, buf_size);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_hid_ble_scan")]
|
|
private static partial void _HidBleScan(byte active);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void HidBleScan(byte active)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_HidBleScan(active);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetHintWithPriority",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetHintWithPriority(string name, string value, SdlHintPriority priority);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetHintWithPriority(string name, string value, SdlHintPriority priority)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetHintWithPriority(name, value, priority);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetHint",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetHint(string name, string value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetHint(string name, string value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetHint(name, value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_ResetHint",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _ResetHint(string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ResetHint(string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ResetHint(name);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ResetHints")]
|
|
private static partial void _ResetHints();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ResetHints()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ResetHints();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetHint",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetHint(string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetHint(string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetHint(name);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetHintBoolean",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _GetHintBoolean(string name, byte default_value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetHintBoolean(string name, byte default_value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetHintBoolean(name, default_value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_AddHintCallback",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _AddHintCallback(
|
|
string name,
|
|
delegate* unmanaged[Cdecl]<void*, byte*, byte*, byte*, void> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte AddHintCallback(
|
|
string name,
|
|
delegate* unmanaged[Cdecl]<void*, byte*, byte*, byte*, void> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AddHintCallback(name, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_RemoveHintCallback",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void _RemoveHintCallback(
|
|
string name,
|
|
delegate* unmanaged[Cdecl]<void*, byte*, byte*, byte*, void> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void RemoveHintCallback(
|
|
string name,
|
|
delegate* unmanaged[Cdecl]<void*, byte*, byte*, byte*, void> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_RemoveHintCallback(name, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_Init")]
|
|
private static partial byte _Init(SdlInitFlags flags);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte Init(SdlInitFlags flags)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _Init(flags);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_InitSubSystem")]
|
|
private static partial byte _InitSubSystem(SdlInitFlags flags);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte InitSubSystem(SdlInitFlags flags)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _InitSubSystem(flags);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_QuitSubSystem")]
|
|
private static partial void _QuitSubSystem(SdlInitFlags flags);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void QuitSubSystem(SdlInitFlags flags)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_QuitSubSystem(flags);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WasInit")]
|
|
private static partial SdlInitFlags _WasInit(SdlInitFlags flags);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlInitFlags WasInit(SdlInitFlags flags)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WasInit(flags);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_Quit")]
|
|
private static partial void _Quit();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void Quit()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_Quit();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_IsMainThread")]
|
|
private static partial byte _IsMainThread();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte IsMainThread()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IsMainThread();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RunOnMainThread")]
|
|
private static partial byte _RunOnMainThread(
|
|
delegate* unmanaged[Cdecl]<void*, void> callback,
|
|
void* userdata,
|
|
byte wait_complete
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RunOnMainThread(
|
|
delegate* unmanaged[Cdecl]<void*, void> callback,
|
|
void* userdata,
|
|
byte wait_complete
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RunOnMainThread(callback, userdata, wait_complete);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetAppMetadata",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetAppMetadata(string appname, string appversion, string appidentifier);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetAppMetadata(string appname, string appversion, string appidentifier)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAppMetadata(appname, appversion, appidentifier);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetAppMetadataProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetAppMetadataProperty(string name, string value);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetAppMetadataProperty(string name, string value)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetAppMetadataProperty(name, value);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetAppMetadataProperty",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetAppMetadataProperty(string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetAppMetadataProperty(string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetAppMetadataProperty(name);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_LoadObject",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nint _LoadObject(string sofile);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint LoadObject(string sofile)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadObject(sofile);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_LoadFunction",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial delegate* unmanaged[Cdecl]<void> _LoadFunction(nint handle, string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static delegate* unmanaged[Cdecl]<void> LoadFunction(nint handle, string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LoadFunction(handle, name);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UnloadObject")]
|
|
private static partial void _UnloadObject(nint handle);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UnloadObject(nint handle)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UnloadObject(handle);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetPreferredLocales")]
|
|
private static partial SdlLocale** _GetPreferredLocales(int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlLocale** GetPreferredLocales(int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPreferredLocales(count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetLogPriorities")]
|
|
private static partial void _SetLogPriorities(SdlLogPriority priority);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetLogPriorities(SdlLogPriority priority)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetLogPriorities(priority);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetLogPriority")]
|
|
private static partial void _SetLogPriority(int category, SdlLogPriority priority);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetLogPriority(int category, SdlLogPriority priority)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetLogPriority(category, priority);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetLogPriority")]
|
|
private static partial SdlLogPriority _GetLogPriority(int category);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlLogPriority GetLogPriority(int category)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetLogPriority(category);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ResetLogPriorities")]
|
|
private static partial void _ResetLogPriorities();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ResetLogPriorities()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ResetLogPriorities();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetLogPriorityPrefix",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _SetLogPriorityPrefix(SdlLogPriority priority, string prefix);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetLogPriorityPrefix(SdlLogPriority priority, string prefix)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetLogPriorityPrefix(priority, prefix);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_LogMessageV",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void _LogMessageV(int category, SdlLogPriority priority, string fmt, byte* ap);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void LogMessageV(int category, SdlLogPriority priority, string fmt, byte* ap)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_LogMessageV(category, priority, fmt, ap);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDefaultLogOutputFunction")]
|
|
private static partial delegate* unmanaged[Cdecl]<
|
|
void*,
|
|
int,
|
|
SdlLogPriority,
|
|
byte*,
|
|
void> _GetDefaultLogOutputFunction();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static delegate* unmanaged[Cdecl]<
|
|
void*,
|
|
int,
|
|
SdlLogPriority,
|
|
byte*,
|
|
void> GetDefaultLogOutputFunction()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDefaultLogOutputFunction();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetLogOutputFunction")]
|
|
private static partial void _GetLogOutputFunction(
|
|
delegate* unmanaged[Cdecl]<void*, int, SdlLogPriority, byte*, void>* callback,
|
|
void** userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void GetLogOutputFunction(
|
|
delegate* unmanaged[Cdecl]<void*, int, SdlLogPriority, byte*, void>* callback,
|
|
void** userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_GetLogOutputFunction(callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetLogOutputFunction")]
|
|
private static partial void _SetLogOutputFunction(
|
|
delegate* unmanaged[Cdecl]<void*, int, SdlLogPriority, byte*, void> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetLogOutputFunction(
|
|
delegate* unmanaged[Cdecl]<void*, int, SdlLogPriority, byte*, void> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetLogOutputFunction(callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ShowMessageBox")]
|
|
private static partial byte _ShowMessageBox(SdlMessageBoxData* messageboxdata, int* buttonid);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ShowMessageBox(SdlMessageBoxData* messageboxdata, int* buttonid)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ShowMessageBox(messageboxdata, buttonid);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_ShowSimpleMessageBox",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _ShowSimpleMessageBox(
|
|
SdlMessageBoxFlags flags,
|
|
string title,
|
|
string message,
|
|
SdlWindow window
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ShowSimpleMessageBox(
|
|
SdlMessageBoxFlags flags,
|
|
string title,
|
|
string message,
|
|
SdlWindow window
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ShowSimpleMessageBox(flags, title, message, window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_Metal_CreateView")]
|
|
private static partial void* _MetalCreateView(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* MetalCreateView(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _MetalCreateView(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_Metal_DestroyView")]
|
|
private static partial void _MetalDestroyView(void* view);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void MetalDestroyView(void* view)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_MetalDestroyView(view);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_Metal_GetLayer")]
|
|
private static partial void* _MetalGetLayer(void* view);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* MetalGetLayer(void* view)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _MetalGetLayer(view);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_OpenURL",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _OpenURL(string url);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte OpenURL(string url)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenURL(url);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetPlatform",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetPlatform();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetPlatform()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPlatform();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateProcess")]
|
|
private static partial nint _CreateProcess(byte** args, byte pipe_stdio);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateProcess(byte** args, byte pipe_stdio)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateProcess(args, pipe_stdio);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateProcessWithProperties")]
|
|
private static partial nint _CreateProcessWithProperties(uint props);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateProcessWithProperties(uint props)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateProcessWithProperties(props);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetProcessProperties")]
|
|
private static partial uint _GetProcessProperties(nint process);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetProcessProperties(nint process)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetProcessProperties(process);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ReadProcess")]
|
|
private static partial void* _ReadProcess(nint process, nuint* datasize, int* exitcode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* ReadProcess(nint process, nuint* datasize, int* exitcode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadProcess(process, datasize, exitcode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetProcessInput")]
|
|
private static partial nint _GetProcessInput(nint process);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint GetProcessInput(nint process)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetProcessInput(process);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetProcessOutput")]
|
|
private static partial nint _GetProcessOutput(nint process);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint GetProcessOutput(nint process)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetProcessOutput(process);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_KillProcess")]
|
|
private static partial byte _KillProcess(nint process, byte force);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte KillProcess(nint process, byte force)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _KillProcess(process, force);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_WaitProcess")]
|
|
private static partial byte _WaitProcess(nint process, byte block, int* exitcode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WaitProcess(nint process, byte block, int* exitcode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WaitProcess(process, block, exitcode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyProcess")]
|
|
private static partial void _DestroyProcess(nint process);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyProcess(nint process)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyProcess(process);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetNumRenderDrivers")]
|
|
private static partial int _GetNumRenderDrivers();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetNumRenderDrivers()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetNumRenderDrivers();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetRenderDriver",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetRenderDriver(int index);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetRenderDriver(int index)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderDriver(index);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_CreateWindowAndRenderer",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _CreateWindowAndRenderer(
|
|
string title,
|
|
int width,
|
|
int height,
|
|
SdlWindowFlags window_flags,
|
|
SdlWindow* window,
|
|
SdlRenderer* renderer
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CreateWindowAndRenderer(
|
|
string title,
|
|
int width,
|
|
int height,
|
|
SdlWindowFlags window_flags,
|
|
SdlWindow* window,
|
|
SdlRenderer* renderer
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateWindowAndRenderer(title, width, height, window_flags, window, renderer);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_CreateRenderer",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial SdlRenderer _CreateRenderer(SdlWindow window, string name);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlRenderer CreateRenderer(SdlWindow window, string name)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateRenderer(window, name);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateRendererWithProperties")]
|
|
private static partial SdlRenderer _CreateRendererWithProperties(uint props);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlRenderer CreateRendererWithProperties(uint props)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateRendererWithProperties(props);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateGPURenderer")]
|
|
private static partial SdlRenderer _CreateGpuRenderer(SdlGpuDevice device, SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlRenderer CreateGpuRenderer(SdlGpuDevice device, SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateGpuRenderer(device, window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetGPURendererDevice")]
|
|
private static partial SdlGpuDevice _GetGpuRendererDevice(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlGpuDevice GetGpuRendererDevice(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetGpuRendererDevice(renderer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateSoftwareRenderer")]
|
|
private static partial SdlRenderer _CreateSoftwareRenderer(SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlRenderer CreateSoftwareRenderer(SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateSoftwareRenderer(surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderer")]
|
|
private static partial SdlRenderer _GetRenderer(SdlWindow window);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlRenderer GetRenderer(SdlWindow window)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderer(window);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderWindow")]
|
|
private static partial SdlWindow _GetRenderWindow(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlWindow GetRenderWindow(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderWindow(renderer);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetRendererName",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetRendererName(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetRendererName(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRendererName(renderer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRendererProperties")]
|
|
private static partial uint _GetRendererProperties(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetRendererProperties(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRendererProperties(renderer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderOutputSize")]
|
|
private static partial byte _GetRenderOutputSize(SdlRenderer renderer, int* w, int* h);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderOutputSize(SdlRenderer renderer, int* w, int* h)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderOutputSize(renderer, w, h);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCurrentRenderOutputSize")]
|
|
private static partial byte _GetCurrentRenderOutputSize(SdlRenderer renderer, int* w, int* h);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetCurrentRenderOutputSize(SdlRenderer renderer, int* w, int* h)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCurrentRenderOutputSize(renderer, w, h);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateTexture")]
|
|
private static partial SdlTexture _CreateTexture(
|
|
SdlRenderer renderer,
|
|
SdlPixelFormat format,
|
|
SdlTextureAccess access,
|
|
int w,
|
|
int h
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlTexture CreateTexture(
|
|
SdlRenderer renderer,
|
|
SdlPixelFormat format,
|
|
SdlTextureAccess access,
|
|
int w,
|
|
int h
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateTexture(renderer, format, access, w, h);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateTextureFromSurface")]
|
|
private static partial SdlTexture _CreateTextureFromSurface(SdlRenderer renderer, SdlSurface* surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlTexture CreateTextureFromSurface(SdlRenderer renderer, SdlSurface* surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateTextureFromSurface(renderer, surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateTextureWithProperties")]
|
|
private static partial SdlTexture _CreateTextureWithProperties(SdlRenderer renderer, uint props);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlTexture CreateTextureWithProperties(SdlRenderer renderer, uint props)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateTextureWithProperties(renderer, props);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTextureProperties")]
|
|
private static partial uint _GetTextureProperties(SdlTexture texture);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint GetTextureProperties(SdlTexture texture)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTextureProperties(texture);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRendererFromTexture")]
|
|
private static partial SdlRenderer _GetRendererFromTexture(SdlTexture texture);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlRenderer GetRendererFromTexture(SdlTexture texture)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRendererFromTexture(texture);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTextureSize")]
|
|
private static partial byte _GetTextureSize(SdlTexture texture, float* w, float* h);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetTextureSize(SdlTexture texture, float* w, float* h)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTextureSize(texture, w, h);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTexturePalette")]
|
|
private static partial byte _SetTexturePalette(SdlTexture texture, SdlPalette* palette);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetTexturePalette(SdlTexture texture, SdlPalette* palette)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetTexturePalette(texture, palette);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTexturePalette")]
|
|
private static partial SdlPalette* _GetTexturePalette(SdlTexture texture);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlPalette* GetTexturePalette(SdlTexture texture)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTexturePalette(texture);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTextureColorMod")]
|
|
private static partial byte _SetTextureColorMod(SdlTexture texture, byte r, byte g, byte b);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetTextureColorMod(SdlTexture texture, byte r, byte g, byte b)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetTextureColorMod(texture, r, g, b);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTextureColorModFloat")]
|
|
private static partial byte _SetTextureColorModFloat(SdlTexture texture, float r, float g, float b);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetTextureColorModFloat(SdlTexture texture, float r, float g, float b)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetTextureColorModFloat(texture, r, g, b);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTextureColorMod")]
|
|
private static partial byte _GetTextureColorMod(SdlTexture texture, byte* r, byte* g, byte* b);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetTextureColorMod(SdlTexture texture, byte* r, byte* g, byte* b)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTextureColorMod(texture, r, g, b);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTextureColorModFloat")]
|
|
private static partial byte _GetTextureColorModFloat(SdlTexture texture, float* r, float* g, float* b);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetTextureColorModFloat(SdlTexture texture, float* r, float* g, float* b)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTextureColorModFloat(texture, r, g, b);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTextureAlphaMod")]
|
|
private static partial byte _SetTextureAlphaMod(SdlTexture texture, byte alpha);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetTextureAlphaMod(SdlTexture texture, byte alpha)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetTextureAlphaMod(texture, alpha);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTextureAlphaModFloat")]
|
|
private static partial byte _SetTextureAlphaModFloat(SdlTexture texture, float alpha);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetTextureAlphaModFloat(SdlTexture texture, float alpha)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetTextureAlphaModFloat(texture, alpha);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTextureAlphaMod")]
|
|
private static partial byte _GetTextureAlphaMod(SdlTexture texture, byte* alpha);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetTextureAlphaMod(SdlTexture texture, byte* alpha)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTextureAlphaMod(texture, alpha);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTextureAlphaModFloat")]
|
|
private static partial byte _GetTextureAlphaModFloat(SdlTexture texture, float* alpha);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetTextureAlphaModFloat(SdlTexture texture, float* alpha)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTextureAlphaModFloat(texture, alpha);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTextureBlendMode")]
|
|
private static partial byte _SetTextureBlendMode(SdlTexture texture, uint blendMode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetTextureBlendMode(SdlTexture texture, uint blendMode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetTextureBlendMode(texture, blendMode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTextureBlendMode")]
|
|
private static partial byte _GetTextureBlendMode(SdlTexture texture, uint* blendMode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetTextureBlendMode(SdlTexture texture, uint* blendMode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTextureBlendMode(texture, blendMode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTextureScaleMode")]
|
|
private static partial byte _SetTextureScaleMode(SdlTexture texture, SdlScaleMode scaleMode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetTextureScaleMode(SdlTexture texture, SdlScaleMode scaleMode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetTextureScaleMode(texture, scaleMode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTextureScaleMode")]
|
|
private static partial byte _GetTextureScaleMode(SdlTexture texture, SdlScaleMode* scaleMode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetTextureScaleMode(SdlTexture texture, SdlScaleMode* scaleMode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTextureScaleMode(texture, scaleMode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UpdateTexture")]
|
|
private static partial byte _UpdateTexture(SdlTexture texture, SdlRect* rect, void* pixels, int pitch);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte UpdateTexture(SdlTexture texture, SdlRect* rect, void* pixels, int pitch)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _UpdateTexture(texture, rect, pixels, pitch);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UpdateYUVTexture")]
|
|
private static partial byte _UpdateYUVTexture(
|
|
SdlTexture texture,
|
|
SdlRect* rect,
|
|
byte* Yplane,
|
|
int Ypitch,
|
|
byte* Uplane,
|
|
int Upitch,
|
|
byte* Vplane,
|
|
int Vpitch
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte UpdateYUVTexture(
|
|
SdlTexture texture,
|
|
SdlRect* rect,
|
|
byte* Yplane,
|
|
int Ypitch,
|
|
byte* Uplane,
|
|
int Upitch,
|
|
byte* Vplane,
|
|
int Vpitch
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _UpdateYUVTexture(texture, rect, Yplane, Ypitch, Uplane, Upitch, Vplane, Vpitch);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UpdateNVTexture")]
|
|
private static partial byte _UpdateNVTexture(
|
|
SdlTexture texture,
|
|
SdlRect* rect,
|
|
byte* Yplane,
|
|
int Ypitch,
|
|
byte* UVplane,
|
|
int UVpitch
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte UpdateNVTexture(
|
|
SdlTexture texture,
|
|
SdlRect* rect,
|
|
byte* Yplane,
|
|
int Ypitch,
|
|
byte* UVplane,
|
|
int UVpitch
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _UpdateNVTexture(texture, rect, Yplane, Ypitch, UVplane, UVpitch);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LockTexture")]
|
|
private static partial byte _LockTexture(SdlTexture texture, SdlRect* rect, void** pixels, int* pitch);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte LockTexture(SdlTexture texture, SdlRect* rect, void** pixels, int* pitch)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LockTexture(texture, rect, pixels, pitch);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_LockTextureToSurface")]
|
|
private static partial byte _LockTextureToSurface(SdlTexture texture, SdlRect* rect, SdlSurface** surface);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte LockTextureToSurface(SdlTexture texture, SdlRect* rect, SdlSurface** surface)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _LockTextureToSurface(texture, rect, surface);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UnlockTexture")]
|
|
private static partial void _UnlockTexture(SdlTexture texture);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UnlockTexture(SdlTexture texture)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UnlockTexture(texture);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetRenderTarget")]
|
|
private static partial byte _SetRenderTarget(SdlRenderer renderer, SdlTexture texture);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetRenderTarget(SdlRenderer renderer, SdlTexture texture)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetRenderTarget(renderer, texture);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderTarget")]
|
|
private static partial SdlTexture _GetRenderTarget(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlTexture GetRenderTarget(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderTarget(renderer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetRenderLogicalPresentation")]
|
|
private static partial byte _SetRenderLogicalPresentation(
|
|
SdlRenderer renderer,
|
|
int w,
|
|
int h,
|
|
SdlRendererLogicalPresentation mode
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetRenderLogicalPresentation(
|
|
SdlRenderer renderer,
|
|
int w,
|
|
int h,
|
|
SdlRendererLogicalPresentation mode
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetRenderLogicalPresentation(renderer, w, h, mode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderLogicalPresentation")]
|
|
private static partial byte _GetRenderLogicalPresentation(
|
|
SdlRenderer renderer,
|
|
int* w,
|
|
int* h,
|
|
SdlRendererLogicalPresentation* mode
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderLogicalPresentation(
|
|
SdlRenderer renderer,
|
|
int* w,
|
|
int* h,
|
|
SdlRendererLogicalPresentation* mode
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderLogicalPresentation(renderer, w, h, mode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderLogicalPresentationRect")]
|
|
private static partial byte _GetRenderLogicalPresentationRect(SdlRenderer renderer, SdlFRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderLogicalPresentationRect(SdlRenderer renderer, SdlFRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderLogicalPresentationRect(renderer, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderCoordinatesFromWindow")]
|
|
private static partial byte _RenderCoordinatesFromWindow(
|
|
SdlRenderer renderer,
|
|
float window_x,
|
|
float window_y,
|
|
float* x,
|
|
float* y
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderCoordinatesFromWindow(
|
|
SdlRenderer renderer,
|
|
float window_x,
|
|
float window_y,
|
|
float* x,
|
|
float* y
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderCoordinatesFromWindow(renderer, window_x, window_y, x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderCoordinatesToWindow")]
|
|
private static partial byte _RenderCoordinatesToWindow(
|
|
SdlRenderer renderer,
|
|
float x,
|
|
float y,
|
|
float* window_x,
|
|
float* window_y
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderCoordinatesToWindow(
|
|
SdlRenderer renderer,
|
|
float x,
|
|
float y,
|
|
float* window_x,
|
|
float* window_y
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderCoordinatesToWindow(renderer, x, y, window_x, window_y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ConvertEventToRenderCoordinates")]
|
|
private static partial byte _ConvertEventToRenderCoordinates(SdlRenderer renderer, SdlEvent* @event);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ConvertEventToRenderCoordinates(SdlRenderer renderer, SdlEvent* @event)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ConvertEventToRenderCoordinates(renderer, @event);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetRenderViewport")]
|
|
private static partial byte _SetRenderViewport(SdlRenderer renderer, SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetRenderViewport(SdlRenderer renderer, SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetRenderViewport(renderer, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderViewport")]
|
|
private static partial byte _GetRenderViewport(SdlRenderer renderer, SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderViewport(SdlRenderer renderer, SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderViewport(renderer, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderViewportSet")]
|
|
private static partial byte _RenderViewportSet(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderViewportSet(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderViewportSet(renderer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderSafeArea")]
|
|
private static partial byte _GetRenderSafeArea(SdlRenderer renderer, SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderSafeArea(SdlRenderer renderer, SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderSafeArea(renderer, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetRenderClipRect")]
|
|
private static partial byte _SetRenderClipRect(SdlRenderer renderer, SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetRenderClipRect(SdlRenderer renderer, SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetRenderClipRect(renderer, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderClipRect")]
|
|
private static partial byte _GetRenderClipRect(SdlRenderer renderer, SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderClipRect(SdlRenderer renderer, SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderClipRect(renderer, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderClipEnabled")]
|
|
private static partial byte _RenderClipEnabled(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderClipEnabled(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderClipEnabled(renderer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetRenderScale")]
|
|
private static partial byte _SetRenderScale(SdlRenderer renderer, float scaleX, float scaleY);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetRenderScale(SdlRenderer renderer, float scaleX, float scaleY)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetRenderScale(renderer, scaleX, scaleY);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderScale")]
|
|
private static partial byte _GetRenderScale(SdlRenderer renderer, float* scaleX, float* scaleY);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderScale(SdlRenderer renderer, float* scaleX, float* scaleY)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderScale(renderer, scaleX, scaleY);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetRenderDrawColor")]
|
|
private static partial byte _SetRenderDrawColor(SdlRenderer renderer, byte r, byte g, byte b, byte a);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetRenderDrawColor(SdlRenderer renderer, byte r, byte g, byte b, byte a)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetRenderDrawColor(renderer, r, g, b, a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetRenderDrawColorFloat")]
|
|
private static partial byte _SetRenderDrawColorFloat(
|
|
SdlRenderer renderer,
|
|
float r,
|
|
float g,
|
|
float b,
|
|
float a
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetRenderDrawColorFloat(SdlRenderer renderer, float r, float g, float b, float a)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetRenderDrawColorFloat(renderer, r, g, b, a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderDrawColor")]
|
|
private static partial byte _GetRenderDrawColor(SdlRenderer renderer, byte* r, byte* g, byte* b, byte* a);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderDrawColor(SdlRenderer renderer, byte* r, byte* g, byte* b, byte* a)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderDrawColor(renderer, r, g, b, a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderDrawColorFloat")]
|
|
private static partial byte _GetRenderDrawColorFloat(
|
|
SdlRenderer renderer,
|
|
float* r,
|
|
float* g,
|
|
float* b,
|
|
float* a
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderDrawColorFloat(SdlRenderer renderer, float* r, float* g, float* b, float* a)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderDrawColorFloat(renderer, r, g, b, a);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetRenderColorScale")]
|
|
private static partial byte _SetRenderColorScale(SdlRenderer renderer, float scale);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetRenderColorScale(SdlRenderer renderer, float scale)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetRenderColorScale(renderer, scale);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderColorScale")]
|
|
private static partial byte _GetRenderColorScale(SdlRenderer renderer, float* scale);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderColorScale(SdlRenderer renderer, float* scale)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderColorScale(renderer, scale);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetRenderDrawBlendMode")]
|
|
private static partial byte _SetRenderDrawBlendMode(SdlRenderer renderer, uint blendMode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetRenderDrawBlendMode(SdlRenderer renderer, uint blendMode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetRenderDrawBlendMode(renderer, blendMode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderDrawBlendMode")]
|
|
private static partial byte _GetRenderDrawBlendMode(SdlRenderer renderer, uint* blendMode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderDrawBlendMode(SdlRenderer renderer, uint* blendMode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderDrawBlendMode(renderer, blendMode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderClear")]
|
|
private static partial byte _RenderClear(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderClear(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderClear(renderer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderPoint")]
|
|
private static partial byte _RenderPoint(SdlRenderer renderer, float x, float y);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderPoint(SdlRenderer renderer, float x, float y)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderPoint(renderer, x, y);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderPoints")]
|
|
private static partial byte _RenderPoints(SdlRenderer renderer, SdlFPoint* points, int count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderPoints(SdlRenderer renderer, SdlFPoint* points, int count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderPoints(renderer, points, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderLine")]
|
|
private static partial byte _RenderLine(SdlRenderer renderer, float x1, float y1, float x2, float y2);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderLine(SdlRenderer renderer, float x1, float y1, float x2, float y2)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderLine(renderer, x1, y1, x2, y2);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderLines")]
|
|
private static partial byte _RenderLines(SdlRenderer renderer, SdlFPoint* points, int count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderLines(SdlRenderer renderer, SdlFPoint* points, int count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderLines(renderer, points, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderRect")]
|
|
private static partial byte _RenderRect(SdlRenderer renderer, SdlFRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderRect(SdlRenderer renderer, SdlFRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderRect(renderer, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderRects")]
|
|
private static partial byte _RenderRects(SdlRenderer renderer, SdlFRect* rects, int count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderRects(SdlRenderer renderer, SdlFRect* rects, int count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderRects(renderer, rects, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderFillRect")]
|
|
private static partial byte _RenderFillRect(SdlRenderer renderer, SdlFRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderFillRect(SdlRenderer renderer, SdlFRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderFillRect(renderer, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderFillRects")]
|
|
private static partial byte _RenderFillRects(SdlRenderer renderer, SdlFRect* rects, int count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderFillRects(SdlRenderer renderer, SdlFRect* rects, int count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderFillRects(renderer, rects, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderTexture")]
|
|
private static partial byte _RenderTexture(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlFRect* srcrect,
|
|
SdlFRect* dstrect
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderTexture(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlFRect* srcrect,
|
|
SdlFRect* dstrect
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderTexture(renderer, texture, srcrect, dstrect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderTextureRotated")]
|
|
private static partial byte _RenderTextureRotated(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlFRect* srcrect,
|
|
SdlFRect* dstrect,
|
|
double angle,
|
|
SdlFPoint* center,
|
|
SdlFlipMode flip
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderTextureRotated(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlFRect* srcrect,
|
|
SdlFRect* dstrect,
|
|
double angle,
|
|
SdlFPoint* center,
|
|
SdlFlipMode flip
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderTextureRotated(renderer, texture, srcrect, dstrect, angle, center, flip);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderTextureAffine")]
|
|
private static partial byte _RenderTextureAffine(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlFRect* srcrect,
|
|
SdlFPoint* origin,
|
|
SdlFPoint* right,
|
|
SdlFPoint* down
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderTextureAffine(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlFRect* srcrect,
|
|
SdlFPoint* origin,
|
|
SdlFPoint* right,
|
|
SdlFPoint* down
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderTextureAffine(renderer, texture, srcrect, origin, right, down);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderTextureTiled")]
|
|
private static partial byte _RenderTextureTiled(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlFRect* srcrect,
|
|
float scale,
|
|
SdlFRect* dstrect
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderTextureTiled(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlFRect* srcrect,
|
|
float scale,
|
|
SdlFRect* dstrect
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderTextureTiled(renderer, texture, srcrect, scale, dstrect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderTexture9Grid")]
|
|
private static partial byte _RenderTexture9Grid(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlFRect* srcrect,
|
|
float left_width,
|
|
float right_width,
|
|
float top_height,
|
|
float bottom_height,
|
|
float scale,
|
|
SdlFRect* dstrect
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderTexture9Grid(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlFRect* srcrect,
|
|
float left_width,
|
|
float right_width,
|
|
float top_height,
|
|
float bottom_height,
|
|
float scale,
|
|
SdlFRect* dstrect
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderTexture9Grid(
|
|
renderer,
|
|
texture,
|
|
srcrect,
|
|
left_width,
|
|
right_width,
|
|
top_height,
|
|
bottom_height,
|
|
scale,
|
|
dstrect
|
|
);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderTexture9GridTiled")]
|
|
private static partial byte _RenderTexture9GridTiled(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlFRect* srcrect,
|
|
float left_width,
|
|
float right_width,
|
|
float top_height,
|
|
float bottom_height,
|
|
float scale,
|
|
SdlFRect* dstrect,
|
|
float tileScale
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderTexture9GridTiled(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlFRect* srcrect,
|
|
float left_width,
|
|
float right_width,
|
|
float top_height,
|
|
float bottom_height,
|
|
float scale,
|
|
SdlFRect* dstrect,
|
|
float tileScale
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderTexture9GridTiled(
|
|
renderer,
|
|
texture,
|
|
srcrect,
|
|
left_width,
|
|
right_width,
|
|
top_height,
|
|
bottom_height,
|
|
scale,
|
|
dstrect,
|
|
tileScale
|
|
);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderGeometry")]
|
|
private static partial byte _RenderGeometry(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlVertex* vertices,
|
|
int num_vertices,
|
|
int* indices,
|
|
int num_indices
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderGeometry(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
SdlVertex* vertices,
|
|
int num_vertices,
|
|
int* indices,
|
|
int num_indices
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderGeometry(renderer, texture, vertices, num_vertices, indices, num_indices);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderGeometryRaw")]
|
|
private static partial byte _RenderGeometryRaw(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
float* xy,
|
|
int xy_stride,
|
|
SdlFColor* color,
|
|
int color_stride,
|
|
float* uv,
|
|
int uv_stride,
|
|
int num_vertices,
|
|
void* indices,
|
|
int num_indices,
|
|
int size_indices
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderGeometryRaw(
|
|
SdlRenderer renderer,
|
|
SdlTexture texture,
|
|
float* xy,
|
|
int xy_stride,
|
|
SdlFColor* color,
|
|
int color_stride,
|
|
float* uv,
|
|
int uv_stride,
|
|
int num_vertices,
|
|
void* indices,
|
|
int num_indices,
|
|
int size_indices
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderGeometryRaw(
|
|
renderer,
|
|
texture,
|
|
xy,
|
|
xy_stride,
|
|
color,
|
|
color_stride,
|
|
uv,
|
|
uv_stride,
|
|
num_vertices,
|
|
indices,
|
|
num_indices,
|
|
size_indices
|
|
);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetRenderTextureAddressMode")]
|
|
private static partial byte _SetRenderTextureAddressMode(
|
|
SdlRenderer renderer,
|
|
SdlTextureAddressMode u_mode,
|
|
SdlTextureAddressMode v_mode
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetRenderTextureAddressMode(
|
|
SdlRenderer renderer,
|
|
SdlTextureAddressMode u_mode,
|
|
SdlTextureAddressMode v_mode
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetRenderTextureAddressMode(renderer, u_mode, v_mode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderTextureAddressMode")]
|
|
private static partial byte _GetRenderTextureAddressMode(
|
|
SdlRenderer renderer,
|
|
SdlTextureAddressMode* u_mode,
|
|
SdlTextureAddressMode* v_mode
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderTextureAddressMode(
|
|
SdlRenderer renderer,
|
|
SdlTextureAddressMode* u_mode,
|
|
SdlTextureAddressMode* v_mode
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderTextureAddressMode(renderer, u_mode, v_mode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderReadPixels")]
|
|
private static partial SdlSurface* _RenderReadPixels(SdlRenderer renderer, SdlRect* rect);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSurface* RenderReadPixels(SdlRenderer renderer, SdlRect* rect)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderReadPixels(renderer, rect);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RenderPresent")]
|
|
private static partial byte _RenderPresent(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderPresent(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderPresent(renderer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyTexture")]
|
|
private static partial void _DestroyTexture(SdlTexture texture);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyTexture(SdlTexture texture)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyTexture(texture);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyRenderer")]
|
|
private static partial void _DestroyRenderer(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyRenderer(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyRenderer(renderer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_FlushRenderer")]
|
|
private static partial byte _FlushRenderer(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte FlushRenderer(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _FlushRenderer(renderer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderMetalLayer")]
|
|
private static partial void* _GetRenderMetalLayer(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* GetRenderMetalLayer(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderMetalLayer(renderer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderMetalCommandEncoder")]
|
|
private static partial void* _GetRenderMetalCommandEncoder(SdlRenderer renderer);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void* GetRenderMetalCommandEncoder(SdlRenderer renderer)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderMetalCommandEncoder(renderer);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AddVulkanRenderSemaphores")]
|
|
private static partial byte _AddVulkanRenderSemaphores(
|
|
SdlRenderer renderer,
|
|
uint wait_stage_mask,
|
|
long wait_semaphore,
|
|
long signal_semaphore
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte AddVulkanRenderSemaphores(
|
|
SdlRenderer renderer,
|
|
uint wait_stage_mask,
|
|
long wait_semaphore,
|
|
long signal_semaphore
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AddVulkanRenderSemaphores(renderer, wait_stage_mask, wait_semaphore, signal_semaphore);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetRenderVSync")]
|
|
private static partial byte _SetRenderVSync(SdlRenderer renderer, int vsync);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetRenderVSync(SdlRenderer renderer, int vsync)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetRenderVSync(renderer, vsync);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetRenderVSync")]
|
|
private static partial byte _GetRenderVSync(SdlRenderer renderer, int* vsync);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetRenderVSync(SdlRenderer renderer, int* vsync)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRenderVSync(renderer, vsync);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_RenderDebugText",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _RenderDebugText(SdlRenderer renderer, float x, float y, string str);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenderDebugText(SdlRenderer renderer, float x, float y, string str)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenderDebugText(renderer, x, y, str);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetDefaultTextureScaleMode")]
|
|
private static partial byte _SetDefaultTextureScaleMode(SdlRenderer renderer, SdlScaleMode scale_mode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetDefaultTextureScaleMode(SdlRenderer renderer, SdlScaleMode scale_mode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetDefaultTextureScaleMode(renderer, scale_mode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDefaultTextureScaleMode")]
|
|
private static partial byte _GetDefaultTextureScaleMode(SdlRenderer renderer, SdlScaleMode* scale_mode);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetDefaultTextureScaleMode(SdlRenderer renderer, SdlScaleMode* scale_mode)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDefaultTextureScaleMode(renderer, scale_mode);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateGPURenderState")]
|
|
private static partial nint _CreateGpuRenderState(
|
|
SdlRenderer renderer,
|
|
SdlGpuRenderStateCreateInfo* createinfo
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateGpuRenderState(SdlRenderer renderer, SdlGpuRenderStateCreateInfo* createinfo)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateGpuRenderState(renderer, createinfo);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetGPURenderStateFragmentUniforms")]
|
|
private static partial byte _SetGpuRenderStateFragmentUniforms(
|
|
nint state,
|
|
uint slot_index,
|
|
void* data,
|
|
uint length
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetGpuRenderStateFragmentUniforms(nint state, uint slot_index, void* data, uint length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetGpuRenderStateFragmentUniforms(state, slot_index, data, length);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetGPURenderState")]
|
|
private static partial byte _SetGpuRenderState(SdlRenderer renderer, nint state);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte SetGpuRenderState(SdlRenderer renderer, nint state)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _SetGpuRenderState(renderer, state);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyGPURenderState")]
|
|
private static partial void _DestroyGpuRenderState(nint state);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyGpuRenderState(nint state)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyGpuRenderState(state);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_OpenTitleStorage",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nint _OpenTitleStorage(string @override, uint props);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint OpenTitleStorage(string @override, uint props)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenTitleStorage(@override, props);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_OpenUserStorage",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nint _OpenUserStorage(string org, string app, uint props);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint OpenUserStorage(string org, string app, uint props)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenUserStorage(org, app, props);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_OpenFileStorage",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nint _OpenFileStorage(string path);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint OpenFileStorage(string path)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenFileStorage(path);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OpenStorage")]
|
|
private static partial nint _OpenStorage(SdlStorageInterface* iface, void* userdata);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint OpenStorage(SdlStorageInterface* iface, void* userdata)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _OpenStorage(iface, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CloseStorage")]
|
|
private static partial byte _CloseStorage(nint storage);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CloseStorage(nint storage)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CloseStorage(storage);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_StorageReady")]
|
|
private static partial byte _StorageReady(nint storage);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte StorageReady(nint storage)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _StorageReady(storage);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetStorageFileSize",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _GetStorageFileSize(nint storage, string path, ulong* length);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetStorageFileSize(nint storage, string path, ulong* length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetStorageFileSize(storage, path, length);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_ReadStorageFile",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _ReadStorageFile(nint storage, string path, void* destination, ulong length);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte ReadStorageFile(nint storage, string path, void* destination, ulong length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _ReadStorageFile(storage, path, destination, length);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_WriteStorageFile",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _WriteStorageFile(nint storage, string path, void* source, ulong length);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte WriteStorageFile(nint storage, string path, void* source, ulong length)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _WriteStorageFile(storage, path, source, length);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_CreateStorageDirectory",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _CreateStorageDirectory(nint storage, string path);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CreateStorageDirectory(nint storage, string path)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateStorageDirectory(storage, path);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_EnumerateStorageDirectory",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _EnumerateStorageDirectory(
|
|
nint storage,
|
|
string path,
|
|
delegate* unmanaged[Cdecl]<void*, byte*, byte*, SdlEnumerationResult> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte EnumerateStorageDirectory(
|
|
nint storage,
|
|
string path,
|
|
delegate* unmanaged[Cdecl]<void*, byte*, byte*, SdlEnumerationResult> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _EnumerateStorageDirectory(storage, path, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_RemoveStoragePath",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _RemoveStoragePath(nint storage, string path);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RemoveStoragePath(nint storage, string path)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RemoveStoragePath(storage, path);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_RenameStoragePath",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _RenameStoragePath(nint storage, string oldpath, string newpath);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RenameStoragePath(nint storage, string oldpath, string newpath)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RenameStoragePath(storage, oldpath, newpath);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_CopyStorageFile",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _CopyStorageFile(nint storage, string oldpath, string newpath);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte CopyStorageFile(nint storage, string oldpath, string newpath)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CopyStorageFile(storage, oldpath, newpath);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetStoragePathInfo",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte _GetStoragePathInfo(nint storage, string path, SdlPathInfo* info);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetStoragePathInfo(nint storage, string path, SdlPathInfo* info)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetStoragePathInfo(storage, path, info);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetStorageSpaceRemaining")]
|
|
private static partial ulong _GetStorageSpaceRemaining(nint storage);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ulong GetStorageSpaceRemaining(nint storage)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetStorageSpaceRemaining(storage);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GlobStorageDirectory",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial byte** _GlobStorageDirectory(
|
|
nint storage,
|
|
string path,
|
|
string pattern,
|
|
SdlGlobFlags flags,
|
|
int* count
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte** GlobStorageDirectory(
|
|
nint storage,
|
|
string path,
|
|
string pattern,
|
|
SdlGlobFlags flags,
|
|
int* count
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GlobStorageDirectory(storage, path, pattern, flags, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetX11EventHook")]
|
|
private static partial void _SetX11EventHook(
|
|
delegate* unmanaged[Cdecl]<void*, nint, byte> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetX11EventHook(delegate* unmanaged[Cdecl]<void*, nint, byte> callback, void* userdata)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetX11EventHook(callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_IsTablet")]
|
|
private static partial byte _IsTablet();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte IsTablet()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IsTablet();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_IsTV")]
|
|
private static partial byte _IsTV();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte IsTV()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _IsTV();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetSandbox")]
|
|
private static partial SdlSandbox _GetSandbox();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static SdlSandbox GetSandbox()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetSandbox();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OnApplicationWillTerminate")]
|
|
private static partial void _OnApplicationWillTerminate();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void OnApplicationWillTerminate()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_OnApplicationWillTerminate();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OnApplicationDidReceiveMemoryWarning")]
|
|
private static partial void _OnApplicationDidReceiveMemoryWarning();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void OnApplicationDidReceiveMemoryWarning()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_OnApplicationDidReceiveMemoryWarning();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OnApplicationWillEnterBackground")]
|
|
private static partial void _OnApplicationWillEnterBackground();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void OnApplicationWillEnterBackground()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_OnApplicationWillEnterBackground();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OnApplicationDidEnterBackground")]
|
|
private static partial void _OnApplicationDidEnterBackground();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void OnApplicationDidEnterBackground()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_OnApplicationDidEnterBackground();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OnApplicationWillEnterForeground")]
|
|
private static partial void _OnApplicationWillEnterForeground();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void OnApplicationWillEnterForeground()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_OnApplicationWillEnterForeground();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_OnApplicationDidEnterForeground")]
|
|
private static partial void _OnApplicationDidEnterForeground();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void OnApplicationDidEnterForeground()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_OnApplicationDidEnterForeground();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDateTimeLocalePreferences")]
|
|
private static partial byte _GetDateTimeLocalePreferences(
|
|
SdlDateFormat* dateFormat,
|
|
SdlTimeFormat* timeFormat
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetDateTimeLocalePreferences(SdlDateFormat* dateFormat, SdlTimeFormat* timeFormat)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDateTimeLocalePreferences(dateFormat, timeFormat);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetCurrentTime")]
|
|
private static partial byte _GetCurrentTime(long* ticks);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetCurrentTime(long* ticks)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetCurrentTime(ticks);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_TimeToDateTime")]
|
|
private static partial byte _TimeToDateTime(long ticks, SdlDateTime* dt, byte localTime);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte TimeToDateTime(long ticks, SdlDateTime* dt, byte localTime)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _TimeToDateTime(ticks, dt, localTime);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DateTimeToTime")]
|
|
private static partial byte _DateTimeToTime(SdlDateTime* dt, long* ticks);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte DateTimeToTime(SdlDateTime* dt, long* ticks)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _DateTimeToTime(dt, ticks);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_TimeToWindows")]
|
|
private static partial void _TimeToWindows(long ticks, uint* dwLowDateTime, uint* dwHighDateTime);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void TimeToWindows(long ticks, uint* dwLowDateTime, uint* dwHighDateTime)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_TimeToWindows(ticks, dwLowDateTime, dwHighDateTime);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_TimeFromWindows")]
|
|
private static partial long _TimeFromWindows(uint dwLowDateTime, uint dwHighDateTime);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static long TimeFromWindows(uint dwLowDateTime, uint dwHighDateTime)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _TimeFromWindows(dwLowDateTime, dwHighDateTime);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDaysInMonth")]
|
|
private static partial int _GetDaysInMonth(int year, int month);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetDaysInMonth(int year, int month)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDaysInMonth(year, month);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDayOfYear")]
|
|
private static partial int _GetDayOfYear(int year, int month, int day);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetDayOfYear(int year, int month, int day)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDayOfYear(year, month, day);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetDayOfWeek")]
|
|
private static partial int _GetDayOfWeek(int year, int month, int day);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetDayOfWeek(int year, int month, int day)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetDayOfWeek(year, month, day);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTicks")]
|
|
private static partial ulong _GetTicks();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ulong GetTicks()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTicks();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTicksNS")]
|
|
private static partial ulong _GetTicksNS();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ulong GetTicksNS()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTicksNS();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetPerformanceCounter")]
|
|
private static partial ulong _GetPerformanceCounter();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ulong GetPerformanceCounter()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPerformanceCounter();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetPerformanceFrequency")]
|
|
private static partial ulong _GetPerformanceFrequency();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ulong GetPerformanceFrequency()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetPerformanceFrequency();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_Delay")]
|
|
private static partial void _Delay(uint ms);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void Delay(uint ms)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_Delay(ms);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DelayNS")]
|
|
private static partial void _DelayNS(ulong ns);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DelayNS(ulong ns)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DelayNS(ns);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DelayPrecise")]
|
|
private static partial void _DelayPrecise(ulong ns);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DelayPrecise(ulong ns)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DelayPrecise(ns);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AddTimer")]
|
|
private static partial uint _AddTimer(
|
|
uint interval,
|
|
delegate* unmanaged[Cdecl]<void*, uint, uint, uint> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint AddTimer(
|
|
uint interval,
|
|
delegate* unmanaged[Cdecl]<void*, uint, uint, uint> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AddTimer(interval, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_AddTimerNS")]
|
|
private static partial uint _AddTimerNS(
|
|
ulong interval,
|
|
delegate* unmanaged[Cdecl]<void*, uint, ulong, ulong> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static uint AddTimerNS(
|
|
ulong interval,
|
|
delegate* unmanaged[Cdecl]<void*, uint, ulong, ulong> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _AddTimerNS(interval, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RemoveTimer")]
|
|
private static partial byte _RemoveTimer(uint id);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte RemoveTimer(uint id)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _RemoveTimer(id);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_CreateTray",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nint _CreateTray(SdlSurface* icon, string tooltip);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateTray(SdlSurface* icon, string tooltip)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateTray(icon, tooltip);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTrayIcon")]
|
|
private static partial void _SetTrayIcon(nint tray, SdlSurface* icon);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetTrayIcon(nint tray, SdlSurface* icon)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetTrayIcon(tray, icon);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetTrayTooltip",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void _SetTrayTooltip(nint tray, string tooltip);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetTrayTooltip(nint tray, string tooltip)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetTrayTooltip(tray, tooltip);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateTrayMenu")]
|
|
private static partial nint _CreateTrayMenu(nint tray);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateTrayMenu(nint tray)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateTrayMenu(tray);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_CreateTraySubmenu")]
|
|
private static partial nint _CreateTraySubmenu(nint entry);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint CreateTraySubmenu(nint entry)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _CreateTraySubmenu(entry);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTrayMenu")]
|
|
private static partial nint _GetTrayMenu(nint tray);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint GetTrayMenu(nint tray)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTrayMenu(tray);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTraySubmenu")]
|
|
private static partial nint _GetTraySubmenu(nint entry);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint GetTraySubmenu(nint entry)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTraySubmenu(entry);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTrayEntries")]
|
|
private static partial nint* _GetTrayEntries(nint menu, int* count);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint* GetTrayEntries(nint menu, int* count)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTrayEntries(menu, count);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_RemoveTrayEntry")]
|
|
private static partial void _RemoveTrayEntry(nint entry);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void RemoveTrayEntry(nint entry)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_RemoveTrayEntry(entry);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_InsertTrayEntryAt",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial nint _InsertTrayEntryAt(nint menu, int pos, string label, SdlTrayEntryFlags flags);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint InsertTrayEntryAt(nint menu, int pos, string label, SdlTrayEntryFlags flags)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _InsertTrayEntryAt(menu, pos, label, flags);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_SetTrayEntryLabel",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial void _SetTrayEntryLabel(nint entry, string label);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetTrayEntryLabel(nint entry, string label)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetTrayEntryLabel(entry, label);
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetTrayEntryLabel",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetTrayEntryLabel(nint entry);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetTrayEntryLabel(nint entry)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTrayEntryLabel(entry);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTrayEntryChecked")]
|
|
private static partial void _SetTrayEntryChecked(nint entry, byte @checked);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetTrayEntryChecked(nint entry, byte @checked)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetTrayEntryChecked(entry, @checked);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTrayEntryChecked")]
|
|
private static partial byte _GetTrayEntryChecked(nint entry);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetTrayEntryChecked(nint entry)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTrayEntryChecked(entry);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTrayEntryEnabled")]
|
|
private static partial void _SetTrayEntryEnabled(nint entry, byte enabled);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetTrayEntryEnabled(nint entry, byte enabled)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetTrayEntryEnabled(entry, enabled);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTrayEntryEnabled")]
|
|
private static partial byte _GetTrayEntryEnabled(nint entry);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static byte GetTrayEntryEnabled(nint entry)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTrayEntryEnabled(entry);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_SetTrayEntryCallback")]
|
|
private static partial void _SetTrayEntryCallback(
|
|
nint entry,
|
|
delegate* unmanaged[Cdecl]<void*, nint, void> callback,
|
|
void* userdata
|
|
);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void SetTrayEntryCallback(
|
|
nint entry,
|
|
delegate* unmanaged[Cdecl]<void*, nint, void> callback,
|
|
void* userdata
|
|
)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_SetTrayEntryCallback(entry, callback, userdata);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_ClickTrayEntry")]
|
|
private static partial void _ClickTrayEntry(nint entry);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void ClickTrayEntry(nint entry)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_ClickTrayEntry(entry);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_DestroyTray")]
|
|
private static partial void _DestroyTray(nint tray);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void DestroyTray(nint tray)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_DestroyTray(tray);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTrayEntryParent")]
|
|
private static partial nint _GetTrayEntryParent(nint entry);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint GetTrayEntryParent(nint entry)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTrayEntryParent(entry);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTrayMenuParentEntry")]
|
|
private static partial nint _GetTrayMenuParentEntry(nint menu);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint GetTrayMenuParentEntry(nint menu)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTrayMenuParentEntry(menu);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetTrayMenuParentTray")]
|
|
private static partial nint _GetTrayMenuParentTray(nint menu);
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static nint GetTrayMenuParentTray(nint menu)
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetTrayMenuParentTray(menu);
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_UpdateTrays")]
|
|
private static partial void _UpdateTrays();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static void UpdateTrays()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
_UpdateTrays();
|
|
}
|
|
|
|
[LibraryImport(Dll, EntryPoint = "SDL_GetVersion")]
|
|
private static partial int _GetVersion();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int GetVersion()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetVersion();
|
|
}
|
|
|
|
[LibraryImport(
|
|
Dll,
|
|
EntryPoint = "SDL_GetRevision",
|
|
StringMarshalling = StringMarshalling.Custom,
|
|
StringMarshallingCustomType = typeof(CustomStringMarshaller)
|
|
)]
|
|
private static partial string? _GetRevision();
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static string? GetRevision()
|
|
{
|
|
Sdl.TraceLog.Trace();
|
|
return _GetRevision();
|
|
}
|
|
}
|
|
}
|
|
}
|