hwsmm
03f3773985
Update bindings to b15fab0207004282aaf0ab0643fd08579121c88a
2024-09-12 12:32:58 +09:00
hwsmm
00c2991885
Update bindings to 73898a0a6493c43943dc675ad1eccd03e16ba0d7
2024-09-03 21:25:00 +09:00
hwsmm
a7cb45ee1b
Update bindings to df501040fd646a1f4eab92aa5b698b35a36013ed
2024-09-03 21:25:00 +09:00
hwsmm
9f75280505
Fix tests
2024-08-28 22:46:24 +09:00
hwsmm
15e2c5442d
Update bindings to ace6920d4433599e99083892fc12495239ee3d61
2024-08-28 22:04:50 +09:00
hwsmm
5235b75dd3
Update bindings to 9eac3a434e328bd6f7470eb59076dcf7dae237be
2024-08-22 22:21:40 +09:00
hwsmm
dbff763b5c
Update bindings to f93920a4f16c4d16f6cd3797191e7894542dac4b
2024-08-11 14:06:24 +09:00
hwsmm
aed3cb24dd
Update bindings to a1998d106daf1ed1c30ff7a2dfb2a9c7c34d4040
2024-08-06 20:08:00 +09:00
hwsmm
61fb6d840b
Update bindings to 4f343f96b4624dac7632fca58438c1664c06a10d
2024-08-05 22:42:50 +09:00
hwsmm
1b1c59046b
Update bindings to 35e42d0a254f230bb736cf993a9c3855ea1680a1
2024-07-28 14:32:21 +09:00
hwsmm
e96b0ebb39
Update bindings to 53022aeb5e539dda5a97ea5dead7b2be62aaf912
2024-07-26 01:00:35 +09:00
hwsmm
8fc87afcec
Update bindings to e1aa99573270eac053b428cc899eebf499b44eca
2024-07-20 17:46:58 +09:00
Susko3
cffad94b9b
Avoid casting
2024-07-14 15:49:53 +02:00
hwsmm
f12c0ae886
Update bindings to b5a7b1ca89f4187641aa25e411e69448a56955f3
2024-07-12 00:37:43 +09:00
hwsmm
25defdb451
Update bindings to f7877902436eae72e3931b2d9ab9d213e095baab
2024-07-02 23:40:58 +09:00
hwsmm
69a12ff56b
Apply suggestions from Susko3
2024-07-02 21:55:34 +09:00
hwsmm
3daf817a01
Update bindings to 596c0af0f319157d748b00d369240a9177a3132f
2024-06-26 01:41:00 +09:00
Susko3
25c2558184
Update SDL3 bindings
...
Updates to https://github.com/libsdl-org/SDL/commit/%206f2621438a65abae114a7210914352b4c1d9c6c3 .
This matches the binaries.
2024-05-18 12:26:03 +02:00
Susko3
99d1c0f9fa
Update bindings to 661f2fc1fca76f79f536919fefe5887a875b6afb
...
Not too happy with the manually defined enums, but it'll do for now.
2024-05-15 20:05:52 +02:00
Susko3
9c37aaef6f
Update `SDL_WINDOWPOS_` macro types
...
See https://wiki.libsdl.org/SDL3/README/migration#sdl_videoh
2024-04-28 14:39:37 +02:00
Susko3
80ed12b6a0
Add string-friendly overload for `SDL_SetClipboardData`
...
`string[]` marshalling is horrible to implement manually, so I'm using `LibraryImport`.
2024-04-23 14:45:12 +02:00
Susko3
d35c803958
Regenerate SDL3 bindings
...
Includes changes up to commit:
a2eb2697a3
70ce808c09
is manually excluded to keep SDL_Keycode sane.
2024-04-17 18:37:09 +02:00
Dan Balasescu
aab02bf6f9
Fix inspections
2024-04-17 12:08:38 +09:00
Susko3
72a002ead0
Add `Utf8String`, sourcegen and tests
2024-04-16 12:59:17 +02:00
Susko3
b6a70cf162
Migrate custom patch to friendly overloads
...
Some changes are still required.
2024-04-15 19:40:55 +02:00
Susko3
f1b7b2caf6
Update bindings to SDL commit 0429f5d6a36fc35b551bcc2acd4a40c2db6dab82
2024-04-15 19:37:01 +02:00
Dan Balasescu
913afa5b4f
Refactorings + auto styling
2024-04-07 12:47:29 +09:00
Susko3
3edde48072
Add [MustDisposeResource] annoations to array helpers
2024-04-06 15:37:29 +02:00
Susko3
e85349e3fa
Change SDL sources to use more proper types
...
This helps consumers avoid having to do ugly casts
as was previously done in `SDL_quit.cs`.
It's very important that the underlying type doesn't change
as that might break ABI compat.
2024-04-06 14:43:18 +02:00
Susko3
91cef07624
Add friendly `string?` overloads to C `(const) char *` functions
...
This is done by adding a `Unsafe_` prefix to `(const) char *` (C# `byte*`) functions.
I am using `string?` instead of `ReadOnlyMemory<byte>?` because the returned pointer can
get invalidated and cause memory-safety issues.
The returned pointer is automatically freed if the return type is `char *`.
I've checked that the documentation for all functions (except in SDL_stdinc.h)
requires calling `SDL_free()` on the pointer.
2024-04-06 14:36:36 +02:00
Susko3
75db9b16c1
Add memory safe IDisposable overloads to array-returning functions
...
This could be done with a source generator, but this is simpler.
2024-04-06 14:20:08 +02:00
Susko3
9a5d2e4dbc
Add C# type-friendly properties/getters to some structs
2024-04-06 14:12:44 +02:00
Susko3
702dc06a03
Add `void *` overload for `SDL_free()`
...
Useful as any pointer type can implicitly covert to void *.
2024-04-06 14:07:38 +02:00
Susko3
42b196611d
Manually implement macro functions
...
All of these get "Function like macro definition records are not supported: [...] Generated bindings may be incomplete."
warnings when running ClangSharp.
2024-04-06 14:05:52 +02:00
Susko3
4b1a1e2102
Move `SDL_Keycode` typdef to global python script to avoid duplicate definition
2024-04-06 13:47:08 +02:00
Susko3
b97a553ed4
Remap `SDL_KeyCode` enum to `SDL_Keycode` typedef
...
This doesn't compile because of duplicate `SDL_Keycode` definition
2024-04-06 13:45:49 +02:00
Susko3
5747f163ac
Manually implement endianness-specific audio formats
2024-04-06 13:42:10 +02:00
Susko3
37da786af0
Define `SDL_FUNCTION_POINTER_IS_VOID_POINTER`
2024-04-06 13:38:13 +02:00
Susko3
caa48201d3
Manually define broken constants
2024-04-06 13:33:00 +02:00
Susko3
9e44316535
Fix invalid `int` -> `SDL_bool` conversion by manually changing SDL headers
2024-04-06 13:33:00 +02:00
Susko3
409ecf7536
Add C# enum "typedefs" for C typedefs
...
This doesn't compile as ClangSharp fails to emit `unchecked`
in `SDL_pen.g.cs` and `SDL_touch.g.cs`.
And `(SDL_bool)` casts in `SDL_rect.g.cs`.
2024-04-06 13:32:55 +02:00
Susko3
dfe0d2533c
Add `[Flags]` attribute to mask/flags enums
2024-04-06 12:58:35 +02:00
Susko3
a25b4be3b2
Add [UnsupportedOSPlatform("windows")] to `SDL_CreateThread()` functions
...
See commit: 72353a8ab9
2024-04-06 12:54:12 +02:00
Susko3
dfe2b5b251
Remap C `void *` to C# `IntPtr`
2024-04-06 12:34:11 +02:00
Susko3
53f98fece1
Map C `char` to C# `byte` instead of `sbyte`
...
This matches .NET's UTF-8 `ReadOnlySpan<byte>` (see `SDL_hints.g.cs`).
2024-04-06 12:31:32 +02:00
Susko3
13b34fe88b
Remap `wchar_t *` to `IntPtr`
...
These map to 16-bit `ushort` on windows, but are 32-bit on Unix.
2024-04-06 12:28:16 +02:00
Susko3
a2178e0022
Add recommended remapping for `SDL_hidapi.h`
2024-04-06 12:22:50 +02:00
Susko3
4ed850c6f3
Exclude `SDL_main()` from DllImport as it isn't exported by SDL3.dll
2024-04-06 01:59:38 +02:00
Susko3
52d13f2972
Add custom definition for win32 MSG struct
...
The win32 types are kinda cursed, but it makes it easy to copy&paste and check.
2024-04-06 01:42:45 +02:00
Susko3
ba561098e7
Fix missing <endian.h> when cross-compiling on windows
...
This works because SDL checks <endian.h> iff SDL_BYTEORDER isn't defined.
6ad390fc50/include/SDL3/SDL_endian.h (L58-L60)
2024-04-06 01:37:05 +02:00