Skip to content

Commit c483a94

Browse files
authored
Merge pull request #236 from smoogipoo/update-bindings
Update bindings
2 parents 8a9ec08 + 523649f commit c483a94

File tree

12 files changed

+296
-200
lines changed

12 files changed

+296
-200
lines changed

External/SDL

Submodule SDL updated 215 files

External/SDL_mixer

Submodule SDL_mixer updated 213 files

SDL3-CS.Tests/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static void Main()
2929
using (var window = new MyWindow())
3030
{
3131
// Check if satellite libraries exist.
32-
Console.WriteLine($"SDL revision: {SDL_GetRevision()}, IMG {IMG_Version()}, TTF {TTF_Version()}, Mixer {Mix_Version()}");
32+
Console.WriteLine($"SDL revision: {SDL_GetRevision()}, IMG {IMG_Version()}, TTF {TTF_Version()}, Mixer {MIX_Version()}");
3333

3434
printDisplays();
3535

SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,6 @@ public static unsafe partial class SDL3
239239
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
240240
public static extern SDL_AudioStream* SDL_OpenAudioDeviceStream(SDL_AudioDeviceID devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioStream*, int, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
241241

242-
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
243-
[return: NativeTypeName("bool")]
244-
public static extern SDLBool SDL_SetAudioIterationCallbacks(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioIterationCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioDeviceID, SDLBool, void> start, [NativeTypeName("SDL_AudioIterationCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioDeviceID, SDLBool, void> end, [NativeTypeName("void*")] IntPtr userdata);
245-
246242
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
247243
[return: NativeTypeName("bool")]
248244
public static extern SDLBool SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioPostmixCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioSpec*, float*, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);

SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@ public static unsafe partial class SDL3
352352
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_8BITDO \"SDL_JOYSTICK_HIDAPI_8BITDO\"")]
353353
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_8BITDO => "SDL_JOYSTICK_HIDAPI_8BITDO"u8;
354354

355+
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SINPUT \"SDL_JOYSTICK_HIDAPI_SINPUT\"")]
356+
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_SINPUT => "SDL_JOYSTICK_HIDAPI_SINPUT"u8;
357+
355358
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI \"SDL_JOYSTICK_HIDAPI_FLYDIGI\"")]
356359
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI => "SDL_JOYSTICK_HIDAPI_FLYDIGI"u8;
357360

@@ -798,5 +801,8 @@ public static unsafe partial class SDL3
798801

799802
[NativeTypeName("#define SDL_HINT_PEN_TOUCH_EVENTS \"SDL_PEN_TOUCH_EVENTS\"")]
800803
public static ReadOnlySpan<byte> SDL_HINT_PEN_TOUCH_EVENTS => "SDL_PEN_TOUCH_EVENTS"u8;
804+
805+
[NativeTypeName("#define SDL_HINT_DEBUG_LOGGING \"SDL_DEBUG_LOGGING\"")]
806+
public static ReadOnlySpan<byte> SDL_HINT_DEBUG_LOGGING => "SDL_DEBUG_LOGGING"u8;
801807
}
802808
}

SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ public static unsafe partial class SDL3
278278
[NativeTypeName("#define SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER \"SDL.iostream.memory.size\"")]
279279
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER => "SDL.iostream.memory.size"u8;
280280

281+
[NativeTypeName("#define SDL_PROP_IOSTREAM_MEMORY_FREE_FUNC_POINTER \"SDL.iostream.memory.free\"")]
282+
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_MEMORY_FREE_FUNC_POINTER => "SDL.iostream.memory.free"u8;
283+
281284
[NativeTypeName("#define SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER \"SDL.iostream.dynamic.memory\"")]
282285
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER => "SDL.iostream.dynamic.memory"u8;
283286

SDL3-CS/SDL3/ClangSharp/SDL_tray.g.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public partial struct SDL_TrayEntry
4242

4343
public static unsafe partial class SDL3
4444
{
45+
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
46+
[return: NativeTypeName("bool")]
47+
public static extern SDLBool SDL_IsTraySupported();
48+
4549
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
4650
public static extern SDL_Tray* SDL_CreateTray(SDL_Surface* icon, [NativeTypeName("const char *")] byte* tooltip);
4751

SDL3_image-CS/SDL3_image/ClangSharp/SDL_image.g.cs

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ misrepresented as being the original software.
2323
3. This notice may not be removed or altered from any source distribution.
2424
*/
2525

26+
using System;
2627
using System.Runtime.InteropServices;
2728

2829
namespace SDL
@@ -40,6 +41,10 @@ public unsafe partial struct IMG_Animation
4041
public int* delays;
4142
}
4243

