diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs index ab07005..4d7d2d8 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs @@ -1110,6 +1110,9 @@ namespace SDL [return: NativeTypeName("Uint32")] public static extern uint SDL_RegisterEvents(int numevents); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Window* SDL_GetWindowFromEvent([NativeTypeName("const SDL_Event *")] SDL_Event* @event); + [NativeTypeName("#define SDL_RELEASED 0")] public const int SDL_RELEASED = 0; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs index 41d8973..07e7358 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs @@ -89,9 +89,6 @@ namespace SDL [NativeTypeName("#define SDL_HINT_AUDIO_CATEGORY \"SDL_AUDIO_CATEGORY\"")] public static ReadOnlySpan SDL_HINT_AUDIO_CATEGORY => "SDL_AUDIO_CATEGORY"u8; - [NativeTypeName("#define SDL_HINT_AUDIO_DEVICE_APP_NAME \"SDL_AUDIO_DEVICE_APP_NAME\"")] - public static ReadOnlySpan SDL_HINT_AUDIO_DEVICE_APP_NAME => "SDL_AUDIO_DEVICE_APP_NAME"u8; - [NativeTypeName("#define SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME \"SDL_AUDIO_DEVICE_APP_ICON_NAME\"")] public static ReadOnlySpan SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME => "SDL_AUDIO_DEVICE_APP_ICON_NAME"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs index 0b3726d..4e92f26 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs @@ -23,11 +23,12 @@ 3. This notice may not be removed or altered from any source distribution. */ +using System; using System.Runtime.InteropServices; namespace SDL { - public static partial class SDL3 + public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_Init(SDL_InitFlags flags); @@ -44,6 +45,16 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_Quit(); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_SetAppMetadata([NativeTypeName("const char *")] byte* appname, [NativeTypeName("const char *")] byte* appversion, [NativeTypeName("const char *")] byte* appidentifier); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_SetAppMetadataProperty([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAppMetadataProperty", ExactSpelling = true)] + [return: NativeTypeName("const char *")] + public static extern byte* Unsafe_SDL_GetAppMetadataProperty([NativeTypeName("const char *")] byte* name); + [NativeTypeName("#define SDL_INIT_TIMER 0x00000001u")] public const uint SDL_INIT_TIMER = 0x00000001U; @@ -70,5 +81,26 @@ namespace SDL [NativeTypeName("#define SDL_INIT_CAMERA 0x00010000u")] public const uint SDL_INIT_CAMERA = 0x00010000U; + + [NativeTypeName("#define SDL_PROP_APP_METADATA_NAME_STRING \"SDL.app.metadata.name\"")] + public static ReadOnlySpan SDL_PROP_APP_METADATA_NAME_STRING => "SDL.app.metadata.name"u8; + + [NativeTypeName("#define SDL_PROP_APP_METADATA_VERSION_STRING \"SDL.app.metadata.version\"")] + public static ReadOnlySpan SDL_PROP_APP_METADATA_VERSION_STRING => "SDL.app.metadata.version"u8; + + [NativeTypeName("#define SDL_PROP_APP_METADATA_IDENTIFIER_STRING \"SDL.app.metadata.identifier\"")] + public static ReadOnlySpan SDL_PROP_APP_METADATA_IDENTIFIER_STRING => "SDL.app.metadata.identifier"u8; + + [NativeTypeName("#define SDL_PROP_APP_METADATA_CREATOR_STRING \"SDL.app.metadata.creator\"")] + public static ReadOnlySpan SDL_PROP_APP_METADATA_CREATOR_STRING => "SDL.app.metadata.creator"u8; + + [NativeTypeName("#define SDL_PROP_APP_METADATA_COPYRIGHT_STRING \"SDL.app.metadata.copyright\"")] + public static ReadOnlySpan SDL_PROP_APP_METADATA_COPYRIGHT_STRING => "SDL.app.metadata.copyright"u8; + + [NativeTypeName("#define SDL_PROP_APP_METADATA_URL_STRING \"SDL.app.metadata.url\"")] + public static ReadOnlySpan SDL_PROP_APP_METADATA_URL_STRING => "SDL.app.metadata.url"u8; + + [NativeTypeName("#define SDL_PROP_APP_METADATA_TYPE_STRING \"SDL.app.metadata.type\"")] + public static ReadOnlySpan SDL_PROP_APP_METADATA_TYPE_STRING => "SDL.app.metadata.type"u8; } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs index 70429b6..44b1b52 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs @@ -23,10 +23,32 @@ 3. This notice may not be removed or altered from any source distribution. */ +using System; using System.Runtime.InteropServices; namespace SDL { + public enum SDL_TextInputType + { + SDL_TEXTINPUT_TYPE_TEXT, + SDL_TEXTINPUT_TYPE_TEXT_NAME, + SDL_TEXTINPUT_TYPE_TEXT_EMAIL, + SDL_TEXTINPUT_TYPE_TEXT_USERNAME, + SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_HIDDEN, + SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_VISIBLE, + SDL_TEXTINPUT_TYPE_NUMBER, + SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_HIDDEN, + SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_VISIBLE, + } + + public enum SDL_Capitalization + { + SDL_CAPITALIZE_NONE, + SDL_CAPITALIZE_SENTENCES, + SDL_CAPITALIZE_WORDS, + SDL_CAPITALIZE_LETTERS, + } + public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] @@ -87,6 +109,9 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_StartTextInput(SDL_Window* window); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_StartTextInputWithProperties(SDL_Window* window, SDL_PropertiesID props); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_TextInputActive(SDL_Window* window); @@ -107,5 +132,20 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_ScreenKeyboardShown(SDL_Window* window); + + [NativeTypeName("#define SDL_PROP_TEXTINPUT_TYPE_NUMBER \"SDL.textinput.type\"")] + public static ReadOnlySpan SDL_PROP_TEXTINPUT_TYPE_NUMBER => "SDL.textinput.type"u8; + + [NativeTypeName("#define SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER \"SDL.textinput.capitalization\"")] + public static ReadOnlySpan SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER => "SDL.textinput.capitalization"u8; + + [NativeTypeName("#define SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN \"SDL.textinput.autocorrect\"")] + public static ReadOnlySpan SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN => "SDL.textinput.autocorrect"u8; + + [NativeTypeName("#define SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN \"SDL.textinput.multiline\"")] + public static ReadOnlySpan SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN => "SDL.textinput.multiline"u8; + + [NativeTypeName("#define SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER \"SDL.textinput.android.inputtype\"")] + public static ReadOnlySpan SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER => "SDL.textinput.android.inputtype"u8; } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs index c1aeb23..ae4d4ab 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs @@ -65,6 +65,14 @@ namespace SDL public static unsafe partial class SDL3 { + public static void SDL_RectToFRect([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, SDL_FRect* frect) + { + frect->x = (float)(rect->x); + frect->y = (float)(rect->y); + frect->w = (float)(rect->w); + frect->h = (float)(rect->h); + } + public static SDL_bool SDL_PointInRect([NativeTypeName("const SDL_Point *")] SDL_Point* p, [NativeTypeName("const SDL_Rect *")] SDL_Rect* r) { return ((p) != null && (r) != null && (p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? (SDL_bool)(1) : (SDL_bool)(0); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs index 812abd8..87cb504 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs @@ -285,7 +285,7 @@ namespace SDL public static extern int SDL_RenderTextureTiled(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_RenderTexture9Grid(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float corner_size, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); + public static extern int SDL_RenderTexture9Grid(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float left_width, float right_width, float top_height, float bottom_height, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_RenderGeometry(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_Vertex *")] SDL_Vertex* vertices, int num_vertices, [NativeTypeName("const int *")] int* indices, int num_indices); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs index b443c1c..b540252 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs @@ -95,6 +95,18 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Palette* SDL_GetSurfacePalette(SDL_Surface* surface); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_AddSurfaceAlternateImage(SDL_Surface* surface, SDL_Surface* image); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_bool SDL_SurfaceHasAlternateImages(SDL_Surface* surface); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Surface** SDL_GetSurfaceImages(SDL_Surface* surface, int* count); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void SDL_RemoveSurfaceAlternateImages(SDL_Surface* surface); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_LockSurface(SDL_Surface* surface); @@ -158,6 +170,9 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_DuplicateSurface(SDL_Surface* surface); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Surface* SDL_ScaleSurface(SDL_Surface* surface, int width, int height, SDL_ScaleMode scaleMode); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_ConvertSurface(SDL_Surface* surface, SDL_PixelFormat format); @@ -204,7 +219,7 @@ namespace SDL public static extern int SDL_BlitSurfaceTiledWithScale(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_BlitSurface9Grid(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, int corner_size, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + public static extern int SDL_BlitSurface9Grid(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, int left_width, int right_width, int top_height, int bottom_height, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")]