44+
public partial struct IMG_AnimationStream
45+
{
46+
}
47+
4348
public static unsafe partial class SDL3_image
4449
{
4550
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
@@ -225,6 +230,22 @@ public static unsafe partial class SDL3_image
225230
[return: NativeTypeName("bool")]
226231
public static extern SDLBool IMG_SaveJPG_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, int quality);
227232

233+
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
234+
[return: NativeTypeName("bool")]
235+
public static extern SDLBool IMG_SaveWEBP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, float quality);
236+
237+
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
238+
[return: NativeTypeName("bool")]
239+
public static extern SDLBool IMG_SaveWEBP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file, float quality);
240+
241+
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
242+
[return: NativeTypeName("bool")]
243+
public static extern SDLBool IMG_SaveTGA_IO(SDL_Surface* surface, SDL_IOStream* dst);
244+
245+
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
246+
[return: NativeTypeName("bool")]
247+
public static extern SDLBool IMG_SaveTGA(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file);
248+
228249
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
229250
public static extern IMG_Animation* IMG_LoadAnimation([NativeTypeName("const char *")] byte* file);
230251

@@ -243,6 +264,23 @@ public static unsafe partial class SDL3_image
243264
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
244265
public static extern IMG_Animation* IMG_LoadWEBPAnimation_IO(SDL_IOStream* src);
245266

267+
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
268+
public static extern IMG_AnimationStream* IMG_CreateAnimationStream([NativeTypeName("const char *")] byte* file);
269+
270+
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
271+
public static extern IMG_AnimationStream* IMG_CreateAnimationStream_IO(SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type);
272+
273+
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
274+
public static extern IMG_AnimationStream* IMG_CreateAnimationStreamWithProperties(SDL_PropertiesID props);
275+
276+
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
277+
[return: NativeTypeName("bool")]
278+
public static extern SDLBool IMG_AddAnimationFrame(IMG_AnimationStream* stream, SDL_Surface* surface, [NativeTypeName("Uint64")] ulong pts);
279+
280+
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
281+
[return: NativeTypeName("bool")]
282+
public static extern SDLBool IMG_CloseAnimationStream(IMG_AnimationStream* stream);
283+
246284
[NativeTypeName("#define SDL_IMAGE_MAJOR_VERSION 3")]
247285
public const int SDL_IMAGE_MAJOR_VERSION = 3;
248286

@@ -254,5 +292,26 @@ public static unsafe partial class SDL3_image
254292

255293
[NativeTypeName("#define SDL_IMAGE_VERSION SDL_VERSIONNUM(SDL_IMAGE_MAJOR_VERSION, SDL_IMAGE_MINOR_VERSION, SDL_IMAGE_MICRO_VERSION)")]
256294
public const int SDL_IMAGE_VERSION = ((3) * 1000000 + (3) * 1000 + (0));
295+
296+
[NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_FILENAME_STRING \"SDL_image.animation_stream.create.filename\"")]
297+
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_STREAM_CREATE_FILENAME_STRING => "SDL_image.animation_stream.create.filename"u8;
298+
299+
[NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_IOSTREAM_POINTER \"SDL_image.animation_stream.create.iostream\"")]
300+
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_STREAM_CREATE_IOSTREAM_POINTER => "SDL_image.animation_stream.create.iostream"u8;
301+
302+
[NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN \"SDL_image.animation_stream.create.iostream.autoclose\"")]
303+
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_STREAM_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN => "SDL_image.animation_stream.create.iostream.autoclose"u8;
304+
305+
[NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_TYPE_STRING \"SDL_image.animation_stream.create.type\"")]
306+
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_STREAM_CREATE_TYPE_STRING => "SDL_image.animation_stream.create.type"u8;
307+
308+
[NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_QUALITY_NUMBER \"SDL_image.animation_stream.create.quality\"")]
309+
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_STREAM_CREATE_QUALITY_NUMBER => "SDL_image.animation_stream.create.quality"u8;
310+
311+
[NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_TIMEBASE_NUMERATOR_NUMBER \"SDL_image.animation_stream.create.timebase.numerator\"")]
312+
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_STREAM_CREATE_TIMEBASE_NUMERATOR_NUMBER => "SDL_image.animation_stream.create.timebase.numerator"u8;
313+
314+
[NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_TIMEBASE_DENOMINATOR_NUMBER \"SDL_image.animation_stream.create.timebase.denominator\"")]
315+
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_STREAM_CREATE_TIMEBASE_DENOMINATOR_NUMBER => "SDL_image.animation_stream.create.timebase.denominator"u8;
257316
}
258317
}

0 commit comments

Comments
 (0)