From 3381ac1c7da4ddc231bd9d199b6bdf0692b1c079 Mon Sep 17 00:00:00 2001 From: Soreepeong <3614868+Soreepeong@users.noreply.github.com> Date: Wed, 23 Jul 2025 01:18:48 +0900 Subject: [PATCH] Work on manual bindings --- .../InputHandler/Win32InputHandler.cs | 2 +- .../Widgets/GamePrebakedFontsTestWidget.cs | 53 +- Dalamud/Interface/Utility/Raii/EndObjects.cs | 6 +- .../Custom/Generated/Generated.Structs.gen.cs | 26 - .../Custom/Generated/ImGui.gen.cs | 13858 +------ .../Custom/Generated/ImGuiIO.gen.cs | 72 +- .../Custom/Generated/ImGuiIOPtr.gen.cs | 54 +- .../Custom/Generated/ImGuiP.gen.cs | 33601 +--------------- .../Custom/Generated/ImGuiPayload.gen.cs | 60 +- .../Custom/Generated/ImGuiPayloadPtr.gen.cs | 48 +- .../Custom/Generated/ImGuiTextFilter.gen.cs | 135 +- .../Generated/ImGuiTextFilterPtr.gen.cs | 105 +- .../Custom/ImDrawList.Custom.cs | 23 +- .../Custom/ImFont.Custom.cs | 7 +- .../Custom/ImFontAtlas.Custom.cs | 78 + .../Custom/ImFontGlyphRangesBuilder.Custom.cs | 6 +- .../Custom/ImGui.ColorEditPicker.cs | 25 +- .../Custom/ImGui.ComboAndList.cs | 222 + .../Custom/ImGui.DragScalar.cs | 133 +- .../Custom/ImGui.InputScalar.cs | 85 +- .../Custom/ImGui.Misc.cs | 39 +- .../Custom/ImGui.Plot.cs | 193 + .../Custom/ImGui.SliderScalar.cs | 129 +- .../Custom/ImGui.Text.cs | 83 +- .../Custom/ImGui.Widgets.cs | 654 + .../Custom/ImGuiIO.Custom.cs | 33 + .../ImGuiInputTextCallbackData.Custom.cs | 9 +- .../Custom/ImGuiP.Misc.cs | 496 + .../Custom/ImGuiP.Plot.cs | 85 + .../{ImGuiP.Custom.cs => ImGuiP.Text.cs} | 21 +- .../Custom/ImGuiPayload.Custom.cs | 17 + .../Custom/ImGuiStorage.Custom.cs | 60 + .../Custom/ImGuiTextBuffer.Custom.cs | 15 + .../Custom/ImGuiTextFilter.Custom.cs | 22 + .../Custom/ImGuiWindow.Custom.cs | 6 +- .../{AutoUtf8Buffer.cs => Utf8Buffer.cs} | 162 +- test.ps1 | 45 +- 37 files changed, 2596 insertions(+), 48072 deletions(-) create mode 100644 imgui/Dalamud.Bindings.ImGui/Custom/ImFontAtlas.Custom.cs create mode 100644 imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ComboAndList.cs create mode 100644 imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Plot.cs create mode 100644 imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs create mode 100644 imgui/Dalamud.Bindings.ImGui/Custom/ImGuiIO.Custom.cs create mode 100644 imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Misc.cs create mode 100644 imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Plot.cs rename imgui/Dalamud.Bindings.ImGui/Custom/{ImGuiP.Custom.cs => ImGuiP.Text.cs} (91%) create mode 100644 imgui/Dalamud.Bindings.ImGui/Custom/ImGuiPayload.Custom.cs create mode 100644 imgui/Dalamud.Bindings.ImGui/Custom/ImGuiStorage.Custom.cs create mode 100644 imgui/Dalamud.Bindings.ImGui/Custom/ImGuiTextBuffer.Custom.cs create mode 100644 imgui/Dalamud.Bindings.ImGui/Custom/ImGuiTextFilter.Custom.cs rename imgui/Dalamud.Bindings.ImGui/Custom/{AutoUtf8Buffer.cs => Utf8Buffer.cs} (55%) diff --git a/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs b/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs index ff71ecdf7..1842028e2 100644 --- a/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs +++ b/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs @@ -348,7 +348,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler case WM.WM_CHAR: if (io.WantTextInput) { - io.AddInputCharacter((uint)wParam); + io.AddInputCharacter(new Rune((uint)wParam)); return nint.Zero; } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/GamePrebakedFontsTestWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/GamePrebakedFontsTestWidget.cs index 78bcf9998..617e3ce19 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/GamePrebakedFontsTestWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/GamePrebakedFontsTestWidget.cs @@ -61,58 +61,25 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable public unsafe void Draw() { ImGui.AlignTextToFramePadding(); - if (ImGui.Combo("Global Scale per Font", ref this.fontScaleMode, FontScaleModes, FontScaleModes.Length)) + if (ImGui.Combo("Global Scale per Font"u8, ref this.fontScaleMode, FontScaleModes, FontScaleModes.Length)) + this.ClearAtlas(); + if (ImGui.Checkbox("Global Scale for Atlas"u8, ref this.atlasScaleMode)) this.ClearAtlas(); - fixed (byte* labelPtr = "Global Scale for Atlas"u8) - { - var v = this.atlasScaleMode; - if (ImGui.Checkbox(labelPtr, ref v)) - { - this.atlasScaleMode = v; - this.ClearAtlas(); - } - } ImGui.SameLine(); - fixed (byte* labelPtr = "Word Wrap"u8) - { - var v = this.useWordWrap; - if (ImGui.Checkbox(labelPtr, &v)) - this.useWordWrap = v; - } + ImGui.Checkbox("Word Wrap"u8, ref this.useWordWrap); ImGui.SameLine(); - fixed (byte* labelPtr = "Italic"u8) - { - var v = this.useItalic; - if (ImGui.Checkbox(labelPtr, &v)) - { - this.useItalic = v; - this.ClearAtlas(); - } - } + if (ImGui.Checkbox("Italic"u8, ref this.useItalic)) + this.ClearAtlas(); ImGui.SameLine(); - fixed (byte* labelPtr = "Bold"u8) - { - var v = this.useBold; - if (ImGui.Checkbox(labelPtr, &v)) - { - this.useBold = v; - this.ClearAtlas(); - } - } + if (ImGui.Checkbox("Bold"u8, ref this.useBold)) + this.ClearAtlas(); ImGui.SameLine(); - fixed (byte* labelPtr = "Minimum Range"u8) - { - var v = this.useMinimumBuild; - if (ImGui.Checkbox(labelPtr, &v)) - { - this.useMinimumBuild = v; - this.ClearAtlas(); - } - } + if (ImGui.Checkbox("Minimum Range"u8, ref this.useMinimumBuild)) + this.ClearAtlas(); ImGui.SameLine(); if (ImGui.Button("Reset Text") || this.testStringBuffer.IsDisposed) diff --git a/Dalamud/Interface/Utility/Raii/EndObjects.cs b/Dalamud/Interface/Utility/Raii/EndObjects.cs index 5b33b3273..cdc31bb1e 100644 --- a/Dalamud/Interface/Utility/Raii/EndObjects.cs +++ b/Dalamud/Interface/Utility/Raii/EndObjects.cs @@ -225,13 +225,13 @@ public static partial class ImRaii => new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label)); public static unsafe IEndObject TabItem(byte* label, ImGuiTabItemFlags flags) - => new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, null, flags)); + => new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, flags)); public static unsafe IEndObject TabItem(string label, ImGuiTabItemFlags flags) - => new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, null, flags)); + => new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, flags)); public static unsafe IEndObject TabItem(ReadOnlySpan label, ImGuiTabItemFlags flags) - => new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, null, flags)); + => new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, flags)); public static IEndObject TabItem(string label, ref bool open) => new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, ref open)); diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated.Structs.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated.Structs.gen.cs index 778c8b6b0..f853f5402 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated.Structs.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated.Structs.gen.cs @@ -12958,22 +12958,6 @@ namespace Dalamud.Bindings.ImGui { Data = data; } - public unsafe void** GetVoidPtrRef(uint key, void* defaultVal) - { - fixed (ImGuiStorage* @this = &this) - { - void** ret = ImGuiNative.GetVoidPtrRef(@this, key, defaultVal); - return ret; - } - } - public unsafe void** GetVoidPtrRef(uint key) - { - fixed (ImGuiStorage* @this = &this) - { - void** ret = ImGuiNative.GetVoidPtrRef(@this, key, (void*)(default)); - return ret; - } - } } [DebuggerDisplay("{DebuggerDisplay,nq}")] @@ -12997,16 +12981,6 @@ namespace Dalamud.Bindings.ImGui private string DebuggerDisplay => string.Format("ImGuiStoragePtr [0x{0}]", ((nuint)Handle).ToString("X")); public ref ImVector Data => ref Unsafe.AsRef>(&Handle->Data); - public unsafe void** GetVoidPtrRef(uint key, void* defaultVal) - { - void** ret = ImGuiNative.GetVoidPtrRef(Handle, key, defaultVal); - return ret; - } - public unsafe void** GetVoidPtrRef(uint key) - { - void** ret = ImGuiNative.GetVoidPtrRef(Handle, key, (void*)(default)); - return ret; - } } } /* ImGuiStoragePair.cs */ diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGui.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGui.gen.cs index 3cca3efb3..0066d8ef5 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGui.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGui.gen.cs @@ -890,96 +890,6 @@ public unsafe partial class ImGui ImGuiNative.ShowStyleEditor((ImGuiStyle*)preference); } } - public static bool ShowStyleSelector(byte* label) - { - byte ret = ImGuiNative.ShowStyleSelector(label); - return ret != 0; - } - public static bool ShowStyleSelector(ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.ShowStyleSelector((byte*)plabel); - return ret != 0; - } - } - public static bool ShowStyleSelector(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.ShowStyleSelector((byte*)plabel); - return ret != 0; - } - } - public static bool ShowStyleSelector(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.ShowStyleSelector(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static void ShowFontSelector(byte* label) - { - ImGuiNative.ShowFontSelector(label); - } - public static void ShowFontSelector(ref byte label) - { - fixed (byte* plabel = &label) - { - ImGuiNative.ShowFontSelector((byte*)plabel); - } - } - public static void ShowFontSelector(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - ImGuiNative.ShowFontSelector((byte*)plabel); - } - } - public static void ShowFontSelector(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.ShowFontSelector(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static void ShowUserGuide() { ImGuiNative.ShowUserGuide(); @@ -1039,334 +949,6 @@ public unsafe partial class ImGui ImGuiNative.StyleColorsClassic((ImGuiStyle*)pdst); } } - public static bool Begin(byte* name, bool* pOpen, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.Begin(name, pOpen, flags); - return ret != 0; - } - public static bool Begin(byte* name, bool* pOpen) - { - byte ret = ImGuiNative.Begin(name, pOpen, (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool Begin(byte* name) - { - byte ret = ImGuiNative.Begin(name, (bool*)(default), (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool Begin(byte* name, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.Begin(name, (bool*)(default), flags); - return ret != 0; - } - public static bool Begin(ref byte name, bool* pOpen, ImGuiWindowFlags flags) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiNative.Begin((byte*)pname, pOpen, flags); - return ret != 0; - } - } - public static bool Begin(ref byte name, bool* pOpen) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiNative.Begin((byte*)pname, pOpen, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool Begin(ref byte name) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiNative.Begin((byte*)pname, (bool*)(default), (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool Begin(ref byte name, ImGuiWindowFlags flags) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiNative.Begin((byte*)pname, (bool*)(default), flags); - return ret != 0; - } - } - public static bool Begin(ReadOnlySpan name, bool* pOpen, ImGuiWindowFlags flags) - { - fixed (byte* pname = name) - { - byte ret = ImGuiNative.Begin((byte*)pname, pOpen, flags); - return ret != 0; - } - } - public static bool Begin(ReadOnlySpan name, bool* pOpen) - { - fixed (byte* pname = name) - { - byte ret = ImGuiNative.Begin((byte*)pname, pOpen, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool Begin(ReadOnlySpan name) - { - fixed (byte* pname = name) - { - byte ret = ImGuiNative.Begin((byte*)pname, (bool*)(default), (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool Begin(ReadOnlySpan name, ImGuiWindowFlags flags) - { - fixed (byte* pname = name) - { - byte ret = ImGuiNative.Begin((byte*)pname, (bool*)(default), flags); - return ret != 0; - } - } - public static bool Begin(string name, bool* pOpen, ImGuiWindowFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Begin(pStr0, pOpen, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Begin(string name, bool* pOpen) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Begin(pStr0, pOpen, (ImGuiWindowFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Begin(string name) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Begin(pStr0, (bool*)(default), (ImGuiWindowFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Begin(string name, ImGuiWindowFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Begin(pStr0, (bool*)(default), flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Begin(byte* name, ref bool pOpen, ImGuiWindowFlags flags) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.Begin(name, (bool*)ppOpen, flags); - return ret != 0; - } - } - public static bool Begin(byte* name, ref bool pOpen) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.Begin(name, (bool*)ppOpen, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool Begin(ref byte name, ref bool pOpen, ImGuiWindowFlags flags) - { - fixed (byte* pname = &name) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.Begin((byte*)pname, (bool*)ppOpen, flags); - return ret != 0; - } - } - } - public static bool Begin(ref byte name, ref bool pOpen) - { - fixed (byte* pname = &name) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.Begin((byte*)pname, (bool*)ppOpen, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - } - public static bool Begin(ReadOnlySpan name, ref bool pOpen, ImGuiWindowFlags flags) - { - fixed (byte* pname = name) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.Begin((byte*)pname, (bool*)ppOpen, flags); - return ret != 0; - } - } - } - public static bool Begin(ReadOnlySpan name, ref bool pOpen) - { - fixed (byte* pname = name) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.Begin((byte*)pname, (bool*)ppOpen, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - } - public static bool Begin(string name, ref bool pOpen, ImGuiWindowFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.Begin(pStr0, (bool*)ppOpen, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Begin(string name, ref bool pOpen) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.Begin(pStr0, (bool*)ppOpen, (ImGuiWindowFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static void Begin(ImGuiListClipperPtr self, int itemsCount, float itemsHeight) - { - ImGuiNative.Begin(self, itemsCount, itemsHeight); - } - public static void Begin(ImGuiListClipperPtr self, int itemsCount) - { - ImGuiNative.Begin(self, itemsCount, (float)(-1.0f)); - } - public static void Begin(ref ImGuiListClipper self, int itemsCount, float itemsHeight) - { - fixed (ImGuiListClipper* pself = &self) - { - ImGuiNative.Begin((ImGuiListClipper*)pself, itemsCount, itemsHeight); - } - } - public static void Begin(ref ImGuiListClipper self, int itemsCount) - { - fixed (ImGuiListClipper* pself = &self) - { - ImGuiNative.Begin((ImGuiListClipper*)pself, itemsCount, (float)(-1.0f)); - } - } public static void End() { ImGuiNative.End(); @@ -1382,422 +964,6 @@ public unsafe partial class ImGui ImGuiNative.End((ImGuiListClipper*)pself); } } - public static bool BeginChild(byte* strId, Vector2 size, bool border, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.BeginChild(strId, size, border ? (byte)1 : (byte)0, flags); - return ret != 0; - } - public static bool BeginChild(byte* strId, Vector2 size, bool border) - { - byte ret = ImGuiNative.BeginChild(strId, size, border ? (byte)1 : (byte)0, (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool BeginChild(byte* strId, Vector2 size) - { - byte ret = ImGuiNative.BeginChild(strId, size, (byte)(0), (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool BeginChild(byte* strId) - { - byte ret = ImGuiNative.BeginChild(strId, (Vector2)(new Vector2(0,0)), (byte)(0), (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool BeginChild(byte* strId, bool border) - { - byte ret = ImGuiNative.BeginChild(strId, (Vector2)(new Vector2(0,0)), border ? (byte)1 : (byte)0, (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool BeginChild(byte* strId, Vector2 size, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.BeginChild(strId, size, (byte)(0), flags); - return ret != 0; - } - public static bool BeginChild(byte* strId, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.BeginChild(strId, (Vector2)(new Vector2(0,0)), (byte)(0), flags); - return ret != 0; - } - public static bool BeginChild(byte* strId, bool border, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.BeginChild(strId, (Vector2)(new Vector2(0,0)), border ? (byte)1 : (byte)0, flags); - return ret != 0; - } - public static bool BeginChild(ref byte strId, Vector2 size, bool border, ImGuiWindowFlags flags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, size, border ? (byte)1 : (byte)0, flags); - return ret != 0; - } - } - public static bool BeginChild(ref byte strId, Vector2 size, bool border) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, size, border ? (byte)1 : (byte)0, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginChild(ref byte strId, Vector2 size) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, size, (byte)(0), (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginChild(ref byte strId) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, (Vector2)(new Vector2(0,0)), (byte)(0), (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginChild(ref byte strId, bool border) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, (Vector2)(new Vector2(0,0)), border ? (byte)1 : (byte)0, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginChild(ref byte strId, Vector2 size, ImGuiWindowFlags flags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, size, (byte)(0), flags); - return ret != 0; - } - } - public static bool BeginChild(ref byte strId, ImGuiWindowFlags flags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, (Vector2)(new Vector2(0,0)), (byte)(0), flags); - return ret != 0; - } - } - public static bool BeginChild(ref byte strId, bool border, ImGuiWindowFlags flags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, (Vector2)(new Vector2(0,0)), border ? (byte)1 : (byte)0, flags); - return ret != 0; - } - } - public static bool BeginChild(ReadOnlySpan strId, Vector2 size, bool border, ImGuiWindowFlags flags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, size, border ? (byte)1 : (byte)0, flags); - return ret != 0; - } - } - public static bool BeginChild(ReadOnlySpan strId, Vector2 size, bool border) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, size, border ? (byte)1 : (byte)0, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginChild(ReadOnlySpan strId, Vector2 size) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, size, (byte)(0), (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginChild(ReadOnlySpan strId) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, (Vector2)(new Vector2(0,0)), (byte)(0), (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginChild(ReadOnlySpan strId, bool border) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, (Vector2)(new Vector2(0,0)), border ? (byte)1 : (byte)0, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginChild(ReadOnlySpan strId, Vector2 size, ImGuiWindowFlags flags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, size, (byte)(0), flags); - return ret != 0; - } - } - public static bool BeginChild(ReadOnlySpan strId, ImGuiWindowFlags flags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, (Vector2)(new Vector2(0,0)), (byte)(0), flags); - return ret != 0; - } - } - public static bool BeginChild(ReadOnlySpan strId, bool border, ImGuiWindowFlags flags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginChild((byte*)pstrId, (Vector2)(new Vector2(0,0)), border ? (byte)1 : (byte)0, flags); - return ret != 0; - } - } - public static bool BeginChild(string strId, Vector2 size, bool border, ImGuiWindowFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginChild(pStr0, size, border ? (byte)1 : (byte)0, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginChild(string strId, Vector2 size, bool border) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginChild(pStr0, size, border ? (byte)1 : (byte)0, (ImGuiWindowFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginChild(string strId, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginChild(pStr0, size, (byte)(0), (ImGuiWindowFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginChild(string strId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginChild(pStr0, (Vector2)(new Vector2(0,0)), (byte)(0), (ImGuiWindowFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginChild(string strId, bool border) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginChild(pStr0, (Vector2)(new Vector2(0,0)), border ? (byte)1 : (byte)0, (ImGuiWindowFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginChild(string strId, Vector2 size, ImGuiWindowFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginChild(pStr0, size, (byte)(0), flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginChild(string strId, ImGuiWindowFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginChild(pStr0, (Vector2)(new Vector2(0,0)), (byte)(0), flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginChild(string strId, bool border, ImGuiWindowFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginChild(pStr0, (Vector2)(new Vector2(0,0)), border ? (byte)1 : (byte)0, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginChild(uint id, Vector2 size, bool border, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.BeginChild(id, size, border ? (byte)1 : (byte)0, flags); - return ret != 0; - } - public static bool BeginChild(uint id, Vector2 size, bool border) - { - byte ret = ImGuiNative.BeginChild(id, size, border ? (byte)1 : (byte)0, (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool BeginChild(uint id, Vector2 size) - { - byte ret = ImGuiNative.BeginChild(id, size, (byte)(0), (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool BeginChild(uint id) - { - byte ret = ImGuiNative.BeginChild(id, (Vector2)(new Vector2(0,0)), (byte)(0), (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool BeginChild(uint id, bool border) - { - byte ret = ImGuiNative.BeginChild(id, (Vector2)(new Vector2(0,0)), border ? (byte)1 : (byte)0, (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool BeginChild(uint id, Vector2 size, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.BeginChild(id, size, (byte)(0), flags); - return ret != 0; - } - public static bool BeginChild(uint id, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.BeginChild(id, (Vector2)(new Vector2(0,0)), (byte)(0), flags); - return ret != 0; - } - public static bool BeginChild(uint id, bool border, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.BeginChild(id, (Vector2)(new Vector2(0,0)), border ? (byte)1 : (byte)0, flags); - return ret != 0; - } public static void EndChild() { ImGuiNative.EndChild(); @@ -1955,335 +1121,6 @@ public unsafe partial class ImGui { ImGuiNative.SetNextWindowViewport(viewportId); } - public static void SetWindowPos(Vector2 pos, ImGuiCond cond) - { - ImGuiNative.SetWindowPos(pos, cond); - } - public static void SetWindowPos(Vector2 pos) - { - ImGuiNative.SetWindowPos(pos, (ImGuiCond)(0)); - } - public static void SetWindowPos(byte* name, Vector2 pos, ImGuiCond cond) - { - ImGuiNative.SetWindowPos(name, pos, cond); - } - public static void SetWindowPos(byte* name, Vector2 pos) - { - ImGuiNative.SetWindowPos(name, pos, (ImGuiCond)(0)); - } - public static void SetWindowPos(ref byte name, Vector2 pos, ImGuiCond cond) - { - fixed (byte* pname = &name) - { - ImGuiNative.SetWindowPos((byte*)pname, pos, cond); - } - } - public static void SetWindowPos(ref byte name, Vector2 pos) - { - fixed (byte* pname = &name) - { - ImGuiNative.SetWindowPos((byte*)pname, pos, (ImGuiCond)(0)); - } - } - public static void SetWindowPos(ReadOnlySpan name, Vector2 pos, ImGuiCond cond) - { - fixed (byte* pname = name) - { - ImGuiNative.SetWindowPos((byte*)pname, pos, cond); - } - } - public static void SetWindowPos(ReadOnlySpan name, Vector2 pos) - { - fixed (byte* pname = name) - { - ImGuiNative.SetWindowPos((byte*)pname, pos, (ImGuiCond)(0)); - } - } - public static void SetWindowPos(string name, Vector2 pos, ImGuiCond cond) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.SetWindowPos(pStr0, pos, cond); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void SetWindowPos(string name, Vector2 pos) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.SetWindowPos(pStr0, pos, (ImGuiCond)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void SetWindowSize(Vector2 size, ImGuiCond cond) - { - ImGuiNative.SetWindowSize(size, cond); - } - public static void SetWindowSize(Vector2 size) - { - ImGuiNative.SetWindowSize(size, (ImGuiCond)(0)); - } - public static void SetWindowSize(byte* name, Vector2 size, ImGuiCond cond) - { - ImGuiNative.SetWindowSize(name, size, cond); - } - public static void SetWindowSize(byte* name, Vector2 size) - { - ImGuiNative.SetWindowSize(name, size, (ImGuiCond)(0)); - } - public static void SetWindowSize(ref byte name, Vector2 size, ImGuiCond cond) - { - fixed (byte* pname = &name) - { - ImGuiNative.SetWindowSize((byte*)pname, size, cond); - } - } - public static void SetWindowSize(ref byte name, Vector2 size) - { - fixed (byte* pname = &name) - { - ImGuiNative.SetWindowSize((byte*)pname, size, (ImGuiCond)(0)); - } - } - public static void SetWindowSize(ReadOnlySpan name, Vector2 size, ImGuiCond cond) - { - fixed (byte* pname = name) - { - ImGuiNative.SetWindowSize((byte*)pname, size, cond); - } - } - public static void SetWindowSize(ReadOnlySpan name, Vector2 size) - { - fixed (byte* pname = name) - { - ImGuiNative.SetWindowSize((byte*)pname, size, (ImGuiCond)(0)); - } - } - public static void SetWindowSize(string name, Vector2 size, ImGuiCond cond) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.SetWindowSize(pStr0, size, cond); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void SetWindowSize(string name, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.SetWindowSize(pStr0, size, (ImGuiCond)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void SetWindowCollapsed(bool collapsed, ImGuiCond cond) - { - ImGuiNative.SetWindowCollapsed(collapsed ? (byte)1 : (byte)0, cond); - } - public static void SetWindowCollapsed(bool collapsed) - { - ImGuiNative.SetWindowCollapsed(collapsed ? (byte)1 : (byte)0, (ImGuiCond)(0)); - } - public static void SetWindowCollapsed(byte* name, bool collapsed, ImGuiCond cond) - { - ImGuiNative.SetWindowCollapsed(name, collapsed ? (byte)1 : (byte)0, cond); - } - public static void SetWindowCollapsed(byte* name, bool collapsed) - { - ImGuiNative.SetWindowCollapsed(name, collapsed ? (byte)1 : (byte)0, (ImGuiCond)(0)); - } - public static void SetWindowCollapsed(ref byte name, bool collapsed, ImGuiCond cond) - { - fixed (byte* pname = &name) - { - ImGuiNative.SetWindowCollapsed((byte*)pname, collapsed ? (byte)1 : (byte)0, cond); - } - } - public static void SetWindowCollapsed(ref byte name, bool collapsed) - { - fixed (byte* pname = &name) - { - ImGuiNative.SetWindowCollapsed((byte*)pname, collapsed ? (byte)1 : (byte)0, (ImGuiCond)(0)); - } - } - public static void SetWindowCollapsed(ReadOnlySpan name, bool collapsed, ImGuiCond cond) - { - fixed (byte* pname = name) - { - ImGuiNative.SetWindowCollapsed((byte*)pname, collapsed ? (byte)1 : (byte)0, cond); - } - } - public static void SetWindowCollapsed(ReadOnlySpan name, bool collapsed) - { - fixed (byte* pname = name) - { - ImGuiNative.SetWindowCollapsed((byte*)pname, collapsed ? (byte)1 : (byte)0, (ImGuiCond)(0)); - } - } - public static void SetWindowCollapsed(string name, bool collapsed, ImGuiCond cond) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.SetWindowCollapsed(pStr0, collapsed ? (byte)1 : (byte)0, cond); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void SetWindowCollapsed(string name, bool collapsed) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.SetWindowCollapsed(pStr0, collapsed ? (byte)1 : (byte)0, (ImGuiCond)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void SetWindowFocus() - { - ImGuiNative.SetWindowFocus(); - } - public static void SetWindowFocus(byte* name) - { - ImGuiNative.SetWindowFocus(name); - } - public static void SetWindowFocus(ref byte name) - { - fixed (byte* pname = &name) - { - ImGuiNative.SetWindowFocus((byte*)pname); - } - } - public static void SetWindowFocus(ReadOnlySpan name) - { - fixed (byte* pname = name) - { - ImGuiNative.SetWindowFocus((byte*)pname); - } - } - public static void SetWindowFocus(string name) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.SetWindowFocus(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static void SetWindowFontScale(float scale) { ImGuiNative.SetWindowFontScale(scale); @@ -2722,288 +1559,6 @@ public unsafe partial class ImGui { ImGuiNative.PopID(); } - public static bool Button(byte* label, Vector2 size) - { - byte ret = ImGuiNative.Button(label, size); - return ret != 0; - } - public static bool Button(byte* label) - { - byte ret = ImGuiNative.Button(label, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - public static bool Button(ref byte label, Vector2 size) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Button((byte*)plabel, size); - return ret != 0; - } - } - public static bool Button(ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Button((byte*)plabel, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Button(ReadOnlySpan label, Vector2 size) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Button((byte*)plabel, size); - return ret != 0; - } - } - public static bool Button(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Button((byte*)plabel, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Button(string label, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Button(pStr0, size); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Button(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Button(pStr0, (Vector2)(new Vector2(0,0))); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool SmallButton(byte* label) - { - byte ret = ImGuiNative.SmallButton(label); - return ret != 0; - } - public static bool SmallButton(ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.SmallButton((byte*)plabel); - return ret != 0; - } - } - public static bool SmallButton(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.SmallButton((byte*)plabel); - return ret != 0; - } - } - public static bool SmallButton(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.SmallButton(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool InvisibleButton(byte* strId, Vector2 size, ImGuiButtonFlags flags) - { - byte ret = ImGuiNative.InvisibleButton(strId, size, flags); - return ret != 0; - } - public static bool InvisibleButton(byte* strId, Vector2 size) - { - byte ret = ImGuiNative.InvisibleButton(strId, size, (ImGuiButtonFlags)(0)); - return ret != 0; - } - public static bool InvisibleButton(ref byte strId, Vector2 size, ImGuiButtonFlags flags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.InvisibleButton((byte*)pstrId, size, flags); - return ret != 0; - } - } - public static bool InvisibleButton(ref byte strId, Vector2 size) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.InvisibleButton((byte*)pstrId, size, (ImGuiButtonFlags)(0)); - return ret != 0; - } - } - public static bool InvisibleButton(ReadOnlySpan strId, Vector2 size, ImGuiButtonFlags flags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.InvisibleButton((byte*)pstrId, size, flags); - return ret != 0; - } - } - public static bool InvisibleButton(ReadOnlySpan strId, Vector2 size) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.InvisibleButton((byte*)pstrId, size, (ImGuiButtonFlags)(0)); - return ret != 0; - } - } - public static bool InvisibleButton(string strId, Vector2 size, ImGuiButtonFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.InvisibleButton(pStr0, size, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool InvisibleButton(string strId, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.InvisibleButton(pStr0, size, (ImGuiButtonFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ArrowButton(byte* strId, ImGuiDir dir) - { - byte ret = ImGuiNative.ArrowButton(strId, dir); - return ret != 0; - } - public static bool ArrowButton(ref byte strId, ImGuiDir dir) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.ArrowButton((byte*)pstrId, dir); - return ret != 0; - } - } - public static bool ArrowButton(ReadOnlySpan strId, ImGuiDir dir) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.ArrowButton((byte*)pstrId, dir); - return ret != 0; - } - } - public static bool ArrowButton(string strId, ImGuiDir dir) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.ArrowButton(pStr0, dir); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static void Image(ImTextureID userTextureId, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tintCol, Vector4 borderCol) { ImGuiNative.Image(userTextureId, size, uv0, uv1, tintCol, borderCol); @@ -3130,3462 +1685,18 @@ public unsafe partial class ImGui byte ret = ImGuiNative.ImageButton(userTextureId, size, (Vector2)(new Vector2(0,0)), (Vector2)(new Vector2(1,1)), framePadding, bgCol, tintCol); return ret != 0; } - public static bool Checkbox(byte* label, bool* v) - { - byte ret = ImGuiNative.Checkbox(label, v); - return ret != 0; - } - public static bool Checkbox(ref byte label, bool* v) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Checkbox((byte*)plabel, v); - return ret != 0; - } - } - public static bool Checkbox(ReadOnlySpan label, bool* v) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Checkbox((byte*)plabel, v); - return ret != 0; - } - } - public static bool Checkbox(string label, bool* v) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Checkbox(pStr0, v); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Checkbox(byte* label, ref bool v) - { - fixed (bool* pv = &v) - { - byte ret = ImGuiNative.Checkbox(label, (bool*)pv); - return ret != 0; - } - } - public static bool Checkbox(ref byte label, ref bool v) - { - fixed (byte* plabel = &label) - { - fixed (bool* pv = &v) - { - byte ret = ImGuiNative.Checkbox((byte*)plabel, (bool*)pv); - return ret != 0; - } - } - } - public static bool Checkbox(ReadOnlySpan label, ref bool v) - { - fixed (byte* plabel = label) - { - fixed (bool* pv = &v) - { - byte ret = ImGuiNative.Checkbox((byte*)plabel, (bool*)pv); - return ret != 0; - } - } - } - public static bool Checkbox(string label, ref bool v) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* pv = &v) - { - byte ret = ImGuiNative.Checkbox(pStr0, (bool*)pv); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool CheckboxFlags(byte* label, int* flags, int flagsValue) - { - byte ret = ImGuiNative.CheckboxFlags(label, flags, flagsValue); - return ret != 0; - } - public static bool CheckboxFlags(ref byte label, int* flags, int flagsValue) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.CheckboxFlags((byte*)plabel, flags, flagsValue); - return ret != 0; - } - } - public static bool CheckboxFlags(ReadOnlySpan label, int* flags, int flagsValue) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.CheckboxFlags((byte*)plabel, flags, flagsValue); - return ret != 0; - } - } - public static bool CheckboxFlags(string label, int* flags, int flagsValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.CheckboxFlags(pStr0, flags, flagsValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool CheckboxFlags(byte* label, ref int flags, int flagsValue) - { - fixed (int* pflags = &flags) - { - byte ret = ImGuiNative.CheckboxFlags(label, (int*)pflags, flagsValue); - return ret != 0; - } - } - public static bool CheckboxFlags(ref byte label, ref int flags, int flagsValue) - { - fixed (byte* plabel = &label) - { - fixed (int* pflags = &flags) - { - byte ret = ImGuiNative.CheckboxFlags((byte*)plabel, (int*)pflags, flagsValue); - return ret != 0; - } - } - } - public static bool CheckboxFlags(ReadOnlySpan label, ref int flags, int flagsValue) - { - fixed (byte* plabel = label) - { - fixed (int* pflags = &flags) - { - byte ret = ImGuiNative.CheckboxFlags((byte*)plabel, (int*)pflags, flagsValue); - return ret != 0; - } - } - } - public static bool CheckboxFlags(string label, ref int flags, int flagsValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pflags = &flags) - { - byte ret = ImGuiNative.CheckboxFlags(pStr0, (int*)pflags, flagsValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool CheckboxFlags(byte* label, uint* flags, uint flagsValue) - { - byte ret = ImGuiNative.CheckboxFlags(label, flags, flagsValue); - return ret != 0; - } - public static bool CheckboxFlags(ref byte label, uint* flags, uint flagsValue) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.CheckboxFlags((byte*)plabel, flags, flagsValue); - return ret != 0; - } - } - public static bool CheckboxFlags(ReadOnlySpan label, uint* flags, uint flagsValue) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.CheckboxFlags((byte*)plabel, flags, flagsValue); - return ret != 0; - } - } - public static bool CheckboxFlags(string label, uint* flags, uint flagsValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.CheckboxFlags(pStr0, flags, flagsValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool CheckboxFlags(byte* label, ref uint flags, uint flagsValue) - { - fixed (uint* pflags = &flags) - { - byte ret = ImGuiNative.CheckboxFlags(label, (uint*)pflags, flagsValue); - return ret != 0; - } - } - public static bool CheckboxFlags(ref byte label, ref uint flags, uint flagsValue) - { - fixed (byte* plabel = &label) - { - fixed (uint* pflags = &flags) - { - byte ret = ImGuiNative.CheckboxFlags((byte*)plabel, (uint*)pflags, flagsValue); - return ret != 0; - } - } - } - public static bool CheckboxFlags(ReadOnlySpan label, ref uint flags, uint flagsValue) - { - fixed (byte* plabel = label) - { - fixed (uint* pflags = &flags) - { - byte ret = ImGuiNative.CheckboxFlags((byte*)plabel, (uint*)pflags, flagsValue); - return ret != 0; - } - } - } - public static bool CheckboxFlags(string label, ref uint flags, uint flagsValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (uint* pflags = &flags) - { - byte ret = ImGuiNative.CheckboxFlags(pStr0, (uint*)pflags, flagsValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool RadioButton(byte* label, bool active) - { - byte ret = ImGuiNative.RadioButton(label, active ? (byte)1 : (byte)0); - return ret != 0; - } - public static bool RadioButton(ref byte label, bool active) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.RadioButton((byte*)plabel, active ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool RadioButton(ReadOnlySpan label, bool active) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.RadioButton((byte*)plabel, active ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool RadioButton(string label, bool active) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.RadioButton(pStr0, active ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool RadioButton(byte* label, int* v, int vButton) - { - byte ret = ImGuiNative.RadioButton(label, v, vButton); - return ret != 0; - } - public static bool RadioButton(ref byte label, int* v, int vButton) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.RadioButton((byte*)plabel, v, vButton); - return ret != 0; - } - } - public static bool RadioButton(ReadOnlySpan label, int* v, int vButton) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.RadioButton((byte*)plabel, v, vButton); - return ret != 0; - } - } - public static bool RadioButton(string label, int* v, int vButton) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.RadioButton(pStr0, v, vButton); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool RadioButton(byte* label, ref int v, int vButton) - { - fixed (int* pv = &v) - { - byte ret = ImGuiNative.RadioButton(label, (int*)pv, vButton); - return ret != 0; - } - } - public static bool RadioButton(ref byte label, ref int v, int vButton) - { - fixed (byte* plabel = &label) - { - fixed (int* pv = &v) - { - byte ret = ImGuiNative.RadioButton((byte*)plabel, (int*)pv, vButton); - return ret != 0; - } - } - } - public static bool RadioButton(ReadOnlySpan label, ref int v, int vButton) - { - fixed (byte* plabel = label) - { - fixed (int* pv = &v) - { - byte ret = ImGuiNative.RadioButton((byte*)plabel, (int*)pv, vButton); - return ret != 0; - } - } - } - public static bool RadioButton(string label, ref int v, int vButton) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pv = &v) - { - byte ret = ImGuiNative.RadioButton(pStr0, (int*)pv, vButton); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static void ProgressBar(float fraction, Vector2 sizeArg, byte* overlay) - { - ImGuiNative.ProgressBar(fraction, sizeArg, overlay); - } - public static void ProgressBar(float fraction, Vector2 sizeArg) - { - ImGuiNative.ProgressBar(fraction, sizeArg, (byte*)(default)); - } - public static void ProgressBar(float fraction) - { - ImGuiNative.ProgressBar(fraction, (Vector2)(new Vector2(-float.MinValue,0)), (byte*)(default)); - } - public static void ProgressBar(float fraction, byte* overlay) - { - ImGuiNative.ProgressBar(fraction, (Vector2)(new Vector2(-float.MinValue,0)), overlay); - } - public static void ProgressBar(float fraction, Vector2 sizeArg, ref byte overlay) - { - fixed (byte* poverlay = &overlay) - { - ImGuiNative.ProgressBar(fraction, sizeArg, (byte*)poverlay); - } - } - public static void ProgressBar(float fraction, ref byte overlay) - { - fixed (byte* poverlay = &overlay) - { - ImGuiNative.ProgressBar(fraction, (Vector2)(new Vector2(-float.MinValue,0)), (byte*)poverlay); - } - } - public static void ProgressBar(float fraction, Vector2 sizeArg, ReadOnlySpan overlay) - { - fixed (byte* poverlay = overlay) - { - ImGuiNative.ProgressBar(fraction, sizeArg, (byte*)poverlay); - } - } - public static void ProgressBar(float fraction, ReadOnlySpan overlay) - { - fixed (byte* poverlay = overlay) - { - ImGuiNative.ProgressBar(fraction, (Vector2)(new Vector2(-float.MinValue,0)), (byte*)poverlay); - } - } - public static void ProgressBar(float fraction, Vector2 sizeArg, string overlay) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (overlay != null) - { - pStrSize0 = Utils.GetByteCountUTF8(overlay); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(overlay, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.ProgressBar(fraction, sizeArg, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void ProgressBar(float fraction, string overlay) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (overlay != null) - { - pStrSize0 = Utils.GetByteCountUTF8(overlay); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(overlay, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.ProgressBar(fraction, (Vector2)(new Vector2(-float.MinValue,0)), pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static void Bullet() { ImGuiNative.Bullet(); } - public static bool BeginCombo(byte* label, byte* previewValue, ImGuiComboFlags flags) - { - byte ret = ImGuiNative.BeginCombo(label, previewValue, flags); - return ret != 0; - } - public static bool BeginCombo(byte* label, byte* previewValue) - { - byte ret = ImGuiNative.BeginCombo(label, previewValue, (ImGuiComboFlags)(0)); - return ret != 0; - } - public static bool BeginCombo(ref byte label, byte* previewValue, ImGuiComboFlags flags) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.BeginCombo((byte*)plabel, previewValue, flags); - return ret != 0; - } - } - public static bool BeginCombo(ref byte label, byte* previewValue) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.BeginCombo((byte*)plabel, previewValue, (ImGuiComboFlags)(0)); - return ret != 0; - } - } - public static bool BeginCombo(ReadOnlySpan label, byte* previewValue, ImGuiComboFlags flags) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.BeginCombo((byte*)plabel, previewValue, flags); - return ret != 0; - } - } - public static bool BeginCombo(ReadOnlySpan label, byte* previewValue) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.BeginCombo((byte*)plabel, previewValue, (ImGuiComboFlags)(0)); - return ret != 0; - } - } - public static bool BeginCombo(string label, byte* previewValue, ImGuiComboFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginCombo(pStr0, previewValue, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginCombo(string label, byte* previewValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginCombo(pStr0, previewValue, (ImGuiComboFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginCombo(byte* label, ref byte previewValue, ImGuiComboFlags flags) - { - fixed (byte* ppreviewValue = &previewValue) - { - byte ret = ImGuiNative.BeginCombo(label, (byte*)ppreviewValue, flags); - return ret != 0; - } - } - public static bool BeginCombo(byte* label, ref byte previewValue) - { - fixed (byte* ppreviewValue = &previewValue) - { - byte ret = ImGuiNative.BeginCombo(label, (byte*)ppreviewValue, (ImGuiComboFlags)(0)); - return ret != 0; - } - } - public static bool BeginCombo(byte* label, ReadOnlySpan previewValue, ImGuiComboFlags flags) - { - fixed (byte* ppreviewValue = previewValue) - { - byte ret = ImGuiNative.BeginCombo(label, (byte*)ppreviewValue, flags); - return ret != 0; - } - } - public static bool BeginCombo(byte* label, ReadOnlySpan previewValue) - { - fixed (byte* ppreviewValue = previewValue) - { - byte ret = ImGuiNative.BeginCombo(label, (byte*)ppreviewValue, (ImGuiComboFlags)(0)); - return ret != 0; - } - } - public static bool BeginCombo(byte* label, string previewValue, ImGuiComboFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (previewValue != null) - { - pStrSize0 = Utils.GetByteCountUTF8(previewValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(previewValue, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginCombo(label, pStr0, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginCombo(byte* label, string previewValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (previewValue != null) - { - pStrSize0 = Utils.GetByteCountUTF8(previewValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(previewValue, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginCombo(label, pStr0, (ImGuiComboFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginCombo(ref byte label, ref byte previewValue, ImGuiComboFlags flags) - { - fixed (byte* plabel = &label) - { - fixed (byte* ppreviewValue = &previewValue) - { - byte ret = ImGuiNative.BeginCombo((byte*)plabel, (byte*)ppreviewValue, flags); - return ret != 0; - } - } - } - public static bool BeginCombo(ref byte label, ref byte previewValue) - { - fixed (byte* plabel = &label) - { - fixed (byte* ppreviewValue = &previewValue) - { - byte ret = ImGuiNative.BeginCombo((byte*)plabel, (byte*)ppreviewValue, (ImGuiComboFlags)(0)); - return ret != 0; - } - } - } - public static bool BeginCombo(ReadOnlySpan label, ReadOnlySpan previewValue, ImGuiComboFlags flags) - { - fixed (byte* plabel = label) - { - fixed (byte* ppreviewValue = previewValue) - { - byte ret = ImGuiNative.BeginCombo((byte*)plabel, (byte*)ppreviewValue, flags); - return ret != 0; - } - } - } - public static bool BeginCombo(ReadOnlySpan label, ReadOnlySpan previewValue) - { - fixed (byte* plabel = label) - { - fixed (byte* ppreviewValue = previewValue) - { - byte ret = ImGuiNative.BeginCombo((byte*)plabel, (byte*)ppreviewValue, (ImGuiComboFlags)(0)); - return ret != 0; - } - } - } - public static bool BeginCombo(string label, string previewValue, ImGuiComboFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (previewValue != null) - { - pStrSize1 = Utils.GetByteCountUTF8(previewValue); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(previewValue, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiNative.BeginCombo(pStr0, pStr1, flags); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginCombo(string label, string previewValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (previewValue != null) - { - pStrSize1 = Utils.GetByteCountUTF8(previewValue); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(previewValue, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiNative.BeginCombo(pStr0, pStr1, (ImGuiComboFlags)(0)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginCombo(ref byte label, ReadOnlySpan previewValue, ImGuiComboFlags flags) - { - fixed (byte* plabel = &label) - { - fixed (byte* ppreviewValue = previewValue) - { - byte ret = ImGuiNative.BeginCombo((byte*)plabel, (byte*)ppreviewValue, flags); - return ret != 0; - } - } - } - public static bool BeginCombo(ref byte label, ReadOnlySpan previewValue) - { - fixed (byte* plabel = &label) - { - fixed (byte* ppreviewValue = previewValue) - { - byte ret = ImGuiNative.BeginCombo((byte*)plabel, (byte*)ppreviewValue, (ImGuiComboFlags)(0)); - return ret != 0; - } - } - } - public static bool BeginCombo(ref byte label, string previewValue, ImGuiComboFlags flags) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (previewValue != null) - { - pStrSize0 = Utils.GetByteCountUTF8(previewValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(previewValue, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginCombo((byte*)plabel, pStr0, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginCombo(ref byte label, string previewValue) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (previewValue != null) - { - pStrSize0 = Utils.GetByteCountUTF8(previewValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(previewValue, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginCombo((byte*)plabel, pStr0, (ImGuiComboFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginCombo(ReadOnlySpan label, ref byte previewValue, ImGuiComboFlags flags) - { - fixed (byte* plabel = label) - { - fixed (byte* ppreviewValue = &previewValue) - { - byte ret = ImGuiNative.BeginCombo((byte*)plabel, (byte*)ppreviewValue, flags); - return ret != 0; - } - } - } - public static bool BeginCombo(ReadOnlySpan label, ref byte previewValue) - { - fixed (byte* plabel = label) - { - fixed (byte* ppreviewValue = &previewValue) - { - byte ret = ImGuiNative.BeginCombo((byte*)plabel, (byte*)ppreviewValue, (ImGuiComboFlags)(0)); - return ret != 0; - } - } - } - public static bool BeginCombo(ReadOnlySpan label, string previewValue, ImGuiComboFlags flags) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (previewValue != null) - { - pStrSize0 = Utils.GetByteCountUTF8(previewValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(previewValue, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginCombo((byte*)plabel, pStr0, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginCombo(ReadOnlySpan label, string previewValue) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (previewValue != null) - { - pStrSize0 = Utils.GetByteCountUTF8(previewValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(previewValue, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginCombo((byte*)plabel, pStr0, (ImGuiComboFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginCombo(string label, ref byte previewValue, ImGuiComboFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* ppreviewValue = &previewValue) - { - byte ret = ImGuiNative.BeginCombo(pStr0, (byte*)ppreviewValue, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginCombo(string label, ref byte previewValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* ppreviewValue = &previewValue) - { - byte ret = ImGuiNative.BeginCombo(pStr0, (byte*)ppreviewValue, (ImGuiComboFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginCombo(string label, ReadOnlySpan previewValue, ImGuiComboFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* ppreviewValue = previewValue) - { - byte ret = ImGuiNative.BeginCombo(pStr0, (byte*)ppreviewValue, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginCombo(string label, ReadOnlySpan previewValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* ppreviewValue = previewValue) - { - byte ret = ImGuiNative.BeginCombo(pStr0, (byte*)ppreviewValue, (ImGuiComboFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } public static void EndCombo() { ImGuiNative.EndCombo(); } - public static bool Combo(byte* label, int* currentItem, byte** items, int itemsCount, int popupMaxHeightInItems) - { - byte ret = ImGuiNative.Combo(label, currentItem, items, itemsCount, popupMaxHeightInItems); - return ret != 0; - } - public static bool Combo(byte* label, int* currentItem, byte** items, int itemsCount) - { - byte ret = ImGuiNative.Combo(label, currentItem, items, itemsCount, (int)(-1)); - return ret != 0; - } - public static bool Combo(ref byte label, int* currentItem, byte** items, int itemsCount, int popupMaxHeightInItems) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, items, itemsCount, popupMaxHeightInItems); - return ret != 0; - } - } - public static bool Combo(ref byte label, int* currentItem, byte** items, int itemsCount) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, items, itemsCount, (int)(-1)); - return ret != 0; - } - } - public static bool Combo(ReadOnlySpan label, int* currentItem, byte** items, int itemsCount, int popupMaxHeightInItems) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, items, itemsCount, popupMaxHeightInItems); - return ret != 0; - } - } - public static bool Combo(ReadOnlySpan label, int* currentItem, byte** items, int itemsCount) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, items, itemsCount, (int)(-1)); - return ret != 0; - } - } - public static bool Combo(string label, int* currentItem, byte** items, int itemsCount, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo(pStr0, currentItem, items, itemsCount, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Combo(string label, int* currentItem, byte** items, int itemsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo(pStr0, currentItem, items, itemsCount, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Combo(byte* label, ref int currentItem, byte** items, int itemsCount, int popupMaxHeightInItems) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, items, itemsCount, popupMaxHeightInItems); - return ret != 0; - } - } - public static bool Combo(byte* label, ref int currentItem, byte** items, int itemsCount) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, items, itemsCount, (int)(-1)); - return ret != 0; - } - } - public static bool Combo(ref byte label, ref int currentItem, byte** items, int itemsCount, int popupMaxHeightInItems) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, items, itemsCount, popupMaxHeightInItems); - return ret != 0; - } - } - } - public static bool Combo(ref byte label, ref int currentItem, byte** items, int itemsCount) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, items, itemsCount, (int)(-1)); - return ret != 0; - } - } - } - public static bool Combo(ReadOnlySpan label, ref int currentItem, byte** items, int itemsCount, int popupMaxHeightInItems) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, items, itemsCount, popupMaxHeightInItems); - return ret != 0; - } - } - } - public static bool Combo(ReadOnlySpan label, ref int currentItem, byte** items, int itemsCount) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, items, itemsCount, (int)(-1)); - return ret != 0; - } - } - } - public static bool Combo(string label, ref int currentItem, byte** items, int itemsCount, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, items, itemsCount, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(string label, ref int currentItem, byte** items, int itemsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, items, itemsCount, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(byte* label, int* currentItem, string[] items, int itemsCount, int popupMaxHeightInItems) - { - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.Combo(label, currentItem, pStrArray0, itemsCount, popupMaxHeightInItems); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - return ret != 0; - } - public static bool Combo(byte* label, int* currentItem, string[] items, int itemsCount) - { - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.Combo(label, currentItem, pStrArray0, itemsCount, (int)(-1)); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - return ret != 0; - } - public static bool Combo(string label, int* currentItem, string[] items, int itemsCount, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.Combo(pStr0, currentItem, pStrArray0, itemsCount, popupMaxHeightInItems); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Combo(string label, int* currentItem, string[] items, int itemsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.Combo(pStr0, currentItem, pStrArray0, itemsCount, (int)(-1)); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Combo(byte* label, ref int currentItem, string[] items, int itemsCount, int popupMaxHeightInItems) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, pStrArray0, itemsCount, popupMaxHeightInItems); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - return ret != 0; - } - } - public static bool Combo(byte* label, ref int currentItem, string[] items, int itemsCount) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, pStrArray0, itemsCount, (int)(-1)); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - return ret != 0; - } - } - public static bool Combo(string label, ref int currentItem, string[] items, int itemsCount, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, pStrArray0, itemsCount, popupMaxHeightInItems); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(string label, ref int currentItem, string[] items, int itemsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, pStrArray0, itemsCount, (int)(-1)); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(byte* label, int* currentItem, byte* itemsSeparatedByZeros, int popupMaxHeightInItems) - { - byte ret = ImGuiNative.Combo(label, currentItem, itemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - public static bool Combo(byte* label, int* currentItem, byte* itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(label, currentItem, itemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - public static bool Combo(ref byte label, int* currentItem, byte* itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, itemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - public static bool Combo(ref byte label, int* currentItem, byte* itemsSeparatedByZeros) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, itemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - public static bool Combo(ReadOnlySpan label, int* currentItem, byte* itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, itemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - public static bool Combo(ReadOnlySpan label, int* currentItem, byte* itemsSeparatedByZeros) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, itemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - public static bool Combo(string label, int* currentItem, byte* itemsSeparatedByZeros, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo(pStr0, currentItem, itemsSeparatedByZeros, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Combo(string label, int* currentItem, byte* itemsSeparatedByZeros) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo(pStr0, currentItem, itemsSeparatedByZeros, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Combo(byte* label, ref int currentItem, byte* itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, itemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - public static bool Combo(byte* label, ref int currentItem, byte* itemsSeparatedByZeros) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, itemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - public static bool Combo(ref byte label, ref int currentItem, byte* itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, itemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - } - public static bool Combo(ref byte label, ref int currentItem, byte* itemsSeparatedByZeros) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, itemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - } - public static bool Combo(ReadOnlySpan label, ref int currentItem, byte* itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, itemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - } - public static bool Combo(ReadOnlySpan label, ref int currentItem, byte* itemsSeparatedByZeros) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, itemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - } - public static bool Combo(string label, ref int currentItem, byte* itemsSeparatedByZeros, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, itemsSeparatedByZeros, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(string label, ref int currentItem, byte* itemsSeparatedByZeros) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, itemsSeparatedByZeros, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(byte* label, int* currentItem, ref byte itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(label, currentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - public static bool Combo(byte* label, int* currentItem, ref byte itemsSeparatedByZeros) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(label, currentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - public static bool Combo(byte* label, int* currentItem, ReadOnlySpan itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(label, currentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - public static bool Combo(byte* label, int* currentItem, ReadOnlySpan itemsSeparatedByZeros) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(label, currentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - public static bool Combo(byte* label, int* currentItem, string itemsSeparatedByZeros, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize0 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo(label, currentItem, pStr0, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Combo(byte* label, int* currentItem, string itemsSeparatedByZeros) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize0 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo(label, currentItem, pStr0, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Combo(ref byte label, int* currentItem, ref byte itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = &label) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - } - public static bool Combo(ref byte label, int* currentItem, ref byte itemsSeparatedByZeros) - { - fixed (byte* plabel = &label) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - } - public static bool Combo(ReadOnlySpan label, int* currentItem, ReadOnlySpan itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = label) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - } - public static bool Combo(ReadOnlySpan label, int* currentItem, ReadOnlySpan itemsSeparatedByZeros) - { - fixed (byte* plabel = label) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - } - public static bool Combo(string label, int* currentItem, string itemsSeparatedByZeros, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize1 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiNative.Combo(pStr0, currentItem, pStr1, popupMaxHeightInItems); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Combo(string label, int* currentItem, string itemsSeparatedByZeros) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize1 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiNative.Combo(pStr0, currentItem, pStr1, (int)(-1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Combo(ref byte label, int* currentItem, ReadOnlySpan itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = &label) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - } - public static bool Combo(ref byte label, int* currentItem, ReadOnlySpan itemsSeparatedByZeros) - { - fixed (byte* plabel = &label) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - } - public static bool Combo(ref byte label, int* currentItem, string itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize0 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, pStr0, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(ref byte label, int* currentItem, string itemsSeparatedByZeros) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize0 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, pStr0, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(ReadOnlySpan label, int* currentItem, ref byte itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = label) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - } - public static bool Combo(ReadOnlySpan label, int* currentItem, ref byte itemsSeparatedByZeros) - { - fixed (byte* plabel = label) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - } - public static bool Combo(ReadOnlySpan label, int* currentItem, string itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize0 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, pStr0, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(ReadOnlySpan label, int* currentItem, string itemsSeparatedByZeros) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize0 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, pStr0, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(string label, int* currentItem, ref byte itemsSeparatedByZeros, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(pStr0, currentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(string label, int* currentItem, ref byte itemsSeparatedByZeros) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(pStr0, currentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(string label, int* currentItem, ReadOnlySpan itemsSeparatedByZeros, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(pStr0, currentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(string label, int* currentItem, ReadOnlySpan itemsSeparatedByZeros) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(pStr0, currentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(byte* label, ref int currentItem, ref byte itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - } - public static bool Combo(byte* label, ref int currentItem, ref byte itemsSeparatedByZeros) - { - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - } - public static bool Combo(byte* label, ref int currentItem, ReadOnlySpan itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - } - public static bool Combo(byte* label, ref int currentItem, ReadOnlySpan itemsSeparatedByZeros) - { - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - } - public static bool Combo(byte* label, ref int currentItem, string itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize0 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, pStr0, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(byte* label, ref int currentItem, string itemsSeparatedByZeros) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize0 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, pStr0, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(ref byte label, ref int currentItem, ref byte itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - } - } - public static bool Combo(ref byte label, ref int currentItem, ref byte itemsSeparatedByZeros) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - } - } - public static bool Combo(ReadOnlySpan label, ref int currentItem, ReadOnlySpan itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - } - } - public static bool Combo(ReadOnlySpan label, ref int currentItem, ReadOnlySpan itemsSeparatedByZeros) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - } - } - public static bool Combo(string label, ref int currentItem, string itemsSeparatedByZeros, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize1 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, pStr1, popupMaxHeightInItems); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(string label, ref int currentItem, string itemsSeparatedByZeros) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize1 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, pStr1, (int)(-1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(ref byte label, ref int currentItem, ReadOnlySpan itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - } - } - public static bool Combo(ref byte label, ref int currentItem, ReadOnlySpan itemsSeparatedByZeros) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - } - } - public static bool Combo(ref byte label, ref int currentItem, string itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize0 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, pStr0, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool Combo(ref byte label, ref int currentItem, string itemsSeparatedByZeros) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize0 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, pStr0, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool Combo(ReadOnlySpan label, ref int currentItem, ref byte itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - return ret != 0; - } - } - } - } - public static bool Combo(ReadOnlySpan label, ref int currentItem, ref byte itemsSeparatedByZeros) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - return ret != 0; - } - } - } - } - public static bool Combo(ReadOnlySpan label, ref int currentItem, string itemsSeparatedByZeros, int popupMaxHeightInItems) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize0 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, pStr0, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool Combo(ReadOnlySpan label, ref int currentItem, string itemsSeparatedByZeros) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (itemsSeparatedByZeros != null) - { - pStrSize0 = Utils.GetByteCountUTF8(itemsSeparatedByZeros); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(itemsSeparatedByZeros, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, pStr0, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool Combo(string label, ref int currentItem, ref byte itemsSeparatedByZeros, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool Combo(string label, ref int currentItem, ref byte itemsSeparatedByZeros) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = &itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool Combo(string label, ref int currentItem, ReadOnlySpan itemsSeparatedByZeros, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool Combo(string label, ref int currentItem, ReadOnlySpan itemsSeparatedByZeros) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - fixed (byte* pitemsSeparatedByZeros = itemsSeparatedByZeros) - { - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, (byte*)pitemsSeparatedByZeros, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool Combo(byte* label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int popupMaxHeightInItems) - { - byte ret = ImGuiNative.Combo(label, currentItem, itemsGetter, data, itemsCount, popupMaxHeightInItems); - return ret != 0; - } - public static bool Combo(byte* label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - byte ret = ImGuiNative.Combo(label, currentItem, itemsGetter, data, itemsCount, (int)(-1)); - return ret != 0; - } - public static bool Combo(ref byte label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int popupMaxHeightInItems) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, itemsGetter, data, itemsCount, popupMaxHeightInItems); - return ret != 0; - } - } - public static bool Combo(ref byte label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, itemsGetter, data, itemsCount, (int)(-1)); - return ret != 0; - } - } - public static bool Combo(ReadOnlySpan label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int popupMaxHeightInItems) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, itemsGetter, data, itemsCount, popupMaxHeightInItems); - return ret != 0; - } - } - public static bool Combo(ReadOnlySpan label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Combo((byte*)plabel, currentItem, itemsGetter, data, itemsCount, (int)(-1)); - return ret != 0; - } - } - public static bool Combo(string label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo(pStr0, currentItem, itemsGetter, data, itemsCount, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Combo(string label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Combo(pStr0, currentItem, itemsGetter, data, itemsCount, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Combo(byte* label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int popupMaxHeightInItems) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, itemsGetter, data, itemsCount, popupMaxHeightInItems); - return ret != 0; - } - } - public static bool Combo(byte* label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo(label, (int*)pcurrentItem, itemsGetter, data, itemsCount, (int)(-1)); - return ret != 0; - } - } - public static bool Combo(ref byte label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int popupMaxHeightInItems) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, itemsGetter, data, itemsCount, popupMaxHeightInItems); - return ret != 0; - } - } - } - public static bool Combo(ref byte label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, itemsGetter, data, itemsCount, (int)(-1)); - return ret != 0; - } - } - } - public static bool Combo(ReadOnlySpan label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int popupMaxHeightInItems) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, itemsGetter, data, itemsCount, popupMaxHeightInItems); - return ret != 0; - } - } - } - public static bool Combo(ReadOnlySpan label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo((byte*)plabel, (int*)pcurrentItem, itemsGetter, data, itemsCount, (int)(-1)); - return ret != 0; - } - } - } - public static bool Combo(string label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int popupMaxHeightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, itemsGetter, data, itemsCount, popupMaxHeightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Combo(string label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.Combo(pStr0, (int*)pcurrentItem, itemsGetter, data, itemsCount, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool ColorButton(byte* descId, Vector4 col, ImGuiColorEditFlags flags, Vector2 size) - { - byte ret = ImGuiNative.ColorButton(descId, col, flags, size); - return ret != 0; - } - public static bool ColorButton(byte* descId, Vector4 col, ImGuiColorEditFlags flags) - { - byte ret = ImGuiNative.ColorButton(descId, col, flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - public static bool ColorButton(byte* descId, Vector4 col) - { - byte ret = ImGuiNative.ColorButton(descId, col, (ImGuiColorEditFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - public static bool ColorButton(byte* descId, Vector4 col, Vector2 size) - { - byte ret = ImGuiNative.ColorButton(descId, col, (ImGuiColorEditFlags)(0), size); - return ret != 0; - } - public static bool ColorButton(ref byte descId, Vector4 col, ImGuiColorEditFlags flags, Vector2 size) - { - fixed (byte* pdescId = &descId) - { - byte ret = ImGuiNative.ColorButton((byte*)pdescId, col, flags, size); - return ret != 0; - } - } - public static bool ColorButton(ref byte descId, Vector4 col, ImGuiColorEditFlags flags) - { - fixed (byte* pdescId = &descId) - { - byte ret = ImGuiNative.ColorButton((byte*)pdescId, col, flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool ColorButton(ref byte descId, Vector4 col) - { - fixed (byte* pdescId = &descId) - { - byte ret = ImGuiNative.ColorButton((byte*)pdescId, col, (ImGuiColorEditFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool ColorButton(ref byte descId, Vector4 col, Vector2 size) - { - fixed (byte* pdescId = &descId) - { - byte ret = ImGuiNative.ColorButton((byte*)pdescId, col, (ImGuiColorEditFlags)(0), size); - return ret != 0; - } - } - public static bool ColorButton(ReadOnlySpan descId, Vector4 col, ImGuiColorEditFlags flags, Vector2 size) - { - fixed (byte* pdescId = descId) - { - byte ret = ImGuiNative.ColorButton((byte*)pdescId, col, flags, size); - return ret != 0; - } - } - public static bool ColorButton(ReadOnlySpan descId, Vector4 col, ImGuiColorEditFlags flags) - { - fixed (byte* pdescId = descId) - { - byte ret = ImGuiNative.ColorButton((byte*)pdescId, col, flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool ColorButton(ReadOnlySpan descId, Vector4 col) - { - fixed (byte* pdescId = descId) - { - byte ret = ImGuiNative.ColorButton((byte*)pdescId, col, (ImGuiColorEditFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool ColorButton(ReadOnlySpan descId, Vector4 col, Vector2 size) - { - fixed (byte* pdescId = descId) - { - byte ret = ImGuiNative.ColorButton((byte*)pdescId, col, (ImGuiColorEditFlags)(0), size); - return ret != 0; - } - } - public static bool ColorButton(string descId, Vector4 col, ImGuiColorEditFlags flags, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (descId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(descId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(descId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.ColorButton(pStr0, col, flags, size); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ColorButton(string descId, Vector4 col, ImGuiColorEditFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (descId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(descId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(descId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.ColorButton(pStr0, col, flags, (Vector2)(new Vector2(0,0))); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ColorButton(string descId, Vector4 col) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (descId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(descId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(descId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.ColorButton(pStr0, col, (ImGuiColorEditFlags)(0), (Vector2)(new Vector2(0,0))); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ColorButton(string descId, Vector4 col, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (descId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(descId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(descId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.ColorButton(pStr0, col, (ImGuiColorEditFlags)(0), size); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static void SetColorEditOptions(ImGuiColorEditFlags flags) { ImGuiNative.SetColorEditOptions(flags); } - public static void TreePush(byte* strId) - { - ImGuiNative.TreePush(strId); - } - public static void TreePush(ref byte strId) - { - fixed (byte* pstrId = &strId) - { - ImGuiNative.TreePush((byte*)pstrId); - } - } - public static void TreePush(ReadOnlySpan strId) - { - fixed (byte* pstrId = strId) - { - ImGuiNative.TreePush((byte*)pstrId); - } - } - public static void TreePush(string strId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.TreePush(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void TreePush(void* ptrId) - { - ImGuiNative.TreePush(ptrId); - } - public static void TreePush() - { - ImGuiNative.TreePush((void*)(default)); - } public static void TreePop() { ImGuiNative.TreePop(); @@ -6595,312 +1706,6 @@ public unsafe partial class ImGui float ret = ImGuiNative.GetTreeNodeToLabelSpacing(); return ret; } - public static bool CollapsingHeader(byte* label, ImGuiTreeNodeFlags flags) - { - byte ret = ImGuiNative.CollapsingHeader(label, flags); - return ret != 0; - } - public static bool CollapsingHeader(byte* label) - { - byte ret = ImGuiNative.CollapsingHeader(label, (ImGuiTreeNodeFlags)(0)); - return ret != 0; - } - public static bool CollapsingHeader(ref byte label, ImGuiTreeNodeFlags flags) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.CollapsingHeader((byte*)plabel, flags); - return ret != 0; - } - } - public static bool CollapsingHeader(ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.CollapsingHeader((byte*)plabel, (ImGuiTreeNodeFlags)(0)); - return ret != 0; - } - } - public static bool CollapsingHeader(ReadOnlySpan label, ImGuiTreeNodeFlags flags) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.CollapsingHeader((byte*)plabel, flags); - return ret != 0; - } - } - public static bool CollapsingHeader(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.CollapsingHeader((byte*)plabel, (ImGuiTreeNodeFlags)(0)); - return ret != 0; - } - } - public static bool CollapsingHeader(string label, ImGuiTreeNodeFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.CollapsingHeader(pStr0, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool CollapsingHeader(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.CollapsingHeader(pStr0, (ImGuiTreeNodeFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool CollapsingHeader(byte* label, bool* pVisible, ImGuiTreeNodeFlags flags) - { - byte ret = ImGuiNative.CollapsingHeader(label, pVisible, flags); - return ret != 0; - } - public static bool CollapsingHeader(byte* label, bool* pVisible) - { - byte ret = ImGuiNative.CollapsingHeader(label, pVisible, (ImGuiTreeNodeFlags)(0)); - return ret != 0; - } - public static bool CollapsingHeader(ref byte label, bool* pVisible, ImGuiTreeNodeFlags flags) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.CollapsingHeader((byte*)plabel, pVisible, flags); - return ret != 0; - } - } - public static bool CollapsingHeader(ref byte label, bool* pVisible) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.CollapsingHeader((byte*)plabel, pVisible, (ImGuiTreeNodeFlags)(0)); - return ret != 0; - } - } - public static bool CollapsingHeader(ReadOnlySpan label, bool* pVisible, ImGuiTreeNodeFlags flags) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.CollapsingHeader((byte*)plabel, pVisible, flags); - return ret != 0; - } - } - public static bool CollapsingHeader(ReadOnlySpan label, bool* pVisible) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.CollapsingHeader((byte*)plabel, pVisible, (ImGuiTreeNodeFlags)(0)); - return ret != 0; - } - } - public static bool CollapsingHeader(string label, bool* pVisible, ImGuiTreeNodeFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.CollapsingHeader(pStr0, pVisible, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool CollapsingHeader(string label, bool* pVisible) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.CollapsingHeader(pStr0, pVisible, (ImGuiTreeNodeFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool CollapsingHeader(byte* label, ref bool pVisible, ImGuiTreeNodeFlags flags) - { - fixed (bool* ppVisible = &pVisible) - { - byte ret = ImGuiNative.CollapsingHeader(label, (bool*)ppVisible, flags); - return ret != 0; - } - } - public static bool CollapsingHeader(byte* label, ref bool pVisible) - { - fixed (bool* ppVisible = &pVisible) - { - byte ret = ImGuiNative.CollapsingHeader(label, (bool*)ppVisible, (ImGuiTreeNodeFlags)(0)); - return ret != 0; - } - } - public static bool CollapsingHeader(ref byte label, ref bool pVisible, ImGuiTreeNodeFlags flags) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppVisible = &pVisible) - { - byte ret = ImGuiNative.CollapsingHeader((byte*)plabel, (bool*)ppVisible, flags); - return ret != 0; - } - } - } - public static bool CollapsingHeader(ref byte label, ref bool pVisible) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppVisible = &pVisible) - { - byte ret = ImGuiNative.CollapsingHeader((byte*)plabel, (bool*)ppVisible, (ImGuiTreeNodeFlags)(0)); - return ret != 0; - } - } - } - public static bool CollapsingHeader(ReadOnlySpan label, ref bool pVisible, ImGuiTreeNodeFlags flags) - { - fixed (byte* plabel = label) - { - fixed (bool* ppVisible = &pVisible) - { - byte ret = ImGuiNative.CollapsingHeader((byte*)plabel, (bool*)ppVisible, flags); - return ret != 0; - } - } - } - public static bool CollapsingHeader(ReadOnlySpan label, ref bool pVisible) - { - fixed (byte* plabel = label) - { - fixed (bool* ppVisible = &pVisible) - { - byte ret = ImGuiNative.CollapsingHeader((byte*)plabel, (bool*)ppVisible, (ImGuiTreeNodeFlags)(0)); - return ret != 0; - } - } - } - public static bool CollapsingHeader(string label, ref bool pVisible, ImGuiTreeNodeFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppVisible = &pVisible) - { - byte ret = ImGuiNative.CollapsingHeader(pStr0, (bool*)ppVisible, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool CollapsingHeader(string label, ref bool pVisible) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppVisible = &pVisible) - { - byte ret = ImGuiNative.CollapsingHeader(pStr0, (bool*)ppVisible, (ImGuiTreeNodeFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } public static void SetNextItemOpen(bool isOpen, ImGuiCond cond) { ImGuiNative.SetNextItemOpen(isOpen ? (byte)1 : (byte)0, cond); @@ -6909,2124 +1714,10 @@ public unsafe partial class ImGui { ImGuiNative.SetNextItemOpen(isOpen ? (byte)1 : (byte)0, (ImGuiCond)(0)); } - public static bool Selectable(byte* label, bool selected, ImGuiSelectableFlags flags, Vector2 size) - { - byte ret = ImGuiNative.Selectable(label, selected ? (byte)1 : (byte)0, flags, size); - return ret != 0; - } - public static bool Selectable(byte* label, bool selected, ImGuiSelectableFlags flags) - { - byte ret = ImGuiNative.Selectable(label, selected ? (byte)1 : (byte)0, flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - public static bool Selectable(byte* label, bool selected) - { - byte ret = ImGuiNative.Selectable(label, selected ? (byte)1 : (byte)0, (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - public static bool Selectable(byte* label) - { - byte ret = ImGuiNative.Selectable(label, (byte)(0), (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - public static bool Selectable(byte* label, ImGuiSelectableFlags flags) - { - byte ret = ImGuiNative.Selectable(label, (byte)(0), flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - public static bool Selectable(byte* label, bool selected, Vector2 size) - { - byte ret = ImGuiNative.Selectable(label, selected ? (byte)1 : (byte)0, (ImGuiSelectableFlags)(0), size); - return ret != 0; - } - public static bool Selectable(byte* label, Vector2 size) - { - byte ret = ImGuiNative.Selectable(label, (byte)(0), (ImGuiSelectableFlags)(0), size); - return ret != 0; - } - public static bool Selectable(byte* label, ImGuiSelectableFlags flags, Vector2 size) - { - byte ret = ImGuiNative.Selectable(label, (byte)(0), flags, size); - return ret != 0; - } - public static bool Selectable(ref byte label, bool selected, ImGuiSelectableFlags flags, Vector2 size) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, selected ? (byte)1 : (byte)0, flags, size); - return ret != 0; - } - } - public static bool Selectable(ref byte label, bool selected, ImGuiSelectableFlags flags) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, selected ? (byte)1 : (byte)0, flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(ref byte label, bool selected) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, selected ? (byte)1 : (byte)0, (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (byte)(0), (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(ref byte label, ImGuiSelectableFlags flags) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (byte)(0), flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(ref byte label, bool selected, Vector2 size) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, selected ? (byte)1 : (byte)0, (ImGuiSelectableFlags)(0), size); - return ret != 0; - } - } - public static bool Selectable(ref byte label, Vector2 size) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (byte)(0), (ImGuiSelectableFlags)(0), size); - return ret != 0; - } - } - public static bool Selectable(ref byte label, ImGuiSelectableFlags flags, Vector2 size) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (byte)(0), flags, size); - return ret != 0; - } - } - public static bool Selectable(ReadOnlySpan label, bool selected, ImGuiSelectableFlags flags, Vector2 size) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, selected ? (byte)1 : (byte)0, flags, size); - return ret != 0; - } - } - public static bool Selectable(ReadOnlySpan label, bool selected, ImGuiSelectableFlags flags) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, selected ? (byte)1 : (byte)0, flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(ReadOnlySpan label, bool selected) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, selected ? (byte)1 : (byte)0, (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (byte)(0), (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(ReadOnlySpan label, ImGuiSelectableFlags flags) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (byte)(0), flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(ReadOnlySpan label, bool selected, Vector2 size) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, selected ? (byte)1 : (byte)0, (ImGuiSelectableFlags)(0), size); - return ret != 0; - } - } - public static bool Selectable(ReadOnlySpan label, Vector2 size) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (byte)(0), (ImGuiSelectableFlags)(0), size); - return ret != 0; - } - } - public static bool Selectable(ReadOnlySpan label, ImGuiSelectableFlags flags, Vector2 size) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (byte)(0), flags, size); - return ret != 0; - } - } - public static bool Selectable(string label, bool selected, ImGuiSelectableFlags flags, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Selectable(pStr0, selected ? (byte)1 : (byte)0, flags, size); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Selectable(string label, bool selected, ImGuiSelectableFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Selectable(pStr0, selected ? (byte)1 : (byte)0, flags, (Vector2)(new Vector2(0,0))); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Selectable(string label, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Selectable(pStr0, selected ? (byte)1 : (byte)0, (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Selectable(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Selectable(pStr0, (byte)(0), (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Selectable(string label, ImGuiSelectableFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Selectable(pStr0, (byte)(0), flags, (Vector2)(new Vector2(0,0))); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Selectable(string label, bool selected, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Selectable(pStr0, selected ? (byte)1 : (byte)0, (ImGuiSelectableFlags)(0), size); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Selectable(string label, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Selectable(pStr0, (byte)(0), (ImGuiSelectableFlags)(0), size); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Selectable(string label, ImGuiSelectableFlags flags, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Selectable(pStr0, (byte)(0), flags, size); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Selectable(byte* label, bool* pSelected, ImGuiSelectableFlags flags, Vector2 size) - { - byte ret = ImGuiNative.Selectable(label, pSelected, flags, size); - return ret != 0; - } - public static bool Selectable(byte* label, bool* pSelected, ImGuiSelectableFlags flags) - { - byte ret = ImGuiNative.Selectable(label, pSelected, flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - public static bool Selectable(byte* label, bool* pSelected) - { - byte ret = ImGuiNative.Selectable(label, pSelected, (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - public static bool Selectable(byte* label, bool* pSelected, Vector2 size) - { - byte ret = ImGuiNative.Selectable(label, pSelected, (ImGuiSelectableFlags)(0), size); - return ret != 0; - } - public static bool Selectable(ref byte label, bool* pSelected, ImGuiSelectableFlags flags, Vector2 size) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, pSelected, flags, size); - return ret != 0; - } - } - public static bool Selectable(ref byte label, bool* pSelected, ImGuiSelectableFlags flags) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, pSelected, flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(ref byte label, bool* pSelected) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, pSelected, (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(ref byte label, bool* pSelected, Vector2 size) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, pSelected, (ImGuiSelectableFlags)(0), size); - return ret != 0; - } - } - public static bool Selectable(ReadOnlySpan label, bool* pSelected, ImGuiSelectableFlags flags, Vector2 size) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, pSelected, flags, size); - return ret != 0; - } - } - public static bool Selectable(ReadOnlySpan label, bool* pSelected, ImGuiSelectableFlags flags) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, pSelected, flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(ReadOnlySpan label, bool* pSelected) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, pSelected, (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(ReadOnlySpan label, bool* pSelected, Vector2 size) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, pSelected, (ImGuiSelectableFlags)(0), size); - return ret != 0; - } - } - public static bool Selectable(string label, bool* pSelected, ImGuiSelectableFlags flags, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Selectable(pStr0, pSelected, flags, size); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Selectable(string label, bool* pSelected, ImGuiSelectableFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Selectable(pStr0, pSelected, flags, (Vector2)(new Vector2(0,0))); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Selectable(string label, bool* pSelected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Selectable(pStr0, pSelected, (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Selectable(string label, bool* pSelected, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Selectable(pStr0, pSelected, (ImGuiSelectableFlags)(0), size); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Selectable(byte* label, ref bool pSelected, ImGuiSelectableFlags flags, Vector2 size) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable(label, (bool*)ppSelected, flags, size); - return ret != 0; - } - } - public static bool Selectable(byte* label, ref bool pSelected, ImGuiSelectableFlags flags) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable(label, (bool*)ppSelected, flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(byte* label, ref bool pSelected) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable(label, (bool*)ppSelected, (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool Selectable(byte* label, ref bool pSelected, Vector2 size) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable(label, (bool*)ppSelected, (ImGuiSelectableFlags)(0), size); - return ret != 0; - } - } - public static bool Selectable(ref byte label, ref bool pSelected, ImGuiSelectableFlags flags, Vector2 size) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (bool*)ppSelected, flags, size); - return ret != 0; - } - } - } - public static bool Selectable(ref byte label, ref bool pSelected, ImGuiSelectableFlags flags) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (bool*)ppSelected, flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - } - public static bool Selectable(ref byte label, ref bool pSelected) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (bool*)ppSelected, (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - } - public static bool Selectable(ref byte label, ref bool pSelected, Vector2 size) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (bool*)ppSelected, (ImGuiSelectableFlags)(0), size); - return ret != 0; - } - } - } - public static bool Selectable(ReadOnlySpan label, ref bool pSelected, ImGuiSelectableFlags flags, Vector2 size) - { - fixed (byte* plabel = label) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (bool*)ppSelected, flags, size); - return ret != 0; - } - } - } - public static bool Selectable(ReadOnlySpan label, ref bool pSelected, ImGuiSelectableFlags flags) - { - fixed (byte* plabel = label) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (bool*)ppSelected, flags, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - } - public static bool Selectable(ReadOnlySpan label, ref bool pSelected) - { - fixed (byte* plabel = label) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (bool*)ppSelected, (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - } - public static bool Selectable(ReadOnlySpan label, ref bool pSelected, Vector2 size) - { - fixed (byte* plabel = label) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable((byte*)plabel, (bool*)ppSelected, (ImGuiSelectableFlags)(0), size); - return ret != 0; - } - } - } - public static bool Selectable(string label, ref bool pSelected, ImGuiSelectableFlags flags, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable(pStr0, (bool*)ppSelected, flags, size); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Selectable(string label, ref bool pSelected, ImGuiSelectableFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable(pStr0, (bool*)ppSelected, flags, (Vector2)(new Vector2(0,0))); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Selectable(string label, ref bool pSelected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable(pStr0, (bool*)ppSelected, (ImGuiSelectableFlags)(0), (Vector2)(new Vector2(0,0))); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Selectable(string label, ref bool pSelected, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.Selectable(pStr0, (bool*)ppSelected, (ImGuiSelectableFlags)(0), size); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginListBox(byte* label, Vector2 size) - { - byte ret = ImGuiNative.BeginListBox(label, size); - return ret != 0; - } - public static bool BeginListBox(byte* label) - { - byte ret = ImGuiNative.BeginListBox(label, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - public static bool BeginListBox(ref byte label, Vector2 size) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.BeginListBox((byte*)plabel, size); - return ret != 0; - } - } - public static bool BeginListBox(ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.BeginListBox((byte*)plabel, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool BeginListBox(ReadOnlySpan label, Vector2 size) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.BeginListBox((byte*)plabel, size); - return ret != 0; - } - } - public static bool BeginListBox(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.BeginListBox((byte*)plabel, (Vector2)(new Vector2(0,0))); - return ret != 0; - } - } - public static bool BeginListBox(string label, Vector2 size) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginListBox(pStr0, size); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginListBox(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginListBox(pStr0, (Vector2)(new Vector2(0,0))); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static void EndListBox() { ImGuiNative.EndListBox(); } - public static bool ListBox(byte* label, int* currentItem, byte** items, int itemsCount, int heightInItems) - { - byte ret = ImGuiNative.ListBox(label, currentItem, items, itemsCount, heightInItems); - return ret != 0; - } - public static bool ListBox(byte* label, int* currentItem, byte** items, int itemsCount) - { - byte ret = ImGuiNative.ListBox(label, currentItem, items, itemsCount, (int)(-1)); - return ret != 0; - } - public static bool ListBox(ref byte label, int* currentItem, byte** items, int itemsCount, int heightInItems) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, currentItem, items, itemsCount, heightInItems); - return ret != 0; - } - } - public static bool ListBox(ref byte label, int* currentItem, byte** items, int itemsCount) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, currentItem, items, itemsCount, (int)(-1)); - return ret != 0; - } - } - public static bool ListBox(ReadOnlySpan label, int* currentItem, byte** items, int itemsCount, int heightInItems) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, currentItem, items, itemsCount, heightInItems); - return ret != 0; - } - } - public static bool ListBox(ReadOnlySpan label, int* currentItem, byte** items, int itemsCount) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, currentItem, items, itemsCount, (int)(-1)); - return ret != 0; - } - } - public static bool ListBox(string label, int* currentItem, byte** items, int itemsCount, int heightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.ListBox(pStr0, currentItem, items, itemsCount, heightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ListBox(string label, int* currentItem, byte** items, int itemsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.ListBox(pStr0, currentItem, items, itemsCount, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ListBox(byte* label, ref int currentItem, byte** items, int itemsCount, int heightInItems) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox(label, (int*)pcurrentItem, items, itemsCount, heightInItems); - return ret != 0; - } - } - public static bool ListBox(byte* label, ref int currentItem, byte** items, int itemsCount) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox(label, (int*)pcurrentItem, items, itemsCount, (int)(-1)); - return ret != 0; - } - } - public static bool ListBox(ref byte label, ref int currentItem, byte** items, int itemsCount, int heightInItems) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, (int*)pcurrentItem, items, itemsCount, heightInItems); - return ret != 0; - } - } - } - public static bool ListBox(ref byte label, ref int currentItem, byte** items, int itemsCount) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, (int*)pcurrentItem, items, itemsCount, (int)(-1)); - return ret != 0; - } - } - } - public static bool ListBox(ReadOnlySpan label, ref int currentItem, byte** items, int itemsCount, int heightInItems) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, (int*)pcurrentItem, items, itemsCount, heightInItems); - return ret != 0; - } - } - } - public static bool ListBox(ReadOnlySpan label, ref int currentItem, byte** items, int itemsCount) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, (int*)pcurrentItem, items, itemsCount, (int)(-1)); - return ret != 0; - } - } - } - public static bool ListBox(string label, ref int currentItem, byte** items, int itemsCount, int heightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox(pStr0, (int*)pcurrentItem, items, itemsCount, heightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool ListBox(string label, ref int currentItem, byte** items, int itemsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox(pStr0, (int*)pcurrentItem, items, itemsCount, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool ListBox(byte* label, int* currentItem, string[] items, int itemsCount, int heightInItems) - { - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.ListBox(label, currentItem, pStrArray0, itemsCount, heightInItems); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - return ret != 0; - } - public static bool ListBox(byte* label, int* currentItem, string[] items, int itemsCount) - { - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.ListBox(label, currentItem, pStrArray0, itemsCount, (int)(-1)); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - return ret != 0; - } - public static bool ListBox(string label, int* currentItem, string[] items, int itemsCount, int heightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.ListBox(pStr0, currentItem, pStrArray0, itemsCount, heightInItems); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ListBox(string label, int* currentItem, string[] items, int itemsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.ListBox(pStr0, currentItem, pStrArray0, itemsCount, (int)(-1)); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ListBox(byte* label, ref int currentItem, string[] items, int itemsCount, int heightInItems) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.ListBox(label, (int*)pcurrentItem, pStrArray0, itemsCount, heightInItems); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - return ret != 0; - } - } - public static bool ListBox(byte* label, ref int currentItem, string[] items, int itemsCount) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.ListBox(label, (int*)pcurrentItem, pStrArray0, itemsCount, (int)(-1)); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - return ret != 0; - } - } - public static bool ListBox(string label, ref int currentItem, string[] items, int itemsCount, int heightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.ListBox(pStr0, (int*)pcurrentItem, pStrArray0, itemsCount, heightInItems); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool ListBox(string label, ref int currentItem, string[] items, int itemsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte** pStrArray0 = null; - int pStrArray0Size = Utils.GetByteCountArray(items); - if (items != null) - { - if (pStrArray0Size > Utils.MaxStackallocSize) - { - pStrArray0 = (byte**)Utils.Alloc(pStrArray0Size); - } - else - { - byte* pStrArray0Stack = stackalloc byte[pStrArray0Size]; - pStrArray0 = (byte**)pStrArray0Stack; - } - } - for (int i = 0; i < items.Length; i++) - { - pStrArray0[i] = (byte*)Utils.StringToUTF8Ptr(items[i]); - } - byte ret = ImGuiNative.ListBox(pStr0, (int*)pcurrentItem, pStrArray0, itemsCount, (int)(-1)); - for (int i = 0; i < items.Length; i++) - { - Utils.Free(pStrArray0[i]); - } - if (pStrArray0Size >= Utils.MaxStackallocSize) - { - Utils.Free(pStrArray0); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool ListBox(byte* label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int heightInItems) - { - byte ret = ImGuiNative.ListBox(label, currentItem, itemsGetter, data, itemsCount, heightInItems); - return ret != 0; - } - public static bool ListBox(byte* label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - byte ret = ImGuiNative.ListBox(label, currentItem, itemsGetter, data, itemsCount, (int)(-1)); - return ret != 0; - } - public static bool ListBox(ref byte label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int heightInItems) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, currentItem, itemsGetter, data, itemsCount, heightInItems); - return ret != 0; - } - } - public static bool ListBox(ref byte label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, currentItem, itemsGetter, data, itemsCount, (int)(-1)); - return ret != 0; - } - } - public static bool ListBox(ReadOnlySpan label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int heightInItems) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, currentItem, itemsGetter, data, itemsCount, heightInItems); - return ret != 0; - } - } - public static bool ListBox(ReadOnlySpan label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, currentItem, itemsGetter, data, itemsCount, (int)(-1)); - return ret != 0; - } - } - public static bool ListBox(string label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int heightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.ListBox(pStr0, currentItem, itemsGetter, data, itemsCount, heightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ListBox(string label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.ListBox(pStr0, currentItem, itemsGetter, data, itemsCount, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ListBox(byte* label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int heightInItems) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox(label, (int*)pcurrentItem, itemsGetter, data, itemsCount, heightInItems); - return ret != 0; - } - } - public static bool ListBox(byte* label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox(label, (int*)pcurrentItem, itemsGetter, data, itemsCount, (int)(-1)); - return ret != 0; - } - } - public static bool ListBox(ref byte label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int heightInItems) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, (int*)pcurrentItem, itemsGetter, data, itemsCount, heightInItems); - return ret != 0; - } - } - } - public static bool ListBox(ref byte label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - fixed (byte* plabel = &label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, (int*)pcurrentItem, itemsGetter, data, itemsCount, (int)(-1)); - return ret != 0; - } - } - } - public static bool ListBox(ReadOnlySpan label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int heightInItems) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, (int*)pcurrentItem, itemsGetter, data, itemsCount, heightInItems); - return ret != 0; - } - } - } - public static bool ListBox(ReadOnlySpan label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - fixed (byte* plabel = label) - { - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox((byte*)plabel, (int*)pcurrentItem, itemsGetter, data, itemsCount, (int)(-1)); - return ret != 0; - } - } - } - public static bool ListBox(string label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int heightInItems) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox(pStr0, (int*)pcurrentItem, itemsGetter, data, itemsCount, heightInItems); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool ListBox(string label, ref int currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (int* pcurrentItem = ¤tItem) - { - byte ret = ImGuiNative.ListBox(pStr0, (int*)pcurrentItem, itemsGetter, data, itemsCount, (int)(-1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static void Value(byte* prefix, bool b) - { - ImGuiNative.Value(prefix, b ? (byte)1 : (byte)0); - } - public static void Value(ref byte prefix, bool b) - { - fixed (byte* pprefix = &prefix) - { - ImGuiNative.Value((byte*)pprefix, b ? (byte)1 : (byte)0); - } - } - public static void Value(ReadOnlySpan prefix, bool b) - { - fixed (byte* pprefix = prefix) - { - ImGuiNative.Value((byte*)pprefix, b ? (byte)1 : (byte)0); - } - } - public static void Value(string prefix, bool b) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (prefix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(prefix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.Value(pStr0, b ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void Value(byte* prefix, int v) - { - ImGuiNative.Value(prefix, v); - } - public static void Value(ref byte prefix, int v) - { - fixed (byte* pprefix = &prefix) - { - ImGuiNative.Value((byte*)pprefix, v); - } - } - public static void Value(ReadOnlySpan prefix, int v) - { - fixed (byte* pprefix = prefix) - { - ImGuiNative.Value((byte*)pprefix, v); - } - } - public static void Value(string prefix, int v) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (prefix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(prefix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.Value(pStr0, v); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void Value(byte* prefix, uint v) - { - ImGuiNative.Value(prefix, v); - } - public static void Value(ref byte prefix, uint v) - { - fixed (byte* pprefix = &prefix) - { - ImGuiNative.Value((byte*)pprefix, v); - } - } - public static void Value(ReadOnlySpan prefix, uint v) - { - fixed (byte* pprefix = prefix) - { - ImGuiNative.Value((byte*)pprefix, v); - } - } - public static void Value(string prefix, uint v) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (prefix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(prefix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.Value(pStr0, v); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void Value(byte* prefix, float v, byte* floatFormat) - { - ImGuiNative.Value(prefix, v, floatFormat); - } - public static void Value(byte* prefix, float v) - { - ImGuiNative.Value(prefix, v, (byte*)(default)); - } - public static void Value(ref byte prefix, float v, byte* floatFormat) - { - fixed (byte* pprefix = &prefix) - { - ImGuiNative.Value((byte*)pprefix, v, floatFormat); - } - } - public static void Value(ref byte prefix, float v) - { - fixed (byte* pprefix = &prefix) - { - ImGuiNative.Value((byte*)pprefix, v, (byte*)(default)); - } - } - public static void Value(ReadOnlySpan prefix, float v, byte* floatFormat) - { - fixed (byte* pprefix = prefix) - { - ImGuiNative.Value((byte*)pprefix, v, floatFormat); - } - } - public static void Value(ReadOnlySpan prefix, float v) - { - fixed (byte* pprefix = prefix) - { - ImGuiNative.Value((byte*)pprefix, v, (byte*)(default)); - } - } - public static void Value(string prefix, float v, byte* floatFormat) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (prefix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(prefix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.Value(pStr0, v, floatFormat); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void Value(string prefix, float v) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (prefix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(prefix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.Value(pStr0, v, (byte*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void Value(byte* prefix, float v, ref byte floatFormat) - { - fixed (byte* pfloatFormat = &floatFormat) - { - ImGuiNative.Value(prefix, v, (byte*)pfloatFormat); - } - } - public static void Value(byte* prefix, float v, ReadOnlySpan floatFormat) - { - fixed (byte* pfloatFormat = floatFormat) - { - ImGuiNative.Value(prefix, v, (byte*)pfloatFormat); - } - } - public static void Value(byte* prefix, float v, string floatFormat) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (floatFormat != null) - { - pStrSize0 = Utils.GetByteCountUTF8(floatFormat); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(floatFormat, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.Value(prefix, v, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void Value(ref byte prefix, float v, ref byte floatFormat) - { - fixed (byte* pprefix = &prefix) - { - fixed (byte* pfloatFormat = &floatFormat) - { - ImGuiNative.Value((byte*)pprefix, v, (byte*)pfloatFormat); - } - } - } - public static void Value(ReadOnlySpan prefix, float v, ReadOnlySpan floatFormat) - { - fixed (byte* pprefix = prefix) - { - fixed (byte* pfloatFormat = floatFormat) - { - ImGuiNative.Value((byte*)pprefix, v, (byte*)pfloatFormat); - } - } - } - public static void Value(string prefix, float v, string floatFormat) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (prefix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(prefix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (floatFormat != null) - { - pStrSize1 = Utils.GetByteCountUTF8(floatFormat); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(floatFormat, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - ImGuiNative.Value(pStr0, v, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void Value(ref byte prefix, float v, ReadOnlySpan floatFormat) - { - fixed (byte* pprefix = &prefix) - { - fixed (byte* pfloatFormat = floatFormat) - { - ImGuiNative.Value((byte*)pprefix, v, (byte*)pfloatFormat); - } - } - } - public static void Value(ref byte prefix, float v, string floatFormat) - { - fixed (byte* pprefix = &prefix) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (floatFormat != null) - { - pStrSize0 = Utils.GetByteCountUTF8(floatFormat); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(floatFormat, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.Value((byte*)pprefix, v, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void Value(ReadOnlySpan prefix, float v, ref byte floatFormat) - { - fixed (byte* pprefix = prefix) - { - fixed (byte* pfloatFormat = &floatFormat) - { - ImGuiNative.Value((byte*)pprefix, v, (byte*)pfloatFormat); - } - } - } - public static void Value(ReadOnlySpan prefix, float v, string floatFormat) - { - fixed (byte* pprefix = prefix) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (floatFormat != null) - { - pStrSize0 = Utils.GetByteCountUTF8(floatFormat); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(floatFormat, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.Value((byte*)pprefix, v, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void Value(string prefix, float v, ref byte floatFormat) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (prefix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(prefix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pfloatFormat = &floatFormat) - { - ImGuiNative.Value(pStr0, v, (byte*)pfloatFormat); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void Value(string prefix, float v, ReadOnlySpan floatFormat) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (prefix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(prefix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pfloatFormat = floatFormat) - { - ImGuiNative.Value(pStr0, v, (byte*)pfloatFormat); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } public static bool BeginMenuBar() { byte ret = ImGuiNative.BeginMenuBar(); @@ -9045,2413 +1736,10 @@ public unsafe partial class ImGui { ImGuiNative.EndMainMenuBar(); } - public static bool BeginMenu(byte* label, bool enabled) - { - byte ret = ImGuiNative.BeginMenu(label, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - public static bool BeginMenu(byte* label) - { - byte ret = ImGuiNative.BeginMenu(label, (byte)(1)); - return ret != 0; - } - public static bool BeginMenu(ref byte label, bool enabled) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.BeginMenu((byte*)plabel, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool BeginMenu(ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.BeginMenu((byte*)plabel, (byte)(1)); - return ret != 0; - } - } - public static bool BeginMenu(ReadOnlySpan label, bool enabled) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.BeginMenu((byte*)plabel, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool BeginMenu(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.BeginMenu((byte*)plabel, (byte)(1)); - return ret != 0; - } - } - public static bool BeginMenu(string label, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginMenu(pStr0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginMenu(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginMenu(pStr0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static void EndMenu() { ImGuiNative.EndMenu(); } - public static bool MenuItem(byte* label, byte* shortcut, bool selected, bool enabled) - { - byte ret = ImGuiNative.MenuItem(label, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - public static bool MenuItem(byte* label, byte* shortcut, bool selected) - { - byte ret = ImGuiNative.MenuItem(label, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - public static bool MenuItem(byte* label, byte* shortcut) - { - byte ret = ImGuiNative.MenuItem(label, shortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - public static bool MenuItem(byte* label) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)(default), (byte)(0), (byte)(1)); - return ret != 0; - } - public static bool MenuItem(byte* label, bool selected) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - public static bool MenuItem(byte* label, bool selected, bool enabled) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - public static bool MenuItem(ref byte label, byte* shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItem(ref byte label, byte* shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(ref byte label, byte* shortcut) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)(default), (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(ref byte label, bool selected) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(ref byte label, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label, byte* shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label, byte* shortcut, bool selected) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label, byte* shortcut) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)(default), (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label, bool selected) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItem(string label, byte* shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(string label, byte* shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(string label, byte* shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, shortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)(default), (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(string label, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(string label, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(byte* label, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItem(byte* label, ref byte shortcut, bool selected) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(byte* label, ref byte shortcut) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(byte* label, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItem(byte* label, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(byte* label, ReadOnlySpan shortcut) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(byte* label, string shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(label, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(byte* label, string shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(label, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(byte* label, string shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(label, pStr0, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(ref byte label, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItem(ref byte label, ref byte shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(ref byte label, ref byte shortcut) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, ReadOnlySpan shortcut) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(string label, string shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, pStr1, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(string label, string shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, pStr1, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(string label, string shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, pStr1, (byte)(0), (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(ref byte label, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItem(ref byte label, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(ref byte label, ReadOnlySpan shortcut) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(ref byte label, string shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(ref byte label, string shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(ref byte label, string shortcut) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, ref byte shortcut, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, ref byte shortcut) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, string shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label, string shortcut, bool selected) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label, string shortcut) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(string label, ref byte shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(string label, ref byte shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(string label, ref byte shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(string label, ReadOnlySpan shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(string label, ReadOnlySpan shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(string label, ReadOnlySpan shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(byte* label, byte* shortcut, bool* pSelected, bool enabled) - { - byte ret = ImGuiNative.MenuItem(label, shortcut, pSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - public static bool MenuItem(byte* label, byte* shortcut, bool* pSelected) - { - byte ret = ImGuiNative.MenuItem(label, shortcut, pSelected, (byte)(1)); - return ret != 0; - } - public static bool MenuItem(ref byte label, byte* shortcut, bool* pSelected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, pSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItem(ref byte label, byte* shortcut, bool* pSelected) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, pSelected, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label, byte* shortcut, bool* pSelected, bool enabled) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, pSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label, byte* shortcut, bool* pSelected) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, pSelected, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(string label, byte* shortcut, bool* pSelected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, shortcut, pSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(string label, byte* shortcut, bool* pSelected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, shortcut, pSelected, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(byte* label, ref byte shortcut, bool* pSelected, bool enabled) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, pSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItem(byte* label, ref byte shortcut, bool* pSelected) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, pSelected, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(byte* label, ReadOnlySpan shortcut, bool* pSelected, bool enabled) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, pSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItem(byte* label, ReadOnlySpan shortcut, bool* pSelected) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, pSelected, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(byte* label, string shortcut, bool* pSelected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(label, pStr0, pSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(byte* label, string shortcut, bool* pSelected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem(label, pStr0, pSelected, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(ref byte label, ref byte shortcut, bool* pSelected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, pSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItem(ref byte label, ref byte shortcut, bool* pSelected) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, pSelected, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, ReadOnlySpan shortcut, bool* pSelected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, pSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, ReadOnlySpan shortcut, bool* pSelected) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, pSelected, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(string label, string shortcut, bool* pSelected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, pStr1, pSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(string label, string shortcut, bool* pSelected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiNative.MenuItem(pStr0, pStr1, pSelected, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItem(ref byte label, ReadOnlySpan shortcut, bool* pSelected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, pSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItem(ref byte label, ReadOnlySpan shortcut, bool* pSelected) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, pSelected, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(ref byte label, string shortcut, bool* pSelected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, pSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(ref byte label, string shortcut, bool* pSelected) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, pSelected, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label, ref byte shortcut, bool* pSelected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, pSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, ref byte shortcut, bool* pSelected) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, pSelected, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, string shortcut, bool* pSelected, bool enabled) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, pSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(ReadOnlySpan label, string shortcut, bool* pSelected) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, pSelected, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(string label, ref byte shortcut, bool* pSelected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, pSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(string label, ref byte shortcut, bool* pSelected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, pSelected, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(string label, ReadOnlySpan shortcut, bool* pSelected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, pSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(string label, ReadOnlySpan shortcut, bool* pSelected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, pSelected, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(byte* label, byte* shortcut, ref bool pSelected, bool enabled) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(label, shortcut, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItem(byte* label, byte* shortcut, ref bool pSelected) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(label, shortcut, (bool*)ppSelected, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItem(ref byte label, byte* shortcut, ref bool pSelected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItem(ref byte label, byte* shortcut, ref bool pSelected) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, (bool*)ppSelected, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, byte* shortcut, ref bool pSelected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, byte* shortcut, ref bool pSelected) - { - fixed (byte* plabel = label) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, shortcut, (bool*)ppSelected, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(string label, byte* shortcut, ref bool pSelected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(pStr0, shortcut, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(string label, byte* shortcut, ref bool pSelected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(pStr0, shortcut, (bool*)ppSelected, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(byte* label, ref byte shortcut, ref bool pSelected, bool enabled) - { - fixed (byte* pshortcut = &shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItem(byte* label, ref byte shortcut, ref bool pSelected) - { - fixed (byte* pshortcut = &shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, (bool*)ppSelected, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(byte* label, ReadOnlySpan shortcut, ref bool pSelected, bool enabled) - { - fixed (byte* pshortcut = shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItem(byte* label, ReadOnlySpan shortcut, ref bool pSelected) - { - fixed (byte* pshortcut = shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(label, (byte*)pshortcut, (bool*)ppSelected, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItem(byte* label, string shortcut, ref bool pSelected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(label, pStr0, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(byte* label, string shortcut, ref bool pSelected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(label, pStr0, (bool*)ppSelected, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(ref byte label, ref byte shortcut, ref bool pSelected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = &shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - } - public static bool MenuItem(ref byte label, ref byte shortcut, ref bool pSelected) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = &shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, (bool*)ppSelected, (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItem(ReadOnlySpan label, ReadOnlySpan shortcut, ref bool pSelected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - } - public static bool MenuItem(ReadOnlySpan label, ReadOnlySpan shortcut, ref bool pSelected) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, (bool*)ppSelected, (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItem(string label, string shortcut, ref bool pSelected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(pStr0, pStr1, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(string label, string shortcut, ref bool pSelected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(pStr0, pStr1, (bool*)ppSelected, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItem(ref byte label, ReadOnlySpan shortcut, ref bool pSelected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - } - public static bool MenuItem(ref byte label, ReadOnlySpan shortcut, ref bool pSelected) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, (bool*)ppSelected, (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItem(ref byte label, string shortcut, ref bool pSelected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItem(ref byte label, string shortcut, ref bool pSelected) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, (bool*)ppSelected, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, ref byte shortcut, ref bool pSelected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = &shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - } - public static bool MenuItem(ReadOnlySpan label, ref byte shortcut, ref bool pSelected) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = &shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, (byte*)pshortcut, (bool*)ppSelected, (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItem(ReadOnlySpan label, string shortcut, ref bool pSelected, bool enabled) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItem(ReadOnlySpan label, string shortcut, ref bool pSelected) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem((byte*)plabel, pStr0, (bool*)ppSelected, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItem(string label, ref byte shortcut, ref bool pSelected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItem(string label, ref byte shortcut, ref bool pSelected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, (bool*)ppSelected, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItem(string label, ReadOnlySpan shortcut, ref bool pSelected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, (bool*)ppSelected, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItem(string label, ReadOnlySpan shortcut, ref bool pSelected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - fixed (bool* ppSelected = &pSelected) - { - byte ret = ImGuiNative.MenuItem(pStr0, (byte*)pshortcut, (bool*)ppSelected, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } public static void BeginTooltip() { ImGuiNative.BeginTooltip(); @@ -11460,1384 +1748,14 @@ public unsafe partial class ImGui { ImGuiNative.EndTooltip(); } - public static bool BeginPopup(byte* strId, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.BeginPopup(strId, flags); - return ret != 0; - } - public static bool BeginPopup(byte* strId) - { - byte ret = ImGuiNative.BeginPopup(strId, (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool BeginPopup(ref byte strId, ImGuiWindowFlags flags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginPopup((byte*)pstrId, flags); - return ret != 0; - } - } - public static bool BeginPopup(ref byte strId) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginPopup((byte*)pstrId, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginPopup(ReadOnlySpan strId, ImGuiWindowFlags flags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginPopup((byte*)pstrId, flags); - return ret != 0; - } - } - public static bool BeginPopup(ReadOnlySpan strId) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginPopup((byte*)pstrId, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginPopup(string strId, ImGuiWindowFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginPopup(pStr0, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginPopup(string strId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginPopup(pStr0, (ImGuiWindowFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginPopupModal(byte* name, bool* pOpen, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.BeginPopupModal(name, pOpen, flags); - return ret != 0; - } - public static bool BeginPopupModal(byte* name, bool* pOpen) - { - byte ret = ImGuiNative.BeginPopupModal(name, pOpen, (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool BeginPopupModal(byte* name) - { - byte ret = ImGuiNative.BeginPopupModal(name, (bool*)(default), (ImGuiWindowFlags)(0)); - return ret != 0; - } - public static bool BeginPopupModal(byte* name, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.BeginPopupModal(name, (bool*)(default), flags); - return ret != 0; - } - public static bool BeginPopupModal(ref byte name, bool* pOpen, ImGuiWindowFlags flags) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiNative.BeginPopupModal((byte*)pname, pOpen, flags); - return ret != 0; - } - } - public static bool BeginPopupModal(ref byte name, bool* pOpen) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiNative.BeginPopupModal((byte*)pname, pOpen, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginPopupModal(ref byte name) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiNative.BeginPopupModal((byte*)pname, (bool*)(default), (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginPopupModal(ref byte name, ImGuiWindowFlags flags) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiNative.BeginPopupModal((byte*)pname, (bool*)(default), flags); - return ret != 0; - } - } - public static bool BeginPopupModal(ReadOnlySpan name, bool* pOpen, ImGuiWindowFlags flags) - { - fixed (byte* pname = name) - { - byte ret = ImGuiNative.BeginPopupModal((byte*)pname, pOpen, flags); - return ret != 0; - } - } - public static bool BeginPopupModal(ReadOnlySpan name, bool* pOpen) - { - fixed (byte* pname = name) - { - byte ret = ImGuiNative.BeginPopupModal((byte*)pname, pOpen, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginPopupModal(ReadOnlySpan name) - { - fixed (byte* pname = name) - { - byte ret = ImGuiNative.BeginPopupModal((byte*)pname, (bool*)(default), (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginPopupModal(ReadOnlySpan name, ImGuiWindowFlags flags) - { - fixed (byte* pname = name) - { - byte ret = ImGuiNative.BeginPopupModal((byte*)pname, (bool*)(default), flags); - return ret != 0; - } - } - public static bool BeginPopupModal(string name, bool* pOpen, ImGuiWindowFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginPopupModal(pStr0, pOpen, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginPopupModal(string name, bool* pOpen) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginPopupModal(pStr0, pOpen, (ImGuiWindowFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginPopupModal(string name) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginPopupModal(pStr0, (bool*)(default), (ImGuiWindowFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginPopupModal(string name, ImGuiWindowFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginPopupModal(pStr0, (bool*)(default), flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginPopupModal(byte* name, ref bool pOpen, ImGuiWindowFlags flags) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginPopupModal(name, (bool*)ppOpen, flags); - return ret != 0; - } - } - public static bool BeginPopupModal(byte* name, ref bool pOpen) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginPopupModal(name, (bool*)ppOpen, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - public static bool BeginPopupModal(ref byte name, ref bool pOpen, ImGuiWindowFlags flags) - { - fixed (byte* pname = &name) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginPopupModal((byte*)pname, (bool*)ppOpen, flags); - return ret != 0; - } - } - } - public static bool BeginPopupModal(ref byte name, ref bool pOpen) - { - fixed (byte* pname = &name) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginPopupModal((byte*)pname, (bool*)ppOpen, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - } - public static bool BeginPopupModal(ReadOnlySpan name, ref bool pOpen, ImGuiWindowFlags flags) - { - fixed (byte* pname = name) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginPopupModal((byte*)pname, (bool*)ppOpen, flags); - return ret != 0; - } - } - } - public static bool BeginPopupModal(ReadOnlySpan name, ref bool pOpen) - { - fixed (byte* pname = name) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginPopupModal((byte*)pname, (bool*)ppOpen, (ImGuiWindowFlags)(0)); - return ret != 0; - } - } - } - public static bool BeginPopupModal(string name, ref bool pOpen, ImGuiWindowFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginPopupModal(pStr0, (bool*)ppOpen, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginPopupModal(string name, ref bool pOpen) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginPopupModal(pStr0, (bool*)ppOpen, (ImGuiWindowFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } public static void EndPopup() { ImGuiNative.EndPopup(); } - public static void OpenPopup(byte* strId, ImGuiPopupFlags popupFlags) - { - ImGuiNative.OpenPopup(strId, popupFlags); - } - public static void OpenPopup(byte* strId) - { - ImGuiNative.OpenPopup(strId, (ImGuiPopupFlags)(0)); - } - public static void OpenPopup(ref byte strId, ImGuiPopupFlags popupFlags) - { - fixed (byte* pstrId = &strId) - { - ImGuiNative.OpenPopup((byte*)pstrId, popupFlags); - } - } - public static void OpenPopup(ref byte strId) - { - fixed (byte* pstrId = &strId) - { - ImGuiNative.OpenPopup((byte*)pstrId, (ImGuiPopupFlags)(0)); - } - } - public static void OpenPopup(ReadOnlySpan strId, ImGuiPopupFlags popupFlags) - { - fixed (byte* pstrId = strId) - { - ImGuiNative.OpenPopup((byte*)pstrId, popupFlags); - } - } - public static void OpenPopup(ReadOnlySpan strId) - { - fixed (byte* pstrId = strId) - { - ImGuiNative.OpenPopup((byte*)pstrId, (ImGuiPopupFlags)(0)); - } - } - public static void OpenPopup(string strId, ImGuiPopupFlags popupFlags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.OpenPopup(pStr0, popupFlags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void OpenPopup(string strId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.OpenPopup(pStr0, (ImGuiPopupFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void OpenPopup(uint id, ImGuiPopupFlags popupFlags) - { - ImGuiNative.OpenPopup(id, popupFlags); - } - public static void OpenPopup(uint id) - { - ImGuiNative.OpenPopup(id, (ImGuiPopupFlags)(0)); - } - public static void OpenPopupOnItemClick(byte* strId, ImGuiPopupFlags popupFlags) - { - ImGuiNative.OpenPopupOnItemClick(strId, popupFlags); - } - public static void OpenPopupOnItemClick(byte* strId) - { - ImGuiNative.OpenPopupOnItemClick(strId, (ImGuiPopupFlags)(1)); - } - public static void OpenPopupOnItemClick() - { - ImGuiNative.OpenPopupOnItemClick((byte*)(default), (ImGuiPopupFlags)(1)); - } - public static void OpenPopupOnItemClick(ImGuiPopupFlags popupFlags) - { - ImGuiNative.OpenPopupOnItemClick((byte*)(default), popupFlags); - } - public static void OpenPopupOnItemClick(ref byte strId, ImGuiPopupFlags popupFlags) - { - fixed (byte* pstrId = &strId) - { - ImGuiNative.OpenPopupOnItemClick((byte*)pstrId, popupFlags); - } - } - public static void OpenPopupOnItemClick(ref byte strId) - { - fixed (byte* pstrId = &strId) - { - ImGuiNative.OpenPopupOnItemClick((byte*)pstrId, (ImGuiPopupFlags)(1)); - } - } - public static void OpenPopupOnItemClick(ReadOnlySpan strId, ImGuiPopupFlags popupFlags) - { - fixed (byte* pstrId = strId) - { - ImGuiNative.OpenPopupOnItemClick((byte*)pstrId, popupFlags); - } - } - public static void OpenPopupOnItemClick(ReadOnlySpan strId) - { - fixed (byte* pstrId = strId) - { - ImGuiNative.OpenPopupOnItemClick((byte*)pstrId, (ImGuiPopupFlags)(1)); - } - } - public static void OpenPopupOnItemClick(string strId, ImGuiPopupFlags popupFlags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.OpenPopupOnItemClick(pStr0, popupFlags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void OpenPopupOnItemClick(string strId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.OpenPopupOnItemClick(pStr0, (ImGuiPopupFlags)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static void CloseCurrentPopup() { ImGuiNative.CloseCurrentPopup(); } - public static bool BeginPopupContextItem(byte* strId, ImGuiPopupFlags popupFlags) - { - byte ret = ImGuiNative.BeginPopupContextItem(strId, popupFlags); - return ret != 0; - } - public static bool BeginPopupContextItem(byte* strId) - { - byte ret = ImGuiNative.BeginPopupContextItem(strId, (ImGuiPopupFlags)(1)); - return ret != 0; - } - public static bool BeginPopupContextItem() - { - byte ret = ImGuiNative.BeginPopupContextItem((byte*)(default), (ImGuiPopupFlags)(1)); - return ret != 0; - } - public static bool BeginPopupContextItem(ImGuiPopupFlags popupFlags) - { - byte ret = ImGuiNative.BeginPopupContextItem((byte*)(default), popupFlags); - return ret != 0; - } - public static bool BeginPopupContextItem(ref byte strId, ImGuiPopupFlags popupFlags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginPopupContextItem((byte*)pstrId, popupFlags); - return ret != 0; - } - } - public static bool BeginPopupContextItem(ref byte strId) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginPopupContextItem((byte*)pstrId, (ImGuiPopupFlags)(1)); - return ret != 0; - } - } - public static bool BeginPopupContextItem(ReadOnlySpan strId, ImGuiPopupFlags popupFlags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginPopupContextItem((byte*)pstrId, popupFlags); - return ret != 0; - } - } - public static bool BeginPopupContextItem(ReadOnlySpan strId) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginPopupContextItem((byte*)pstrId, (ImGuiPopupFlags)(1)); - return ret != 0; - } - } - public static bool BeginPopupContextItem(string strId, ImGuiPopupFlags popupFlags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginPopupContextItem(pStr0, popupFlags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginPopupContextItem(string strId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginPopupContextItem(pStr0, (ImGuiPopupFlags)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginPopupContextWindow(byte* strId, ImGuiPopupFlags popupFlags) - { - byte ret = ImGuiNative.BeginPopupContextWindow(strId, popupFlags); - return ret != 0; - } - public static bool BeginPopupContextWindow(byte* strId) - { - byte ret = ImGuiNative.BeginPopupContextWindow(strId, (ImGuiPopupFlags)(1)); - return ret != 0; - } - public static bool BeginPopupContextWindow() - { - byte ret = ImGuiNative.BeginPopupContextWindow((byte*)(default), (ImGuiPopupFlags)(1)); - return ret != 0; - } - public static bool BeginPopupContextWindow(ImGuiPopupFlags popupFlags) - { - byte ret = ImGuiNative.BeginPopupContextWindow((byte*)(default), popupFlags); - return ret != 0; - } - public static bool BeginPopupContextWindow(ref byte strId, ImGuiPopupFlags popupFlags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginPopupContextWindow((byte*)pstrId, popupFlags); - return ret != 0; - } - } - public static bool BeginPopupContextWindow(ref byte strId) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginPopupContextWindow((byte*)pstrId, (ImGuiPopupFlags)(1)); - return ret != 0; - } - } - public static bool BeginPopupContextWindow(ReadOnlySpan strId, ImGuiPopupFlags popupFlags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginPopupContextWindow((byte*)pstrId, popupFlags); - return ret != 0; - } - } - public static bool BeginPopupContextWindow(ReadOnlySpan strId) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginPopupContextWindow((byte*)pstrId, (ImGuiPopupFlags)(1)); - return ret != 0; - } - } - public static bool BeginPopupContextWindow(string strId, ImGuiPopupFlags popupFlags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginPopupContextWindow(pStr0, popupFlags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginPopupContextWindow(string strId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginPopupContextWindow(pStr0, (ImGuiPopupFlags)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginPopupContextVoid(byte* strId, ImGuiPopupFlags popupFlags) - { - byte ret = ImGuiNative.BeginPopupContextVoid(strId, popupFlags); - return ret != 0; - } - public static bool BeginPopupContextVoid(byte* strId) - { - byte ret = ImGuiNative.BeginPopupContextVoid(strId, (ImGuiPopupFlags)(1)); - return ret != 0; - } - public static bool BeginPopupContextVoid() - { - byte ret = ImGuiNative.BeginPopupContextVoid((byte*)(default), (ImGuiPopupFlags)(1)); - return ret != 0; - } - public static bool BeginPopupContextVoid(ImGuiPopupFlags popupFlags) - { - byte ret = ImGuiNative.BeginPopupContextVoid((byte*)(default), popupFlags); - return ret != 0; - } - public static bool BeginPopupContextVoid(ref byte strId, ImGuiPopupFlags popupFlags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginPopupContextVoid((byte*)pstrId, popupFlags); - return ret != 0; - } - } - public static bool BeginPopupContextVoid(ref byte strId) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginPopupContextVoid((byte*)pstrId, (ImGuiPopupFlags)(1)); - return ret != 0; - } - } - public static bool BeginPopupContextVoid(ReadOnlySpan strId, ImGuiPopupFlags popupFlags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginPopupContextVoid((byte*)pstrId, popupFlags); - return ret != 0; - } - } - public static bool BeginPopupContextVoid(ReadOnlySpan strId) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginPopupContextVoid((byte*)pstrId, (ImGuiPopupFlags)(1)); - return ret != 0; - } - } - public static bool BeginPopupContextVoid(string strId, ImGuiPopupFlags popupFlags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginPopupContextVoid(pStr0, popupFlags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginPopupContextVoid(string strId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginPopupContextVoid(pStr0, (ImGuiPopupFlags)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool IsPopupOpen(byte* strId, ImGuiPopupFlags flags) - { - byte ret = ImGuiNative.IsPopupOpen(strId, flags); - return ret != 0; - } - public static bool IsPopupOpen(byte* strId) - { - byte ret = ImGuiNative.IsPopupOpen(strId, (ImGuiPopupFlags)(0)); - return ret != 0; - } - public static bool IsPopupOpen(ref byte strId, ImGuiPopupFlags flags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.IsPopupOpen((byte*)pstrId, flags); - return ret != 0; - } - } - public static bool IsPopupOpen(ref byte strId) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.IsPopupOpen((byte*)pstrId, (ImGuiPopupFlags)(0)); - return ret != 0; - } - } - public static bool IsPopupOpen(ReadOnlySpan strId, ImGuiPopupFlags flags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.IsPopupOpen((byte*)pstrId, flags); - return ret != 0; - } - } - public static bool IsPopupOpen(ReadOnlySpan strId) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.IsPopupOpen((byte*)pstrId, (ImGuiPopupFlags)(0)); - return ret != 0; - } - } - public static bool IsPopupOpen(string strId, ImGuiPopupFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.IsPopupOpen(pStr0, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool IsPopupOpen(string strId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.IsPopupOpen(pStr0, (ImGuiPopupFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTable(byte* strId, int column, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) - { - byte ret = ImGuiNative.BeginTable(strId, column, flags, outerSize, innerWidth); - return ret != 0; - } - public static bool BeginTable(byte* strId, int column, ImGuiTableFlags flags, Vector2 outerSize) - { - byte ret = ImGuiNative.BeginTable(strId, column, flags, outerSize, (float)(0.0f)); - return ret != 0; - } - public static bool BeginTable(byte* strId, int column, ImGuiTableFlags flags) - { - byte ret = ImGuiNative.BeginTable(strId, column, flags, (Vector2)(new Vector2(0.0f,0.0f)), (float)(0.0f)); - return ret != 0; - } - public static bool BeginTable(byte* strId, int column) - { - byte ret = ImGuiNative.BeginTable(strId, column, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0.0f,0.0f)), (float)(0.0f)); - return ret != 0; - } - public static bool BeginTable(byte* strId, int column, Vector2 outerSize) - { - byte ret = ImGuiNative.BeginTable(strId, column, (ImGuiTableFlags)(0), outerSize, (float)(0.0f)); - return ret != 0; - } - public static bool BeginTable(byte* strId, int column, ImGuiTableFlags flags, float innerWidth) - { - byte ret = ImGuiNative.BeginTable(strId, column, flags, (Vector2)(new Vector2(0.0f,0.0f)), innerWidth); - return ret != 0; - } - public static bool BeginTable(byte* strId, int column, float innerWidth) - { - byte ret = ImGuiNative.BeginTable(strId, column, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0.0f,0.0f)), innerWidth); - return ret != 0; - } - public static bool BeginTable(byte* strId, int column, Vector2 outerSize, float innerWidth) - { - byte ret = ImGuiNative.BeginTable(strId, column, (ImGuiTableFlags)(0), outerSize, innerWidth); - return ret != 0; - } - public static bool BeginTable(ref byte strId, int column, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, flags, outerSize, innerWidth); - return ret != 0; - } - } - public static bool BeginTable(ref byte strId, int column, ImGuiTableFlags flags, Vector2 outerSize) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, flags, outerSize, (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTable(ref byte strId, int column, ImGuiTableFlags flags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, flags, (Vector2)(new Vector2(0.0f,0.0f)), (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTable(ref byte strId, int column) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0.0f,0.0f)), (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTable(ref byte strId, int column, Vector2 outerSize) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, (ImGuiTableFlags)(0), outerSize, (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTable(ref byte strId, int column, ImGuiTableFlags flags, float innerWidth) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, flags, (Vector2)(new Vector2(0.0f,0.0f)), innerWidth); - return ret != 0; - } - } - public static bool BeginTable(ref byte strId, int column, float innerWidth) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0.0f,0.0f)), innerWidth); - return ret != 0; - } - } - public static bool BeginTable(ref byte strId, int column, Vector2 outerSize, float innerWidth) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, (ImGuiTableFlags)(0), outerSize, innerWidth); - return ret != 0; - } - } - public static bool BeginTable(ReadOnlySpan strId, int column, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, flags, outerSize, innerWidth); - return ret != 0; - } - } - public static bool BeginTable(ReadOnlySpan strId, int column, ImGuiTableFlags flags, Vector2 outerSize) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, flags, outerSize, (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTable(ReadOnlySpan strId, int column, ImGuiTableFlags flags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, flags, (Vector2)(new Vector2(0.0f,0.0f)), (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTable(ReadOnlySpan strId, int column) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0.0f,0.0f)), (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTable(ReadOnlySpan strId, int column, Vector2 outerSize) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, (ImGuiTableFlags)(0), outerSize, (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTable(ReadOnlySpan strId, int column, ImGuiTableFlags flags, float innerWidth) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, flags, (Vector2)(new Vector2(0.0f,0.0f)), innerWidth); - return ret != 0; - } - } - public static bool BeginTable(ReadOnlySpan strId, int column, float innerWidth) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0.0f,0.0f)), innerWidth); - return ret != 0; - } - } - public static bool BeginTable(ReadOnlySpan strId, int column, Vector2 outerSize, float innerWidth) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginTable((byte*)pstrId, column, (ImGuiTableFlags)(0), outerSize, innerWidth); - return ret != 0; - } - } - public static bool BeginTable(string strId, int column, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTable(pStr0, column, flags, outerSize, innerWidth); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTable(string strId, int column, ImGuiTableFlags flags, Vector2 outerSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTable(pStr0, column, flags, outerSize, (float)(0.0f)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTable(string strId, int column, ImGuiTableFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTable(pStr0, column, flags, (Vector2)(new Vector2(0.0f,0.0f)), (float)(0.0f)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTable(string strId, int column) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTable(pStr0, column, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0.0f,0.0f)), (float)(0.0f)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTable(string strId, int column, Vector2 outerSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTable(pStr0, column, (ImGuiTableFlags)(0), outerSize, (float)(0.0f)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTable(string strId, int column, ImGuiTableFlags flags, float innerWidth) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTable(pStr0, column, flags, (Vector2)(new Vector2(0.0f,0.0f)), innerWidth); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTable(string strId, int column, float innerWidth) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTable(pStr0, column, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0.0f,0.0f)), innerWidth); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTable(string strId, int column, Vector2 outerSize, float innerWidth) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTable(pStr0, column, (ImGuiTableFlags)(0), outerSize, innerWidth); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static void EndTable() { ImGuiNative.EndTable(); @@ -12868,350 +1786,6 @@ public unsafe partial class ImGui byte ret = ImGuiNative.TableSetColumnIndex(columnN); return ret != 0; } - public static void TableSetupColumn(byte* label, ImGuiTableColumnFlags flags, float initWidthOrWeight, uint userId) - { - ImGuiNative.TableSetupColumn(label, flags, initWidthOrWeight, userId); - } - public static void TableSetupColumn(byte* label, ImGuiTableColumnFlags flags, float initWidthOrWeight) - { - ImGuiNative.TableSetupColumn(label, flags, initWidthOrWeight, (uint)(0)); - } - public static void TableSetupColumn(byte* label, ImGuiTableColumnFlags flags) - { - ImGuiNative.TableSetupColumn(label, flags, (float)(0.0f), (uint)(0)); - } - public static void TableSetupColumn(byte* label) - { - ImGuiNative.TableSetupColumn(label, (ImGuiTableColumnFlags)(0), (float)(0.0f), (uint)(0)); - } - public static void TableSetupColumn(byte* label, float initWidthOrWeight) - { - ImGuiNative.TableSetupColumn(label, (ImGuiTableColumnFlags)(0), initWidthOrWeight, (uint)(0)); - } - public static void TableSetupColumn(byte* label, ImGuiTableColumnFlags flags, uint userId) - { - ImGuiNative.TableSetupColumn(label, flags, (float)(0.0f), userId); - } - public static void TableSetupColumn(byte* label, uint userId) - { - ImGuiNative.TableSetupColumn(label, (ImGuiTableColumnFlags)(0), (float)(0.0f), userId); - } - public static void TableSetupColumn(byte* label, float initWidthOrWeight, uint userId) - { - ImGuiNative.TableSetupColumn(label, (ImGuiTableColumnFlags)(0), initWidthOrWeight, userId); - } - public static void TableSetupColumn(ref byte label, ImGuiTableColumnFlags flags, float initWidthOrWeight, uint userId) - { - fixed (byte* plabel = &label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, flags, initWidthOrWeight, userId); - } - } - public static void TableSetupColumn(ref byte label, ImGuiTableColumnFlags flags, float initWidthOrWeight) - { - fixed (byte* plabel = &label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, flags, initWidthOrWeight, (uint)(0)); - } - } - public static void TableSetupColumn(ref byte label, ImGuiTableColumnFlags flags) - { - fixed (byte* plabel = &label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, flags, (float)(0.0f), (uint)(0)); - } - } - public static void TableSetupColumn(ref byte label) - { - fixed (byte* plabel = &label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, (ImGuiTableColumnFlags)(0), (float)(0.0f), (uint)(0)); - } - } - public static void TableSetupColumn(ref byte label, float initWidthOrWeight) - { - fixed (byte* plabel = &label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, (ImGuiTableColumnFlags)(0), initWidthOrWeight, (uint)(0)); - } - } - public static void TableSetupColumn(ref byte label, ImGuiTableColumnFlags flags, uint userId) - { - fixed (byte* plabel = &label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, flags, (float)(0.0f), userId); - } - } - public static void TableSetupColumn(ref byte label, uint userId) - { - fixed (byte* plabel = &label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, (ImGuiTableColumnFlags)(0), (float)(0.0f), userId); - } - } - public static void TableSetupColumn(ref byte label, float initWidthOrWeight, uint userId) - { - fixed (byte* plabel = &label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, (ImGuiTableColumnFlags)(0), initWidthOrWeight, userId); - } - } - public static void TableSetupColumn(ReadOnlySpan label, ImGuiTableColumnFlags flags, float initWidthOrWeight, uint userId) - { - fixed (byte* plabel = label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, flags, initWidthOrWeight, userId); - } - } - public static void TableSetupColumn(ReadOnlySpan label, ImGuiTableColumnFlags flags, float initWidthOrWeight) - { - fixed (byte* plabel = label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, flags, initWidthOrWeight, (uint)(0)); - } - } - public static void TableSetupColumn(ReadOnlySpan label, ImGuiTableColumnFlags flags) - { - fixed (byte* plabel = label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, flags, (float)(0.0f), (uint)(0)); - } - } - public static void TableSetupColumn(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, (ImGuiTableColumnFlags)(0), (float)(0.0f), (uint)(0)); - } - } - public static void TableSetupColumn(ReadOnlySpan label, float initWidthOrWeight) - { - fixed (byte* plabel = label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, (ImGuiTableColumnFlags)(0), initWidthOrWeight, (uint)(0)); - } - } - public static void TableSetupColumn(ReadOnlySpan label, ImGuiTableColumnFlags flags, uint userId) - { - fixed (byte* plabel = label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, flags, (float)(0.0f), userId); - } - } - public static void TableSetupColumn(ReadOnlySpan label, uint userId) - { - fixed (byte* plabel = label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, (ImGuiTableColumnFlags)(0), (float)(0.0f), userId); - } - } - public static void TableSetupColumn(ReadOnlySpan label, float initWidthOrWeight, uint userId) - { - fixed (byte* plabel = label) - { - ImGuiNative.TableSetupColumn((byte*)plabel, (ImGuiTableColumnFlags)(0), initWidthOrWeight, userId); - } - } - public static void TableSetupColumn(string label, ImGuiTableColumnFlags flags, float initWidthOrWeight, uint userId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.TableSetupColumn(pStr0, flags, initWidthOrWeight, userId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void TableSetupColumn(string label, ImGuiTableColumnFlags flags, float initWidthOrWeight) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.TableSetupColumn(pStr0, flags, initWidthOrWeight, (uint)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void TableSetupColumn(string label, ImGuiTableColumnFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.TableSetupColumn(pStr0, flags, (float)(0.0f), (uint)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void TableSetupColumn(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.TableSetupColumn(pStr0, (ImGuiTableColumnFlags)(0), (float)(0.0f), (uint)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void TableSetupColumn(string label, float initWidthOrWeight) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.TableSetupColumn(pStr0, (ImGuiTableColumnFlags)(0), initWidthOrWeight, (uint)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void TableSetupColumn(string label, ImGuiTableColumnFlags flags, uint userId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.TableSetupColumn(pStr0, flags, (float)(0.0f), userId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void TableSetupColumn(string label, uint userId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.TableSetupColumn(pStr0, (ImGuiTableColumnFlags)(0), (float)(0.0f), userId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void TableSetupColumn(string label, float initWidthOrWeight, uint userId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.TableSetupColumn(pStr0, (ImGuiTableColumnFlags)(0), initWidthOrWeight, userId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static void TableSetupScrollFreeze(int cols, int rows) { ImGuiNative.TableSetupScrollFreeze(cols, rows); @@ -13220,49 +1794,6 @@ public unsafe partial class ImGui { ImGuiNative.TableHeadersRow(); } - public static void TableHeader(byte* label) - { - ImGuiNative.TableHeader(label); - } - public static void TableHeader(ref byte label) - { - fixed (byte* plabel = &label) - { - ImGuiNative.TableHeader((byte*)plabel); - } - } - public static void TableHeader(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - ImGuiNative.TableHeader((byte*)plabel); - } - } - public static void TableHeader(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.TableHeader(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static ImGuiTableSortSpecsPtr TableGetSortSpecs() { ImGuiTableSortSpecsPtr ret = ImGuiNative.TableGetSortSpecs(); @@ -13325,194 +1856,6 @@ public unsafe partial class ImGui { ImGuiNative.TableSetBgColor(target, color, (int)(-1)); } - public static void Columns(int count, byte* id, bool border) - { - ImGuiNative.Columns(count, id, border ? (byte)1 : (byte)0); - } - public static void Columns(int count, byte* id) - { - ImGuiNative.Columns(count, id, (byte)(1)); - } - public static void Columns(int count) - { - ImGuiNative.Columns(count, (byte*)(default), (byte)(1)); - } - public static void Columns() - { - ImGuiNative.Columns((int)(1), (byte*)(default), (byte)(1)); - } - public static void Columns(byte* id) - { - ImGuiNative.Columns((int)(1), id, (byte)(1)); - } - public static void Columns(int count, bool border) - { - ImGuiNative.Columns(count, (byte*)(default), border ? (byte)1 : (byte)0); - } - public static void Columns(bool border) - { - ImGuiNative.Columns((int)(1), (byte*)(default), border ? (byte)1 : (byte)0); - } - public static void Columns(byte* id, bool border) - { - ImGuiNative.Columns((int)(1), id, border ? (byte)1 : (byte)0); - } - public static void Columns(int count, ref byte id, bool border) - { - fixed (byte* pid = &id) - { - ImGuiNative.Columns(count, (byte*)pid, border ? (byte)1 : (byte)0); - } - } - public static void Columns(int count, ref byte id) - { - fixed (byte* pid = &id) - { - ImGuiNative.Columns(count, (byte*)pid, (byte)(1)); - } - } - public static void Columns(ref byte id) - { - fixed (byte* pid = &id) - { - ImGuiNative.Columns((int)(1), (byte*)pid, (byte)(1)); - } - } - public static void Columns(ref byte id, bool border) - { - fixed (byte* pid = &id) - { - ImGuiNative.Columns((int)(1), (byte*)pid, border ? (byte)1 : (byte)0); - } - } - public static void Columns(int count, ReadOnlySpan id, bool border) - { - fixed (byte* pid = id) - { - ImGuiNative.Columns(count, (byte*)pid, border ? (byte)1 : (byte)0); - } - } - public static void Columns(int count, ReadOnlySpan id) - { - fixed (byte* pid = id) - { - ImGuiNative.Columns(count, (byte*)pid, (byte)(1)); - } - } - public static void Columns(ReadOnlySpan id) - { - fixed (byte* pid = id) - { - ImGuiNative.Columns((int)(1), (byte*)pid, (byte)(1)); - } - } - public static void Columns(ReadOnlySpan id, bool border) - { - fixed (byte* pid = id) - { - ImGuiNative.Columns((int)(1), (byte*)pid, border ? (byte)1 : (byte)0); - } - } - public static void Columns(int count, string id, bool border) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (id != null) - { - pStrSize0 = Utils.GetByteCountUTF8(id); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(id, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.Columns(count, pStr0, border ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void Columns(int count, string id) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (id != null) - { - pStrSize0 = Utils.GetByteCountUTF8(id); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(id, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.Columns(count, pStr0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void Columns(string id) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (id != null) - { - pStrSize0 = Utils.GetByteCountUTF8(id); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(id, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.Columns((int)(1), pStr0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void Columns(string id, bool border) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (id != null) - { - pStrSize0 = Utils.GetByteCountUTF8(id); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(id, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.Columns((int)(1), pStr0, border ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static void NextColumn() { ImGuiNative.NextColumn(); @@ -13555,551 +1898,14 @@ public unsafe partial class ImGui int ret = ImGuiNative.GetColumnsCount(); return ret; } - public static bool BeginTabBar(byte* strId, ImGuiTabBarFlags flags) - { - byte ret = ImGuiNative.BeginTabBar(strId, flags); - return ret != 0; - } - public static bool BeginTabBar(byte* strId) - { - byte ret = ImGuiNative.BeginTabBar(strId, (ImGuiTabBarFlags)(0)); - return ret != 0; - } - public static bool BeginTabBar(ref byte strId, ImGuiTabBarFlags flags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginTabBar((byte*)pstrId, flags); - return ret != 0; - } - } - public static bool BeginTabBar(ref byte strId) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiNative.BeginTabBar((byte*)pstrId, (ImGuiTabBarFlags)(0)); - return ret != 0; - } - } - public static bool BeginTabBar(ReadOnlySpan strId, ImGuiTabBarFlags flags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginTabBar((byte*)pstrId, flags); - return ret != 0; - } - } - public static bool BeginTabBar(ReadOnlySpan strId) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiNative.BeginTabBar((byte*)pstrId, (ImGuiTabBarFlags)(0)); - return ret != 0; - } - } - public static bool BeginTabBar(string strId, ImGuiTabBarFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTabBar(pStr0, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTabBar(string strId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTabBar(pStr0, (ImGuiTabBarFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static void EndTabBar() { ImGuiNative.EndTabBar(); } - public static bool BeginTabItem(byte* label, bool* pOpen, ImGuiTabItemFlags flags) - { - byte ret = ImGuiNative.BeginTabItem(label, pOpen, flags); - return ret != 0; - } - public static bool BeginTabItem(byte* label, bool* pOpen) - { - byte ret = ImGuiNative.BeginTabItem(label, pOpen, (ImGuiTabItemFlags)(0)); - return ret != 0; - } - public static bool BeginTabItem(byte* label) - { - byte ret = ImGuiNative.BeginTabItem(label, (bool*)(default), (ImGuiTabItemFlags)(0)); - return ret != 0; - } - public static bool BeginTabItem(byte* label, ImGuiTabItemFlags flags) - { - byte ret = ImGuiNative.BeginTabItem(label, (bool*)(default), flags); - return ret != 0; - } - public static bool BeginTabItem(ref byte label, bool* pOpen, ImGuiTabItemFlags flags) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.BeginTabItem((byte*)plabel, pOpen, flags); - return ret != 0; - } - } - public static bool BeginTabItem(ref byte label, bool* pOpen) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.BeginTabItem((byte*)plabel, pOpen, (ImGuiTabItemFlags)(0)); - return ret != 0; - } - } - public static bool BeginTabItem(ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.BeginTabItem((byte*)plabel, (bool*)(default), (ImGuiTabItemFlags)(0)); - return ret != 0; - } - } - public static bool BeginTabItem(ref byte label, ImGuiTabItemFlags flags) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.BeginTabItem((byte*)plabel, (bool*)(default), flags); - return ret != 0; - } - } - public static bool BeginTabItem(ReadOnlySpan label, bool* pOpen, ImGuiTabItemFlags flags) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.BeginTabItem((byte*)plabel, pOpen, flags); - return ret != 0; - } - } - public static bool BeginTabItem(ReadOnlySpan label, bool* pOpen) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.BeginTabItem((byte*)plabel, pOpen, (ImGuiTabItemFlags)(0)); - return ret != 0; - } - } - public static bool BeginTabItem(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.BeginTabItem((byte*)plabel, (bool*)(default), (ImGuiTabItemFlags)(0)); - return ret != 0; - } - } - public static bool BeginTabItem(ReadOnlySpan label, ImGuiTabItemFlags flags) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.BeginTabItem((byte*)plabel, (bool*)(default), flags); - return ret != 0; - } - } - public static bool BeginTabItem(string label, bool* pOpen, ImGuiTabItemFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTabItem(pStr0, pOpen, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTabItem(string label, bool* pOpen) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTabItem(pStr0, pOpen, (ImGuiTabItemFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTabItem(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTabItem(pStr0, (bool*)(default), (ImGuiTabItemFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTabItem(string label, ImGuiTabItemFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.BeginTabItem(pStr0, (bool*)(default), flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTabItem(byte* label, ref bool pOpen, ImGuiTabItemFlags flags) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginTabItem(label, (bool*)ppOpen, flags); - return ret != 0; - } - } - public static bool BeginTabItem(byte* label, ref bool pOpen) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginTabItem(label, (bool*)ppOpen, (ImGuiTabItemFlags)(0)); - return ret != 0; - } - } - public static bool BeginTabItem(ref byte label, ref bool pOpen, ImGuiTabItemFlags flags) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginTabItem((byte*)plabel, (bool*)ppOpen, flags); - return ret != 0; - } - } - } - public static bool BeginTabItem(ref byte label, ref bool pOpen) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginTabItem((byte*)plabel, (bool*)ppOpen, (ImGuiTabItemFlags)(0)); - return ret != 0; - } - } - } - public static bool BeginTabItem(ReadOnlySpan label, ref bool pOpen, ImGuiTabItemFlags flags) - { - fixed (byte* plabel = label) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginTabItem((byte*)plabel, (bool*)ppOpen, flags); - return ret != 0; - } - } - } - public static bool BeginTabItem(ReadOnlySpan label, ref bool pOpen) - { - fixed (byte* plabel = label) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginTabItem((byte*)plabel, (bool*)ppOpen, (ImGuiTabItemFlags)(0)); - return ret != 0; - } - } - } - public static bool BeginTabItem(string label, ref bool pOpen, ImGuiTabItemFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginTabItem(pStr0, (bool*)ppOpen, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginTabItem(string label, ref bool pOpen) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiNative.BeginTabItem(pStr0, (bool*)ppOpen, (ImGuiTabItemFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } public static void EndTabItem() { ImGuiNative.EndTabItem(); } - public static bool TabItemButton(byte* label, ImGuiTabItemFlags flags) - { - byte ret = ImGuiNative.TabItemButton(label, flags); - return ret != 0; - } - public static bool TabItemButton(byte* label) - { - byte ret = ImGuiNative.TabItemButton(label, (ImGuiTabItemFlags)(0)); - return ret != 0; - } - public static bool TabItemButton(ref byte label, ImGuiTabItemFlags flags) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.TabItemButton((byte*)plabel, flags); - return ret != 0; - } - } - public static bool TabItemButton(ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.TabItemButton((byte*)plabel, (ImGuiTabItemFlags)(0)); - return ret != 0; - } - } - public static bool TabItemButton(ReadOnlySpan label, ImGuiTabItemFlags flags) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.TabItemButton((byte*)plabel, flags); - return ret != 0; - } - } - public static bool TabItemButton(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.TabItemButton((byte*)plabel, (ImGuiTabItemFlags)(0)); - return ret != 0; - } - } - public static bool TabItemButton(string label, ImGuiTabItemFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.TabItemButton(pStr0, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TabItemButton(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.TabItemButton(pStr0, (ImGuiTabItemFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static void SetTabItemClosed(byte* tabOrDockedWindowLabel) - { - ImGuiNative.SetTabItemClosed(tabOrDockedWindowLabel); - } - public static void SetTabItemClosed(ref byte tabOrDockedWindowLabel) - { - fixed (byte* ptabOrDockedWindowLabel = &tabOrDockedWindowLabel) - { - ImGuiNative.SetTabItemClosed((byte*)ptabOrDockedWindowLabel); - } - } - public static void SetTabItemClosed(ReadOnlySpan tabOrDockedWindowLabel) - { - fixed (byte* ptabOrDockedWindowLabel = tabOrDockedWindowLabel) - { - ImGuiNative.SetTabItemClosed((byte*)ptabOrDockedWindowLabel); - } - } - public static void SetTabItemClosed(string tabOrDockedWindowLabel) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (tabOrDockedWindowLabel != null) - { - pStrSize0 = Utils.GetByteCountUTF8(tabOrDockedWindowLabel); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(tabOrDockedWindowLabel, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.SetTabItemClosed(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static uint DockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags, ImGuiWindowClassPtr windowClass) { uint ret = ImGuiNative.DockSpace(id, size, flags, windowClass); @@ -14335,100 +2141,6 @@ public unsafe partial class ImGui { ImGuiNative.LogToTTY((int)(-1)); } - public static void LogToFile(int autoOpenDepth, byte* filename) - { - ImGuiNative.LogToFile(autoOpenDepth, filename); - } - public static void LogToFile(int autoOpenDepth) - { - ImGuiNative.LogToFile(autoOpenDepth, (byte*)(default)); - } - public static void LogToFile() - { - ImGuiNative.LogToFile((int)(-1), (byte*)(default)); - } - public static void LogToFile(byte* filename) - { - ImGuiNative.LogToFile((int)(-1), filename); - } - public static void LogToFile(int autoOpenDepth, ref byte filename) - { - fixed (byte* pfilename = &filename) - { - ImGuiNative.LogToFile(autoOpenDepth, (byte*)pfilename); - } - } - public static void LogToFile(ref byte filename) - { - fixed (byte* pfilename = &filename) - { - ImGuiNative.LogToFile((int)(-1), (byte*)pfilename); - } - } - public static void LogToFile(int autoOpenDepth, ReadOnlySpan filename) - { - fixed (byte* pfilename = filename) - { - ImGuiNative.LogToFile(autoOpenDepth, (byte*)pfilename); - } - } - public static void LogToFile(ReadOnlySpan filename) - { - fixed (byte* pfilename = filename) - { - ImGuiNative.LogToFile((int)(-1), (byte*)pfilename); - } - } - public static void LogToFile(int autoOpenDepth, string filename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.LogToFile(autoOpenDepth, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void LogToFile(string filename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.LogToFile((int)(-1), pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static void LogToClipboard(int autoOpenDepth) { ImGuiNative.LogToClipboard(autoOpenDepth); @@ -14455,100 +2167,6 @@ public unsafe partial class ImGui byte ret = ImGuiNative.BeginDragDropSource((ImGuiDragDropFlags)(0)); return ret != 0; } - public static bool SetDragDropPayload(byte* type, void* data, nuint sz, ImGuiCond cond) - { - byte ret = ImGuiNative.SetDragDropPayload(type, data, sz, cond); - return ret != 0; - } - public static bool SetDragDropPayload(byte* type, void* data, nuint sz) - { - byte ret = ImGuiNative.SetDragDropPayload(type, data, sz, (ImGuiCond)(0)); - return ret != 0; - } - public static bool SetDragDropPayload(ref byte type, void* data, nuint sz, ImGuiCond cond) - { - fixed (byte* ptype = &type) - { - byte ret = ImGuiNative.SetDragDropPayload((byte*)ptype, data, sz, cond); - return ret != 0; - } - } - public static bool SetDragDropPayload(ref byte type, void* data, nuint sz) - { - fixed (byte* ptype = &type) - { - byte ret = ImGuiNative.SetDragDropPayload((byte*)ptype, data, sz, (ImGuiCond)(0)); - return ret != 0; - } - } - public static bool SetDragDropPayload(ReadOnlySpan type, void* data, nuint sz, ImGuiCond cond) - { - fixed (byte* ptype = type) - { - byte ret = ImGuiNative.SetDragDropPayload((byte*)ptype, data, sz, cond); - return ret != 0; - } - } - public static bool SetDragDropPayload(ReadOnlySpan type, void* data, nuint sz) - { - fixed (byte* ptype = type) - { - byte ret = ImGuiNative.SetDragDropPayload((byte*)ptype, data, sz, (ImGuiCond)(0)); - return ret != 0; - } - } - public static bool SetDragDropPayload(string type, void* data, nuint sz, ImGuiCond cond) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (type != null) - { - pStrSize0 = Utils.GetByteCountUTF8(type); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(type, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.SetDragDropPayload(pStr0, data, sz, cond); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool SetDragDropPayload(string type, void* data, nuint sz) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (type != null) - { - pStrSize0 = Utils.GetByteCountUTF8(type); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(type, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.SetDragDropPayload(pStr0, data, sz, (ImGuiCond)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static void EndDragDropSource() { ImGuiNative.EndDragDropSource(); @@ -14558,100 +2176,6 @@ public unsafe partial class ImGui byte ret = ImGuiNative.BeginDragDropTarget(); return ret != 0; } - public static ImGuiPayloadPtr AcceptDragDropPayload(byte* type, ImGuiDragDropFlags flags) - { - ImGuiPayloadPtr ret = ImGuiNative.AcceptDragDropPayload(type, flags); - return ret; - } - public static ImGuiPayloadPtr AcceptDragDropPayload(byte* type) - { - ImGuiPayloadPtr ret = ImGuiNative.AcceptDragDropPayload(type, (ImGuiDragDropFlags)(0)); - return ret; - } - public static ImGuiPayloadPtr AcceptDragDropPayload(ref byte type, ImGuiDragDropFlags flags) - { - fixed (byte* ptype = &type) - { - ImGuiPayloadPtr ret = ImGuiNative.AcceptDragDropPayload((byte*)ptype, flags); - return ret; - } - } - public static ImGuiPayloadPtr AcceptDragDropPayload(ref byte type) - { - fixed (byte* ptype = &type) - { - ImGuiPayloadPtr ret = ImGuiNative.AcceptDragDropPayload((byte*)ptype, (ImGuiDragDropFlags)(0)); - return ret; - } - } - public static ImGuiPayloadPtr AcceptDragDropPayload(ReadOnlySpan type, ImGuiDragDropFlags flags) - { - fixed (byte* ptype = type) - { - ImGuiPayloadPtr ret = ImGuiNative.AcceptDragDropPayload((byte*)ptype, flags); - return ret; - } - } - public static ImGuiPayloadPtr AcceptDragDropPayload(ReadOnlySpan type) - { - fixed (byte* ptype = type) - { - ImGuiPayloadPtr ret = ImGuiNative.AcceptDragDropPayload((byte*)ptype, (ImGuiDragDropFlags)(0)); - return ret; - } - } - public static ImGuiPayloadPtr AcceptDragDropPayload(string type, ImGuiDragDropFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (type != null) - { - pStrSize0 = Utils.GetByteCountUTF8(type); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(type, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPayloadPtr ret = ImGuiNative.AcceptDragDropPayload(pStr0, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static ImGuiPayloadPtr AcceptDragDropPayload(string type) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (type != null) - { - pStrSize0 = Utils.GetByteCountUTF8(type); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(type, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPayloadPtr ret = ImGuiNative.AcceptDragDropPayload(pStr0, (ImGuiDragDropFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } public static void EndDragDropTarget() { ImGuiNative.EndDragDropTarget(); @@ -15365,221 +2889,6 @@ public unsafe partial class ImGui string ret = Utils.DecodeStringUTF8(ImGuiNative.GetClipboardText()); return ret; } - public static void SetClipboardText(byte* text) - { - ImGuiNative.SetClipboardText(text); - } - public static void SetClipboardText(ref byte text) - { - fixed (byte* ptext = &text) - { - ImGuiNative.SetClipboardText((byte*)ptext); - } - } - public static void SetClipboardText(ReadOnlySpan text) - { - fixed (byte* ptext = text) - { - ImGuiNative.SetClipboardText((byte*)ptext); - } - } - public static void SetClipboardText(string text) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (text != null) - { - pStrSize0 = Utils.GetByteCountUTF8(text); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.SetClipboardText(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void LoadIniSettingsFromDisk(byte* iniFilename) - { - ImGuiNative.LoadIniSettingsFromDisk(iniFilename); - } - public static void LoadIniSettingsFromDisk(ref byte iniFilename) - { - fixed (byte* piniFilename = &iniFilename) - { - ImGuiNative.LoadIniSettingsFromDisk((byte*)piniFilename); - } - } - public static void LoadIniSettingsFromDisk(ReadOnlySpan iniFilename) - { - fixed (byte* piniFilename = iniFilename) - { - ImGuiNative.LoadIniSettingsFromDisk((byte*)piniFilename); - } - } - public static void LoadIniSettingsFromDisk(string iniFilename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (iniFilename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(iniFilename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(iniFilename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.LoadIniSettingsFromDisk(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void LoadIniSettingsFromMemory(byte* iniData, nuint iniSize) - { - ImGuiNative.LoadIniSettingsFromMemory(iniData, iniSize); - } - public static void LoadIniSettingsFromMemory(byte* iniData) - { - ImGuiNative.LoadIniSettingsFromMemory(iniData, (nuint)(0)); - } - public static void LoadIniSettingsFromMemory(ref byte iniData, nuint iniSize) - { - fixed (byte* piniData = &iniData) - { - ImGuiNative.LoadIniSettingsFromMemory((byte*)piniData, iniSize); - } - } - public static void LoadIniSettingsFromMemory(ref byte iniData) - { - fixed (byte* piniData = &iniData) - { - ImGuiNative.LoadIniSettingsFromMemory((byte*)piniData, (nuint)(0)); - } - } - public static void LoadIniSettingsFromMemory(ReadOnlySpan iniData, nuint iniSize) - { - fixed (byte* piniData = iniData) - { - ImGuiNative.LoadIniSettingsFromMemory((byte*)piniData, iniSize); - } - } - public static void LoadIniSettingsFromMemory(ReadOnlySpan iniData) - { - fixed (byte* piniData = iniData) - { - ImGuiNative.LoadIniSettingsFromMemory((byte*)piniData, (nuint)(0)); - } - } - public static void LoadIniSettingsFromMemory(string iniData, nuint iniSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (iniData != null) - { - pStrSize0 = Utils.GetByteCountUTF8(iniData); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(iniData, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.LoadIniSettingsFromMemory(pStr0, iniSize); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void LoadIniSettingsFromMemory(string iniData) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (iniData != null) - { - pStrSize0 = Utils.GetByteCountUTF8(iniData); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(iniData, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.LoadIniSettingsFromMemory(pStr0, (nuint)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void SaveIniSettingsToDisk(byte* iniFilename) - { - ImGuiNative.SaveIniSettingsToDisk(iniFilename); - } - public static void SaveIniSettingsToDisk(ref byte iniFilename) - { - fixed (byte* piniFilename = &iniFilename) - { - ImGuiNative.SaveIniSettingsToDisk((byte*)piniFilename); - } - } - public static void SaveIniSettingsToDisk(ReadOnlySpan iniFilename) - { - fixed (byte* piniFilename = iniFilename) - { - ImGuiNative.SaveIniSettingsToDisk((byte*)piniFilename); - } - } - public static void SaveIniSettingsToDisk(string iniFilename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (iniFilename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(iniFilename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(iniFilename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.SaveIniSettingsToDisk(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static byte* SaveIniSettingsToMemory(nuint* outIniSize) { byte* ret = ImGuiNative.SaveIniSettingsToMemory(outIniSize); @@ -15600,96 +2909,6 @@ public unsafe partial class ImGui string ret = Utils.DecodeStringUTF8(ImGuiNative.SaveIniSettingsToMemory(outIniSize)); return ret; } - public static void DebugTextEncoding(byte* text) - { - ImGuiNative.DebugTextEncoding(text); - } - public static void DebugTextEncoding(ref byte text) - { - fixed (byte* ptext = &text) - { - ImGuiNative.DebugTextEncoding((byte*)ptext); - } - } - public static void DebugTextEncoding(ReadOnlySpan text) - { - fixed (byte* ptext = text) - { - ImGuiNative.DebugTextEncoding((byte*)ptext); - } - } - public static void DebugTextEncoding(string text) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (text != null) - { - pStrSize0 = Utils.GetByteCountUTF8(text); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.DebugTextEncoding(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static bool DebugCheckVersionAndDataLayout(byte* versionStr, nuint szIo, nuint szStyle, nuint szvec2, nuint szvec4, nuint szDrawvert, nuint szDrawidx) - { - byte ret = ImGuiNative.DebugCheckVersionAndDataLayout(versionStr, szIo, szStyle, szvec2, szvec4, szDrawvert, szDrawidx); - return ret != 0; - } - public static bool DebugCheckVersionAndDataLayout(ref byte versionStr, nuint szIo, nuint szStyle, nuint szvec2, nuint szvec4, nuint szDrawvert, nuint szDrawidx) - { - fixed (byte* pversionStr = &versionStr) - { - byte ret = ImGuiNative.DebugCheckVersionAndDataLayout((byte*)pversionStr, szIo, szStyle, szvec2, szvec4, szDrawvert, szDrawidx); - return ret != 0; - } - } - public static bool DebugCheckVersionAndDataLayout(ReadOnlySpan versionStr, nuint szIo, nuint szStyle, nuint szvec2, nuint szvec4, nuint szDrawvert, nuint szDrawidx) - { - fixed (byte* pversionStr = versionStr) - { - byte ret = ImGuiNative.DebugCheckVersionAndDataLayout((byte*)pversionStr, szIo, szStyle, szvec2, szvec4, szDrawvert, szDrawidx); - return ret != 0; - } - } - public static bool DebugCheckVersionAndDataLayout(string versionStr, nuint szIo, nuint szStyle, nuint szvec2, nuint szvec4, nuint szDrawvert, nuint szDrawidx) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (versionStr != null) - { - pStrSize0 = Utils.GetByteCountUTF8(versionStr); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(versionStr, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.DebugCheckVersionAndDataLayout(pStr0, szIo, szStyle, szvec2, szvec4, szDrawvert, szDrawidx); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static void SetAllocatorFunctions(ImGuiMemAllocFunc allocFunc, ImGuiMemFreeFunc freeFunc, void* userData) { ImGuiNative.SetAllocatorFunctions(allocFunc, freeFunc, userData); @@ -15839,126 +3058,6 @@ public unsafe partial class ImGui ImGuiNative.AddFocusEvent((ImGuiIO*)pself, focused ? (byte)1 : (byte)0); } } - public static void AddInputCharacter(ImGuiIOPtr self, uint c) - { - ImGuiNative.AddInputCharacter(self, c); - } - public static void AddInputCharacter(ref ImGuiIO self, uint c) - { - fixed (ImGuiIO* pself = &self) - { - ImGuiNative.AddInputCharacter((ImGuiIO*)pself, c); - } - } - public static void AddInputCharacterUTF16(ImGuiIOPtr self, ushort c) - { - ImGuiNative.AddInputCharacterUTF16(self, c); - } - public static void AddInputCharacterUTF16(ref ImGuiIO self, ushort c) - { - fixed (ImGuiIO* pself = &self) - { - ImGuiNative.AddInputCharacterUTF16((ImGuiIO*)pself, c); - } - } - public static void AddInputCharactersUTF8(ImGuiIOPtr self, byte* str) - { - ImGuiNative.AddInputCharactersUTF8(self, str); - } - public static void AddInputCharactersUTF8(ref ImGuiIO self, byte* str) - { - fixed (ImGuiIO* pself = &self) - { - ImGuiNative.AddInputCharactersUTF8((ImGuiIO*)pself, str); - } - } - public static void AddInputCharactersUTF8(ImGuiIOPtr self, ref byte str) - { - fixed (byte* pstr = &str) - { - ImGuiNative.AddInputCharactersUTF8(self, (byte*)pstr); - } - } - public static void AddInputCharactersUTF8(ImGuiIOPtr self, ReadOnlySpan str) - { - fixed (byte* pstr = str) - { - ImGuiNative.AddInputCharactersUTF8(self, (byte*)pstr); - } - } - public static void AddInputCharactersUTF8(ImGuiIOPtr self, string str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.AddInputCharactersUTF8(self, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void AddInputCharactersUTF8(ref ImGuiIO self, ref byte str) - { - fixed (ImGuiIO* pself = &self) - { - fixed (byte* pstr = &str) - { - ImGuiNative.AddInputCharactersUTF8((ImGuiIO*)pself, (byte*)pstr); - } - } - } - public static void AddInputCharactersUTF8(ref ImGuiIO self, ReadOnlySpan str) - { - fixed (ImGuiIO* pself = &self) - { - fixed (byte* pstr = str) - { - ImGuiNative.AddInputCharactersUTF8((ImGuiIO*)pself, (byte*)pstr); - } - } - } - public static void AddInputCharactersUTF8(ref ImGuiIO self, string str) - { - fixed (ImGuiIO* pself = &self) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.AddInputCharactersUTF8((ImGuiIO*)pself, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } public static void SetKeyEventNativeData(ImGuiIOPtr self, ImGuiKey key, int nativeKeycode, int nativeScancode, int nativeLegacyIndex) { ImGuiNative.SetKeyEventNativeData(self, key, nativeKeycode, nativeScancode, nativeLegacyIndex); @@ -16157,112 +3256,6 @@ public unsafe partial class ImGui ImGuiNative.Clear((ImFontAtlas*)pself); } } - public static bool IsDataType(ImGuiPayloadPtr self, byte* type) - { - byte ret = ImGuiNative.IsDataType(self, type); - return ret != 0; - } - public static bool IsDataType(ref ImGuiPayload self, byte* type) - { - fixed (ImGuiPayload* pself = &self) - { - byte ret = ImGuiNative.IsDataType((ImGuiPayload*)pself, type); - return ret != 0; - } - } - public static bool IsDataType(ImGuiPayloadPtr self, ref byte type) - { - fixed (byte* ptype = &type) - { - byte ret = ImGuiNative.IsDataType(self, (byte*)ptype); - return ret != 0; - } - } - public static bool IsDataType(ImGuiPayloadPtr self, ReadOnlySpan type) - { - fixed (byte* ptype = type) - { - byte ret = ImGuiNative.IsDataType(self, (byte*)ptype); - return ret != 0; - } - } - public static bool IsDataType(ImGuiPayloadPtr self, string type) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (type != null) - { - pStrSize0 = Utils.GetByteCountUTF8(type); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(type, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.IsDataType(self, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool IsDataType(ref ImGuiPayload self, ref byte type) - { - fixed (ImGuiPayload* pself = &self) - { - fixed (byte* ptype = &type) - { - byte ret = ImGuiNative.IsDataType((ImGuiPayload*)pself, (byte*)ptype); - return ret != 0; - } - } - } - public static bool IsDataType(ref ImGuiPayload self, ReadOnlySpan type) - { - fixed (ImGuiPayload* pself = &self) - { - fixed (byte* ptype = type) - { - byte ret = ImGuiNative.IsDataType((ImGuiPayload*)pself, (byte*)ptype); - return ret != 0; - } - } - } - public static bool IsDataType(ref ImGuiPayload self, string type) - { - fixed (ImGuiPayload* pself = &self) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (type != null) - { - pStrSize0 = Utils.GetByteCountUTF8(type); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(type, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.IsDataType((ImGuiPayload*)pself, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } public static bool IsPreview(ImGuiPayloadPtr self) { byte ret = ImGuiNative.IsPreview(self); @@ -16304,296 +3297,6 @@ public unsafe partial class ImGui ImGuiOnceUponAFramePtr ret = ImGuiNative.ImGuiOnceUponAFrame(); return ret; } - public static ImGuiTextFilterPtr ImGuiTextFilter(byte* defaultFilter) - { - ImGuiTextFilterPtr ret = ImGuiNative.ImGuiTextFilter(defaultFilter); - return ret; - } - public static ImGuiTextFilterPtr ImGuiTextFilter() - { - ImGuiTextFilterPtr ret = ImGuiTextFilter((string)""); - return ret; - } - public static ImGuiTextFilterPtr ImGuiTextFilter(ref byte defaultFilter) - { - fixed (byte* pdefaultFilter = &defaultFilter) - { - ImGuiTextFilterPtr ret = ImGuiNative.ImGuiTextFilter((byte*)pdefaultFilter); - return ret; - } - } - public static ImGuiTextFilterPtr ImGuiTextFilter(ReadOnlySpan defaultFilter) - { - fixed (byte* pdefaultFilter = defaultFilter) - { - ImGuiTextFilterPtr ret = ImGuiNative.ImGuiTextFilter((byte*)pdefaultFilter); - return ret; - } - } - public static ImGuiTextFilterPtr ImGuiTextFilter(string defaultFilter) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (defaultFilter != null) - { - pStrSize0 = Utils.GetByteCountUTF8(defaultFilter); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(defaultFilter, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiTextFilterPtr ret = ImGuiNative.ImGuiTextFilter(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static bool Draw(ImGuiTextFilterPtr self, byte* label, float width) - { - byte ret = ImGuiNative.Draw(self, label, width); - return ret != 0; - } - public static bool Draw(ImGuiTextFilterPtr self, byte* label) - { - byte ret = ImGuiNative.Draw(self, label, (float)(0.0f)); - return ret != 0; - } - public static bool Draw(ImGuiTextFilterPtr self) - { - bool ret = Draw(self, (string)"Filter(inc,-exc)", (float)(0.0f)); - return ret; - } - public static bool Draw(ImGuiTextFilterPtr self, float width) - { - bool ret = Draw(self, (string)"Filter(inc,-exc)", width); - return ret; - } - public static bool Draw(ref ImGuiTextFilter self, byte* label, float width) - { - fixed (ImGuiTextFilter* pself = &self) - { - byte ret = ImGuiNative.Draw((ImGuiTextFilter*)pself, label, width); - return ret != 0; - } - } - public static bool Draw(ref ImGuiTextFilter self, byte* label) - { - fixed (ImGuiTextFilter* pself = &self) - { - byte ret = ImGuiNative.Draw((ImGuiTextFilter*)pself, label, (float)(0.0f)); - return ret != 0; - } - } - public static bool Draw(ref ImGuiTextFilter self) - { - fixed (ImGuiTextFilter* pself = &self) - { - bool ret = Draw((ImGuiTextFilter*)pself, (string)"Filter(inc,-exc)", (float)(0.0f)); - return ret; - } - } - public static bool Draw(ref ImGuiTextFilter self, float width) - { - fixed (ImGuiTextFilter* pself = &self) - { - bool ret = Draw((ImGuiTextFilter*)pself, (string)"Filter(inc,-exc)", width); - return ret; - } - } - public static bool Draw(ImGuiTextFilterPtr self, ref byte label, float width) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Draw(self, (byte*)plabel, width); - return ret != 0; - } - } - public static bool Draw(ImGuiTextFilterPtr self, ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Draw(self, (byte*)plabel, (float)(0.0f)); - return ret != 0; - } - } - public static bool Draw(ImGuiTextFilterPtr self, ReadOnlySpan label, float width) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Draw(self, (byte*)plabel, width); - return ret != 0; - } - } - public static bool Draw(ImGuiTextFilterPtr self, ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Draw(self, (byte*)plabel, (float)(0.0f)); - return ret != 0; - } - } - public static bool Draw(ImGuiTextFilterPtr self, string label, float width) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Draw(self, pStr0, width); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Draw(ImGuiTextFilterPtr self, string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Draw(self, pStr0, (float)(0.0f)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool Draw(ref ImGuiTextFilter self, ref byte label, float width) - { - fixed (ImGuiTextFilter* pself = &self) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Draw((ImGuiTextFilter*)pself, (byte*)plabel, width); - return ret != 0; - } - } - } - public static bool Draw(ref ImGuiTextFilter self, ref byte label) - { - fixed (ImGuiTextFilter* pself = &self) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Draw((ImGuiTextFilter*)pself, (byte*)plabel, (float)(0.0f)); - return ret != 0; - } - } - } - public static bool Draw(ref ImGuiTextFilter self, ReadOnlySpan label, float width) - { - fixed (ImGuiTextFilter* pself = &self) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Draw((ImGuiTextFilter*)pself, (byte*)plabel, width); - return ret != 0; - } - } - } - public static bool Draw(ref ImGuiTextFilter self, ReadOnlySpan label) - { - fixed (ImGuiTextFilter* pself = &self) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Draw((ImGuiTextFilter*)pself, (byte*)plabel, (float)(0.0f)); - return ret != 0; - } - } - } - public static bool Draw(ref ImGuiTextFilter self, string label, float width) - { - fixed (ImGuiTextFilter* pself = &self) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Draw((ImGuiTextFilter*)pself, pStr0, width); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool Draw(ref ImGuiTextFilter self, string label) - { - fixed (ImGuiTextFilter* pself = &self) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Draw((ImGuiTextFilter*)pself, pStr0, (float)(0.0f)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } public static void Build(ImGuiTextFilterPtr self) { ImGuiNative.Build(self); @@ -16631,307 +3334,6 @@ public unsafe partial class ImGui return ret != 0; } } - public static ImGuiTextRangePtr ImGuiTextRange() - { - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange(); - return ret; - } - public static ImGuiTextRangePtr ImGuiTextRange(byte* b, byte* e) - { - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange(b, e); - return ret; - } - public static ImGuiTextRangePtr ImGuiTextRange(ref byte b, byte* e) - { - fixed (byte* pb = &b) - { - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange((byte*)pb, e); - return ret; - } - } - public static ImGuiTextRangePtr ImGuiTextRange(ReadOnlySpan b, byte* e) - { - fixed (byte* pb = b) - { - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange((byte*)pb, e); - return ret; - } - } - public static ImGuiTextRangePtr ImGuiTextRange(string b, byte* e) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (b != null) - { - pStrSize0 = Utils.GetByteCountUTF8(b); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(b, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange(pStr0, e); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static ImGuiTextRangePtr ImGuiTextRange(byte* b, ref byte e) - { - fixed (byte* pe = &e) - { - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange(b, (byte*)pe); - return ret; - } - } - public static ImGuiTextRangePtr ImGuiTextRange(byte* b, ReadOnlySpan e) - { - fixed (byte* pe = e) - { - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange(b, (byte*)pe); - return ret; - } - } - public static ImGuiTextRangePtr ImGuiTextRange(byte* b, string e) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (e != null) - { - pStrSize0 = Utils.GetByteCountUTF8(e); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(e, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange(b, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static ImGuiTextRangePtr ImGuiTextRange(ref byte b, ref byte e) - { - fixed (byte* pb = &b) - { - fixed (byte* pe = &e) - { - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange((byte*)pb, (byte*)pe); - return ret; - } - } - } - public static ImGuiTextRangePtr ImGuiTextRange(ReadOnlySpan b, ReadOnlySpan e) - { - fixed (byte* pb = b) - { - fixed (byte* pe = e) - { - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange((byte*)pb, (byte*)pe); - return ret; - } - } - } - public static ImGuiTextRangePtr ImGuiTextRange(string b, string e) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (b != null) - { - pStrSize0 = Utils.GetByteCountUTF8(b); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(b, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (e != null) - { - pStrSize1 = Utils.GetByteCountUTF8(e); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(e, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange(pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static ImGuiTextRangePtr ImGuiTextRange(ref byte b, ReadOnlySpan e) - { - fixed (byte* pb = &b) - { - fixed (byte* pe = e) - { - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange((byte*)pb, (byte*)pe); - return ret; - } - } - } - public static ImGuiTextRangePtr ImGuiTextRange(ref byte b, string e) - { - fixed (byte* pb = &b) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (e != null) - { - pStrSize0 = Utils.GetByteCountUTF8(e); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(e, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange((byte*)pb, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static ImGuiTextRangePtr ImGuiTextRange(ReadOnlySpan b, ref byte e) - { - fixed (byte* pb = b) - { - fixed (byte* pe = &e) - { - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange((byte*)pb, (byte*)pe); - return ret; - } - } - } - public static ImGuiTextRangePtr ImGuiTextRange(ReadOnlySpan b, string e) - { - fixed (byte* pb = b) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (e != null) - { - pStrSize0 = Utils.GetByteCountUTF8(e); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(e, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange((byte*)pb, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static ImGuiTextRangePtr ImGuiTextRange(string b, ref byte e) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (b != null) - { - pStrSize0 = Utils.GetByteCountUTF8(b); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(b, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pe = &e) - { - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange(pStr0, (byte*)pe); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static ImGuiTextRangePtr ImGuiTextRange(string b, ReadOnlySpan e) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (b != null) - { - pStrSize0 = Utils.GetByteCountUTF8(b); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(b, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pe = e) - { - ImGuiTextRangePtr ret = ImGuiNative.ImGuiTextRange(pStr0, (byte*)pe); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } public static bool empty(ImGuiTextRangePtr self) { byte ret = ImGuiNative.empty(self); @@ -22479,88 +8881,182 @@ public unsafe partial class ImGui } } } -// DISCARDED: AddFontFromFileTTF -// DISCARDED: AddFontFromMemoryCompressedBase85TTF -// DISCARDED: AddFontFromMemoryCompressedTTF -// DISCARDED: AddFontFromMemoryTTF -// DISCARDED: AddText -// DISCARDED: append -// DISCARDED: appendf -// DISCARDED: appendfv -// DISCARDED: BulletText -// DISCARDED: BulletTextV -// DISCARDED: CalcTextSize -// DISCARDED: CalcTextSizeA -// DISCARDED: CalcWordWrapPositionA +// DISCARDED: internal static ImGuiPayload* AcceptDragDropPayloadNative(byte* type, ImGuiDragDropFlags flags) +// DISCARDED: internal static ImFont* AddFontFromFileTTFNative(ImFontAtlas* self, byte* filename, float sizePixels, ImFontConfig* fontCfg, ushort* glyphRanges) +// DISCARDED: internal static ImFont* AddFontFromMemoryCompressedBase85TTFNative(ImFontAtlas* self, byte* compressedFontDatabase85, float sizePixels, ImFontConfig* fontCfg, ushort* glyphRanges) +// DISCARDED: internal static ImFont* AddFontFromMemoryCompressedTTFNative(ImFontAtlas* self, void* compressedFontData, int compressedFontSize, float sizePixels, ImFontConfig* fontCfg, ushort* glyphRanges) +// DISCARDED: internal static ImFont* AddFontFromMemoryTTFNative(ImFontAtlas* self, void* fontData, int fontSize, float sizePixels, ImFontConfig* fontCfg, ushort* glyphRanges) +// DISCARDED: internal static void AddInputCharacterNative(ImGuiIO* self, uint c) +// DISCARDED: internal static void AddInputCharactersUTF8Native(ImGuiIO* self, byte* str) +// DISCARDED: internal static void AddInputCharacterUTF16Native(ImGuiIO* self, ushort c) +// DISCARDED: internal static void AddTextNative(ImDrawList* self, Vector2 pos, uint col, byte* textBegin, byte* textEnd) +// DISCARDED: internal static void AddTextNative(ImDrawList* self, ImFont* font, float fontSize, Vector2 pos, uint col, byte* textBegin, byte* textEnd, float wrapWidth, Vector4* cpuFineClipRect) +// DISCARDED: internal static void AddTextNative(ImFontGlyphRangesBuilder* self, byte* text, byte* textEnd) +// DISCARDED: internal static void appendNative(ImGuiTextBuffer* self, byte* str, byte* strEnd) +// DISCARDED: internal static void appendfNative(ImGuiTextBuffer* buffer, byte* fmt) +// DISCARDED: internal static void appendfvNative(ImGuiTextBuffer* self, byte* fmt, nuint args) +// DISCARDED: internal static byte ArrowButtonNative(byte* strId, ImGuiDir dir) +// DISCARDED: internal static byte BeginNative(byte* name, bool* pOpen, ImGuiWindowFlags flags) +// DISCARDED: internal static void BeginNative(ImGuiListClipper* self, int itemsCount, float itemsHeight) +// DISCARDED: internal static byte BeginChildNative(byte* strId, Vector2 size, byte border, ImGuiWindowFlags flags) +// DISCARDED: internal static byte BeginChildNative(uint id, Vector2 size, byte border, ImGuiWindowFlags flags) +// DISCARDED: internal static byte BeginComboNative(byte* label, byte* previewValue, ImGuiComboFlags flags) +// DISCARDED: internal static byte BeginListBoxNative(byte* label, Vector2 size) +// DISCARDED: internal static byte BeginMenuNative(byte* label, byte enabled) +// DISCARDED: internal static byte BeginPopupNative(byte* strId, ImGuiWindowFlags flags) +// DISCARDED: internal static byte BeginPopupContextItemNative(byte* strId, ImGuiPopupFlags popupFlags) +// DISCARDED: internal static byte BeginPopupContextVoidNative(byte* strId, ImGuiPopupFlags popupFlags) +// DISCARDED: internal static byte BeginPopupContextWindowNative(byte* strId, ImGuiPopupFlags popupFlags) +// DISCARDED: internal static byte BeginPopupModalNative(byte* name, bool* pOpen, ImGuiWindowFlags flags) +// DISCARDED: internal static byte BeginTabBarNative(byte* strId, ImGuiTabBarFlags flags) +// DISCARDED: internal static byte BeginTabItemNative(byte* label, bool* pOpen, ImGuiTabItemFlags flags) +// DISCARDED: internal static byte BeginTableNative(byte* strId, int column, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) +// DISCARDED: internal static void BulletTextNative(byte* fmt) +// DISCARDED: internal static void BulletTextVNative(byte* fmt, nuint args) +// DISCARDED: internal static byte ButtonNative(byte* label, Vector2 size) +// DISCARDED: internal static void CalcTextSizeNative(Vector2* pOut, byte* text, byte* textEnd, byte hideTextAfterDoubleHash, float wrapWidth) +// DISCARDED: internal static void CalcTextSizeANative(Vector2* pOut, ImFont* self, float size, float maxWidth, float wrapWidth, byte* textBegin, byte* textEnd, byte** remaining) +// DISCARDED: internal static byte* CalcWordWrapPositionANative(ImFont* self, float scale, byte* text, byte* textEnd, float wrapWidth) // DISCARDED: CalcWordWrapPositionAS -// DISCARDED: ColorEdit3 -// DISCARDED: ColorEdit4 -// DISCARDED: ColorPicker3 -// DISCARDED: ColorPicker4 -// DISCARDED: DragFloat -// DISCARDED: DragFloat2 -// DISCARDED: DragFloat3 -// DISCARDED: DragFloat4 -// DISCARDED: DragFloatRange2 -// DISCARDED: DragInt -// DISCARDED: DragInt2 -// DISCARDED: DragInt3 -// DISCARDED: DragInt4 -// DISCARDED: DragIntRange2 -// DISCARDED: DragScalar -// DISCARDED: DragScalarN -// DISCARDED: GetBoolRef -// DISCARDED: GetFloatRef -// DISCARDED: GetID -// DISCARDED: GetIntRef -// DISCARDED: InputDouble -// DISCARDED: InputFloat -// DISCARDED: InputFloat2 -// DISCARDED: InputFloat3 -// DISCARDED: InputFloat4 -// DISCARDED: InputInt -// DISCARDED: InputInt2 -// DISCARDED: InputInt3 -// DISCARDED: InputInt4 -// DISCARDED: InputScalar -// DISCARDED: InputScalarN -// DISCARDED: InsertChars -// DISCARDED: LabelText -// DISCARDED: LabelTextV -// DISCARDED: LogText -// DISCARDED: LogTextV -// DISCARDED: PassFilter -// DISCARDED: PlotHistogram -// DISCARDED: PlotLines -// DISCARDED: PushID -// DISCARDED: RenderText -// DISCARDED: SetTooltip -// DISCARDED: SetTooltipV -// DISCARDED: SliderAngle -// DISCARDED: SliderFloat -// DISCARDED: SliderFloat2 -// DISCARDED: SliderFloat3 -// DISCARDED: SliderFloat4 -// DISCARDED: SliderInt -// DISCARDED: SliderInt2 -// DISCARDED: SliderInt3 -// DISCARDED: SliderInt4 -// DISCARDED: SliderScalar -// DISCARDED: SliderScalarN -// DISCARDED: Text -// DISCARDED: TextColored -// DISCARDED: TextColoredV -// DISCARDED: TextDisabled -// DISCARDED: TextDisabledV -// DISCARDED: TextUnformatted -// DISCARDED: TextV -// DISCARDED: TextWrapped -// DISCARDED: TextWrappedV -// DISCARDED: TreeNode -// DISCARDED: TreeNodeEx -// DISCARDED: TreeNodeExV -// DISCARDED: TreeNodeV -// DISCARDED: VSliderFloat -// DISCARDED: VSliderInt -// DISCARDED: VSliderScalar +// DISCARDED: internal static byte CheckboxNative(byte* label, bool* v) +// DISCARDED: internal static byte CheckboxFlagsNative(byte* label, int* flags, int flagsValue) +// DISCARDED: internal static byte CheckboxFlagsNative(byte* label, uint* flags, uint flagsValue) +// DISCARDED: internal static byte CollapsingHeaderNative(byte* label, ImGuiTreeNodeFlags flags) +// DISCARDED: internal static byte CollapsingHeaderNative(byte* label, bool* pVisible, ImGuiTreeNodeFlags flags) +// DISCARDED: internal static byte ColorButtonNative(byte* descId, Vector4 col, ImGuiColorEditFlags flags, Vector2 size) +// DISCARDED: internal static byte ColorEdit3Native(byte* label, float* col, ImGuiColorEditFlags flags) +// DISCARDED: internal static byte ColorEdit4Native(byte* label, float* col, ImGuiColorEditFlags flags) +// DISCARDED: internal static byte ColorPicker3Native(byte* label, float* col, ImGuiColorEditFlags flags) +// DISCARDED: internal static byte ColorPicker4Native(byte* label, float* col, ImGuiColorEditFlags flags, float* refCol) +// DISCARDED: internal static void ColumnsNative(int count, byte* id, byte border) +// DISCARDED: internal static byte ComboNative(byte* label, int* currentItem, byte** items, int itemsCount, int popupMaxHeightInItems) +// DISCARDED: internal static byte ComboNative(byte* label, int* currentItem, byte* itemsSeparatedByZeros, int popupMaxHeightInItems) +// DISCARDED: internal static byte ComboNative(byte* label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int popupMaxHeightInItems) +// DISCARDED: internal static byte DebugCheckVersionAndDataLayoutNative(byte* versionStr, nuint szIo, nuint szStyle, nuint szvec2, nuint szvec4, nuint szDrawvert, nuint szDrawidx) +// DISCARDED: internal static void DebugTextEncodingNative(byte* text) +// DISCARDED: internal static byte DragFloatNative(byte* label, float* v, float vSpeed, float vMin, float vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte DragFloat2Native(byte* label, float* v, float vSpeed, float vMin, float vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte DragFloat3Native(byte* label, float* v, float vSpeed, float vMin, float vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte DragFloat4Native(byte* label, float* v, float vSpeed, float vMin, float vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte DragFloatRange2Native(byte* label, float* vCurrentMin, float* vCurrentMax, float vSpeed, float vMin, float vMax, byte* format, byte* formatMax, ImGuiSliderFlags flags) +// DISCARDED: internal static byte DragIntNative(byte* label, int* v, float vSpeed, int vMin, int vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte DragInt2Native(byte* label, int* v, float vSpeed, int vMin, int vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte DragInt3Native(byte* label, int* v, float vSpeed, int vMin, int vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte DragInt4Native(byte* label, int* v, float vSpeed, int vMin, int vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte DragIntRange2Native(byte* label, int* vCurrentMin, int* vCurrentMax, float vSpeed, int vMin, int vMax, byte* format, byte* formatMax, ImGuiSliderFlags flags) +// DISCARDED: internal static byte DragScalarNative(byte* label, ImGuiDataType dataType, void* pData, float vSpeed, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte DragScalarNNative(byte* label, ImGuiDataType dataType, void* pData, int components, float vSpeed, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte DrawNative(ImGuiTextFilter* self, byte* label, float width) +// DISCARDED: internal static bool* GetBoolRefNative(ImGuiStorage* self, uint key, byte defaultVal) +// DISCARDED: internal static float* GetFloatRefNative(ImGuiStorage* self, uint key, float defaultVal) +// DISCARDED: internal static uint GetIDNative(byte* strId) +// DISCARDED: internal static uint GetIDNative(byte* strIdBegin, byte* strIdEnd) +// DISCARDED: internal static uint GetIDNative(void* ptrId) +// DISCARDED: internal static int* GetIntRefNative(ImGuiStorage* self, uint key, int defaultVal) +// DISCARDED: internal static ImGuiTextFilter* ImGuiTextFilterNative(byte* defaultFilter) +// DISCARDED: internal static ImGuiTextRange* ImGuiTextRangeNative() +// DISCARDED: internal static ImGuiTextRange* ImGuiTextRangeNative(byte* b, byte* e) +// DISCARDED: internal static byte InputDoubleNative(byte* label, double* v, double step, double stepFast, byte* format, ImGuiInputTextFlags flags) +// DISCARDED: internal static byte InputFloatNative(byte* label, float* v, float step, float stepFast, byte* format, ImGuiInputTextFlags flags) +// DISCARDED: internal static byte InputFloat2Native(byte* label, float* v, byte* format, ImGuiInputTextFlags flags) +// DISCARDED: internal static byte InputFloat3Native(byte* label, float* v, byte* format, ImGuiInputTextFlags flags) +// DISCARDED: internal static byte InputFloat4Native(byte* label, float* v, byte* format, ImGuiInputTextFlags flags) +// DISCARDED: internal static byte InputIntNative(byte* label, int* v, int step, int stepFast, ImGuiInputTextFlags flags) +// DISCARDED: internal static byte InputInt2Native(byte* label, int* v, ImGuiInputTextFlags flags) +// DISCARDED: internal static byte InputInt3Native(byte* label, int* v, ImGuiInputTextFlags flags) +// DISCARDED: internal static byte InputInt4Native(byte* label, int* v, ImGuiInputTextFlags flags) +// DISCARDED: internal static byte InputScalarNative(byte* label, ImGuiDataType dataType, void* pData, void* pStep, void* pStepFast, byte* format, ImGuiInputTextFlags flags) +// DISCARDED: internal static byte InputScalarNNative(byte* label, ImGuiDataType dataType, void* pData, int components, void* pStep, void* pStepFast, byte* format, ImGuiInputTextFlags flags) +// DISCARDED: internal static void InsertCharsNative(ImGuiInputTextCallbackData* self, int pos, byte* text, byte* textEnd) +// DISCARDED: internal static byte InvisibleButtonNative(byte* strId, Vector2 size, ImGuiButtonFlags flags) +// DISCARDED: internal static byte IsDataTypeNative(ImGuiPayload* self, byte* type) +// DISCARDED: internal static byte IsPopupOpenNative(byte* strId, ImGuiPopupFlags flags) +// DISCARDED: internal static void LabelTextNative(byte* label, byte* fmt) +// DISCARDED: internal static void LabelTextVNative(byte* label, byte* fmt, nuint args) +// DISCARDED: internal static byte ListBoxNative(byte* label, int* currentItem, byte** items, int itemsCount, int heightInItems) +// DISCARDED: internal static byte ListBoxNative(byte* label, int* currentItem, delegate*, void*, int, int, bool> itemsGetter, void* data, int itemsCount, int heightInItems) +// DISCARDED: internal static void LoadIniSettingsFromDiskNative(byte* iniFilename) +// DISCARDED: internal static void LoadIniSettingsFromMemoryNative(byte* iniData, nuint iniSize) +// DISCARDED: internal static void LogTextNative(byte* fmt) +// DISCARDED: internal static void LogTextVNative(byte* fmt, nuint args) +// DISCARDED: internal static void LogToFileNative(int autoOpenDepth, byte* filename) +// DISCARDED: internal static byte MenuItemNative(byte* label, byte* shortcut, byte selected, byte enabled) +// DISCARDED: internal static byte MenuItemNative(byte* label, byte* shortcut, bool* pSelected, byte enabled) +// DISCARDED: internal static void OpenPopupNative(byte* strId, ImGuiPopupFlags popupFlags) +// DISCARDED: internal static void OpenPopupNative(uint id, ImGuiPopupFlags popupFlags) +// DISCARDED: internal static void OpenPopupOnItemClickNative(byte* strId, ImGuiPopupFlags popupFlags) +// DISCARDED: internal static byte PassFilterNative(ImGuiTextFilter* self, byte* text, byte* textEnd) +// DISCARDED: internal static void PlotHistogramNative(byte* label, float* values, int valuesCount, int valuesOffset, byte* overlayText, float scaleMin, float scaleMax, Vector2 graphSize, int stride) +// DISCARDED: internal static void PlotHistogramNative(byte* label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, byte* overlayText, float scaleMin, float scaleMax, Vector2 graphSize) +// DISCARDED: internal static void PlotLinesNative(byte* label, float* values, int valuesCount, int valuesOffset, byte* overlayText, float scaleMin, float scaleMax, Vector2 graphSize, int stride) +// DISCARDED: internal static void PlotLinesNative(byte* label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, byte* overlayText, float scaleMin, float scaleMax, Vector2 graphSize) +// DISCARDED: internal static void ProgressBarNative(float fraction, Vector2 sizeArg, byte* overlay) +// DISCARDED: internal static void PushIDNative(byte* strId) +// DISCARDED: internal static void PushIDNative(byte* strIdBegin, byte* strIdEnd) +// DISCARDED: internal static void PushIDNative(void* ptrId) +// DISCARDED: internal static void PushIDNative(int intId) +// DISCARDED: internal static byte RadioButtonNative(byte* label, byte active) +// DISCARDED: internal static byte RadioButtonNative(byte* label, int* v, int vButton) +// DISCARDED: internal static void RenderTextNative(ImFont* self, ImDrawList* drawList, float size, Vector2 pos, uint col, Vector4 clipRect, byte* textBegin, byte* textEnd, float wrapWidth, byte cpuFineClip) +// DISCARDED: internal static void SaveIniSettingsToDiskNative(byte* iniFilename) +// DISCARDED: internal static byte SelectableNative(byte* label, byte selected, ImGuiSelectableFlags flags, Vector2 size) +// DISCARDED: internal static byte SelectableNative(byte* label, bool* pSelected, ImGuiSelectableFlags flags, Vector2 size) +// DISCARDED: internal static void SetClipboardTextNative(byte* text) +// DISCARDED: internal static byte SetDragDropPayloadNative(byte* type, void* data, nuint sz, ImGuiCond cond) +// DISCARDED: internal static void SetTabItemClosedNative(byte* tabOrDockedWindowLabel) +// DISCARDED: internal static void SetTooltipNative(byte* fmt) +// DISCARDED: internal static void SetTooltipVNative(byte* fmt, nuint args) +// DISCARDED: internal static void SetWindowCollapsedNative(byte collapsed, ImGuiCond cond) +// DISCARDED: internal static void SetWindowCollapsedNative(byte* name, byte collapsed, ImGuiCond cond) +// DISCARDED: internal static void SetWindowFocusNative() +// DISCARDED: internal static void SetWindowFocusNative(byte* name) +// DISCARDED: internal static void SetWindowPosNative(Vector2 pos, ImGuiCond cond) +// DISCARDED: internal static void SetWindowPosNative(byte* name, Vector2 pos, ImGuiCond cond) +// DISCARDED: internal static void SetWindowSizeNative(Vector2 size, ImGuiCond cond) +// DISCARDED: internal static void SetWindowSizeNative(byte* name, Vector2 size, ImGuiCond cond) +// DISCARDED: internal static void ShowFontSelectorNative(byte* label) +// DISCARDED: internal static byte ShowStyleSelectorNative(byte* label) +// DISCARDED: internal static byte SliderAngleNative(byte* label, float* vRad, float vDegreesMin, float vDegreesMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte SliderFloatNative(byte* label, float* v, float vMin, float vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte SliderFloat2Native(byte* label, float* v, float vMin, float vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte SliderFloat3Native(byte* label, float* v, float vMin, float vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte SliderFloat4Native(byte* label, float* v, float vMin, float vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte SliderIntNative(byte* label, int* v, int vMin, int vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte SliderInt2Native(byte* label, int* v, int vMin, int vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte SliderInt3Native(byte* label, int* v, int vMin, int vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte SliderInt4Native(byte* label, int* v, int vMin, int vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte SliderScalarNative(byte* label, ImGuiDataType dataType, void* pData, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte SliderScalarNNative(byte* label, ImGuiDataType dataType, void* pData, int components, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte SmallButtonNative(byte* label) +// DISCARDED: internal static byte TabItemButtonNative(byte* label, ImGuiTabItemFlags flags) +// DISCARDED: internal static void TableHeaderNative(byte* label) +// DISCARDED: internal static void TableSetupColumnNative(byte* label, ImGuiTableColumnFlags flags, float initWidthOrWeight, uint userId) +// DISCARDED: internal static void TextNative(byte* fmt) +// DISCARDED: internal static void TextColoredNative(Vector4 col, byte* fmt) +// DISCARDED: internal static void TextColoredVNative(Vector4 col, byte* fmt, nuint args) +// DISCARDED: internal static void TextDisabledNative(byte* fmt) +// DISCARDED: internal static void TextDisabledVNative(byte* fmt, nuint args) +// DISCARDED: internal static void TextUnformattedNative(byte* text, byte* textEnd) +// DISCARDED: internal static void TextVNative(byte* fmt, nuint args) +// DISCARDED: internal static void TextWrappedNative(byte* fmt) +// DISCARDED: internal static void TextWrappedVNative(byte* fmt, nuint args) +// DISCARDED: internal static byte TreeNodeNative(byte* label) +// DISCARDED: internal static byte TreeNodeNative(byte* strId, byte* fmt) +// DISCARDED: internal static byte TreeNodeNative(void* ptrId, byte* fmt) +// DISCARDED: internal static byte TreeNodeExNative(byte* label, ImGuiTreeNodeFlags flags) +// DISCARDED: internal static byte TreeNodeExNative(byte* strId, ImGuiTreeNodeFlags flags, byte* fmt) +// DISCARDED: internal static byte TreeNodeExNative(void* ptrId, ImGuiTreeNodeFlags flags, byte* fmt) +// DISCARDED: internal static byte TreeNodeExVNative(byte* strId, ImGuiTreeNodeFlags flags, byte* fmt, nuint args) +// DISCARDED: internal static byte TreeNodeExVNative(void* ptrId, ImGuiTreeNodeFlags flags, byte* fmt, nuint args) +// DISCARDED: internal static byte TreeNodeVNative(byte* strId, byte* fmt, nuint args) +// DISCARDED: internal static byte TreeNodeVNative(void* ptrId, byte* fmt, nuint args) +// DISCARDED: internal static void TreePushNative(byte* strId) +// DISCARDED: internal static void TreePushNative(void* ptrId) +// DISCARDED: internal static void ValueNative(byte* prefix, byte b) +// DISCARDED: internal static void ValueNative(byte* prefix, int v) +// DISCARDED: internal static void ValueNative(byte* prefix, uint v) +// DISCARDED: internal static void ValueNative(byte* prefix, float v, byte* floatFormat) +// DISCARDED: internal static byte VSliderFloatNative(byte* label, Vector2 size, float* v, float vMin, float vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte VSliderIntNative(byte* label, Vector2 size, int* v, int vMin, int vMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static byte VSliderScalarNative(byte* label, Vector2 size, ImGuiDataType dataType, void* pData, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags) diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiIO.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiIO.gen.cs index b9a19dd3a..a3550bc65 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiIO.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiIO.gen.cs @@ -18,75 +18,6 @@ public unsafe partial struct ImGuiIO ImGuiNative.AddFocusEvent(@this, focused ? (byte)1 : (byte)0); } } - public unsafe void AddInputCharacter(uint c) - { - fixed (ImGuiIO* @this = &this) - { - ImGuiNative.AddInputCharacter(@this, c); - } - } - public unsafe void AddInputCharactersUTF8(byte* str) - { - fixed (ImGuiIO* @this = &this) - { - ImGuiNative.AddInputCharactersUTF8(@this, str); - } - } - public unsafe void AddInputCharactersUTF8(ref byte str) - { - fixed (ImGuiIO* @this = &this) - { - fixed (byte* pstr = &str) - { - ImGuiNative.AddInputCharactersUTF8(@this, (byte*)pstr); - } - } - } - public unsafe void AddInputCharactersUTF8(ReadOnlySpan str) - { - fixed (ImGuiIO* @this = &this) - { - fixed (byte* pstr = str) - { - ImGuiNative.AddInputCharactersUTF8(@this, (byte*)pstr); - } - } - } - public unsafe void AddInputCharactersUTF8(string str) - { - fixed (ImGuiIO* @this = &this) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.AddInputCharactersUTF8(@this, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public unsafe void AddInputCharacterUTF16(ushort c) - { - fixed (ImGuiIO* @this = &this) - { - ImGuiNative.AddInputCharacterUTF16(@this, c); - } - } public unsafe void AddKeyAnalogEvent(ImGuiKey key, bool down, float v) { fixed (ImGuiIO* @this = &this) @@ -172,4 +103,7 @@ public unsafe partial struct ImGuiIO } } } +// DISCARDED: AddInputCharacter +// DISCARDED: AddInputCharactersUTF8 +// DISCARDED: AddInputCharacterUTF16 diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiIOPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiIOPtr.gen.cs index daf98d2cc..2507869fe 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiIOPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiIOPtr.gen.cs @@ -15,57 +15,6 @@ public unsafe partial struct ImGuiIOPtr { ImGuiNative.AddFocusEvent(Handle, focused ? (byte)1 : (byte)0); } - public unsafe void AddInputCharacter(uint c) - { - ImGuiNative.AddInputCharacter(Handle, c); - } - public unsafe void AddInputCharactersUTF8(byte* str) - { - ImGuiNative.AddInputCharactersUTF8(Handle, str); - } - public unsafe void AddInputCharactersUTF8(ref byte str) - { - fixed (byte* pstr = &str) - { - ImGuiNative.AddInputCharactersUTF8(Handle, (byte*)pstr); - } - } - public unsafe void AddInputCharactersUTF8(ReadOnlySpan str) - { - fixed (byte* pstr = str) - { - ImGuiNative.AddInputCharactersUTF8(Handle, (byte*)pstr); - } - } - public unsafe void AddInputCharactersUTF8(string str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiNative.AddInputCharactersUTF8(Handle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public unsafe void AddInputCharacterUTF16(ushort c) - { - ImGuiNative.AddInputCharacterUTF16(Handle, c); - } public unsafe void AddKeyAnalogEvent(ImGuiKey key, bool down, float v) { ImGuiNative.AddKeyAnalogEvent(Handle, key, down ? (byte)1 : (byte)0, v); @@ -115,4 +64,7 @@ public unsafe partial struct ImGuiIOPtr ImGuiNative.SetKeyEventNativeData(Handle, key, nativeKeycode, nativeScancode, (int)(-1)); } } +// DISCARDED: AddInputCharacter +// DISCARDED: AddInputCharactersUTF8 +// DISCARDED: AddInputCharacterUTF16 diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiP.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiP.gen.cs index 8c1e21e4f..5d8e8b6c7 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiP.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiP.gen.cs @@ -35,17928 +35,11 @@ public unsafe partial class ImGuiP int ret = ImGuiPNative.ImUpperPowerOfTwo(v); return ret; } - public static int ImStricmp(byte* str1, byte* str2) - { - int ret = ImGuiPNative.ImStricmp(str1, str2); - return ret; - } - public static int ImStricmp(ref byte str1, byte* str2) - { - fixed (byte* pstr1 = &str1) - { - int ret = ImGuiPNative.ImStricmp((byte*)pstr1, str2); - return ret; - } - } - public static int ImStricmp(ReadOnlySpan str1, byte* str2) - { - fixed (byte* pstr1 = str1) - { - int ret = ImGuiPNative.ImStricmp((byte*)pstr1, str2); - return ret; - } - } - public static int ImStricmp(string str1, byte* str2) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str1 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str1); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImStricmp(pStr0, str2); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImStricmp(byte* str1, ref byte str2) - { - fixed (byte* pstr2 = &str2) - { - int ret = ImGuiPNative.ImStricmp(str1, (byte*)pstr2); - return ret; - } - } - public static int ImStricmp(byte* str1, ReadOnlySpan str2) - { - fixed (byte* pstr2 = str2) - { - int ret = ImGuiPNative.ImStricmp(str1, (byte*)pstr2); - return ret; - } - } - public static int ImStricmp(byte* str1, string str2) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str2 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str2); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImStricmp(str1, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImStricmp(ref byte str1, ref byte str2) - { - fixed (byte* pstr1 = &str1) - { - fixed (byte* pstr2 = &str2) - { - int ret = ImGuiPNative.ImStricmp((byte*)pstr1, (byte*)pstr2); - return ret; - } - } - } - public static int ImStricmp(ReadOnlySpan str1, ReadOnlySpan str2) - { - fixed (byte* pstr1 = str1) - { - fixed (byte* pstr2 = str2) - { - int ret = ImGuiPNative.ImStricmp((byte*)pstr1, (byte*)pstr2); - return ret; - } - } - } - public static int ImStricmp(string str1, string str2) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str1 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str1); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (str2 != null) - { - pStrSize1 = Utils.GetByteCountUTF8(str2); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(str2, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - int ret = ImGuiPNative.ImStricmp(pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImStricmp(ref byte str1, ReadOnlySpan str2) - { - fixed (byte* pstr1 = &str1) - { - fixed (byte* pstr2 = str2) - { - int ret = ImGuiPNative.ImStricmp((byte*)pstr1, (byte*)pstr2); - return ret; - } - } - } - public static int ImStricmp(ref byte str1, string str2) - { - fixed (byte* pstr1 = &str1) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str2 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str2); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImStricmp((byte*)pstr1, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImStricmp(ReadOnlySpan str1, ref byte str2) - { - fixed (byte* pstr1 = str1) - { - fixed (byte* pstr2 = &str2) - { - int ret = ImGuiPNative.ImStricmp((byte*)pstr1, (byte*)pstr2); - return ret; - } - } - } - public static int ImStricmp(ReadOnlySpan str1, string str2) - { - fixed (byte* pstr1 = str1) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str2 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str2); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImStricmp((byte*)pstr1, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImStricmp(string str1, ref byte str2) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str1 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str1); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pstr2 = &str2) - { - int ret = ImGuiPNative.ImStricmp(pStr0, (byte*)pstr2); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImStricmp(string str1, ReadOnlySpan str2) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str1 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str1); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pstr2 = str2) - { - int ret = ImGuiPNative.ImStricmp(pStr0, (byte*)pstr2); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImStrnicmp(byte* str1, byte* str2, nuint count) - { - int ret = ImGuiPNative.ImStrnicmp(str1, str2, count); - return ret; - } - public static int ImStrnicmp(ref byte str1, byte* str2, nuint count) - { - fixed (byte* pstr1 = &str1) - { - int ret = ImGuiPNative.ImStrnicmp((byte*)pstr1, str2, count); - return ret; - } - } - public static int ImStrnicmp(ReadOnlySpan str1, byte* str2, nuint count) - { - fixed (byte* pstr1 = str1) - { - int ret = ImGuiPNative.ImStrnicmp((byte*)pstr1, str2, count); - return ret; - } - } - public static int ImStrnicmp(string str1, byte* str2, nuint count) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str1 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str1); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImStrnicmp(pStr0, str2, count); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImStrnicmp(byte* str1, ref byte str2, nuint count) - { - fixed (byte* pstr2 = &str2) - { - int ret = ImGuiPNative.ImStrnicmp(str1, (byte*)pstr2, count); - return ret; - } - } - public static int ImStrnicmp(byte* str1, ReadOnlySpan str2, nuint count) - { - fixed (byte* pstr2 = str2) - { - int ret = ImGuiPNative.ImStrnicmp(str1, (byte*)pstr2, count); - return ret; - } - } - public static int ImStrnicmp(byte* str1, string str2, nuint count) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str2 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str2); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImStrnicmp(str1, pStr0, count); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImStrnicmp(ref byte str1, ref byte str2, nuint count) - { - fixed (byte* pstr1 = &str1) - { - fixed (byte* pstr2 = &str2) - { - int ret = ImGuiPNative.ImStrnicmp((byte*)pstr1, (byte*)pstr2, count); - return ret; - } - } - } - public static int ImStrnicmp(ReadOnlySpan str1, ReadOnlySpan str2, nuint count) - { - fixed (byte* pstr1 = str1) - { - fixed (byte* pstr2 = str2) - { - int ret = ImGuiPNative.ImStrnicmp((byte*)pstr1, (byte*)pstr2, count); - return ret; - } - } - } - public static int ImStrnicmp(string str1, string str2, nuint count) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str1 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str1); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (str2 != null) - { - pStrSize1 = Utils.GetByteCountUTF8(str2); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(str2, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - int ret = ImGuiPNative.ImStrnicmp(pStr0, pStr1, count); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImStrnicmp(ref byte str1, ReadOnlySpan str2, nuint count) - { - fixed (byte* pstr1 = &str1) - { - fixed (byte* pstr2 = str2) - { - int ret = ImGuiPNative.ImStrnicmp((byte*)pstr1, (byte*)pstr2, count); - return ret; - } - } - } - public static int ImStrnicmp(ref byte str1, string str2, nuint count) - { - fixed (byte* pstr1 = &str1) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str2 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str2); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImStrnicmp((byte*)pstr1, pStr0, count); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImStrnicmp(ReadOnlySpan str1, ref byte str2, nuint count) - { - fixed (byte* pstr1 = str1) - { - fixed (byte* pstr2 = &str2) - { - int ret = ImGuiPNative.ImStrnicmp((byte*)pstr1, (byte*)pstr2, count); - return ret; - } - } - } - public static int ImStrnicmp(ReadOnlySpan str1, string str2, nuint count) - { - fixed (byte* pstr1 = str1) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str2 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str2); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImStrnicmp((byte*)pstr1, pStr0, count); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImStrnicmp(string str1, ref byte str2, nuint count) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str1 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str1); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pstr2 = &str2) - { - int ret = ImGuiPNative.ImStrnicmp(pStr0, (byte*)pstr2, count); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImStrnicmp(string str1, ReadOnlySpan str2, nuint count) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str1 != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str1); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pstr2 = str2) - { - int ret = ImGuiPNative.ImStrnicmp(pStr0, (byte*)pstr2, count); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void ImStrncpy(byte* dst, byte* src, nuint count) - { - ImGuiPNative.ImStrncpy(dst, src, count); - } - public static void ImStrncpy(ref byte dst, byte* src, nuint count) - { - fixed (byte* pdst = &dst) - { - ImGuiPNative.ImStrncpy((byte*)pdst, src, count); - } - } - public static void ImStrncpy(ref string dst, byte* src, nuint count) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dst != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dst); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.ImStrncpy(pStr0, src, count); - dst = Utils.DecodeStringUTF8(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void ImStrncpy(byte* dst, ref byte src, nuint count) - { - fixed (byte* psrc = &src) - { - ImGuiPNative.ImStrncpy(dst, (byte*)psrc, count); - } - } - public static void ImStrncpy(byte* dst, ReadOnlySpan src, nuint count) - { - fixed (byte* psrc = src) - { - ImGuiPNative.ImStrncpy(dst, (byte*)psrc, count); - } - } - public static void ImStrncpy(byte* dst, string src, nuint count) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (src != null) - { - pStrSize0 = Utils.GetByteCountUTF8(src); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(src, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.ImStrncpy(dst, pStr0, count); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void ImStrncpy(ref byte dst, ref byte src, nuint count) - { - fixed (byte* pdst = &dst) - { - fixed (byte* psrc = &src) - { - ImGuiPNative.ImStrncpy((byte*)pdst, (byte*)psrc, count); - } - } - } - public static void ImStrncpy(ref byte dst, ReadOnlySpan src, nuint count) - { - fixed (byte* pdst = &dst) - { - fixed (byte* psrc = src) - { - ImGuiPNative.ImStrncpy((byte*)pdst, (byte*)psrc, count); - } - } - } - public static void ImStrncpy(ref string dst, string src, nuint count) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dst != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dst); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (src != null) - { - pStrSize1 = Utils.GetByteCountUTF8(src); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(src, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - ImGuiPNative.ImStrncpy(pStr0, pStr1, count); - dst = Utils.DecodeStringUTF8(pStr0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void ImStrncpy(ref byte dst, string src, nuint count) - { - fixed (byte* pdst = &dst) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (src != null) - { - pStrSize0 = Utils.GetByteCountUTF8(src); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(src, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.ImStrncpy((byte*)pdst, pStr0, count); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void ImStrncpy(ref string dst, ref byte src, nuint count) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dst != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dst); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* psrc = &src) - { - ImGuiPNative.ImStrncpy(pStr0, (byte*)psrc, count); - dst = Utils.DecodeStringUTF8(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void ImStrncpy(ref string dst, ReadOnlySpan src, nuint count) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dst != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dst); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* psrc = src) - { - ImGuiPNative.ImStrncpy(pStr0, (byte*)psrc, count); - dst = Utils.DecodeStringUTF8(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static byte* ImStrdup(byte* str) - { - byte* ret = ImGuiPNative.ImStrdup(str); - return ret; - } - public static byte* ImStrdup(ref byte str) - { - fixed (byte* pstr = &str) - { - byte* ret = ImGuiPNative.ImStrdup((byte*)pstr); - return ret; - } - } - public static byte* ImStrdup(ReadOnlySpan str) - { - fixed (byte* pstr = str) - { - byte* ret = ImGuiPNative.ImStrdup((byte*)pstr); - return ret; - } - } - public static byte* ImStrdup(string str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStrdup(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStrdupS(byte* str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdup(str)); - return ret; - } - public static string ImStrdupS(ref byte str) - { - fixed (byte* pstr = &str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdup((byte*)pstr)); - return ret; - } - } - public static string ImStrdupS(ReadOnlySpan str) - { - fixed (byte* pstr = str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdup((byte*)pstr)); - return ret; - } - } - public static string ImStrdupS(string str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdup(pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStrdupcpy(byte* dst, nuint* pDstSize, byte* str) - { - byte* ret = ImGuiPNative.ImStrdupcpy(dst, pDstSize, str); - return ret; - } - public static byte* ImStrdupcpy(ref byte dst, nuint* pDstSize, byte* str) - { - fixed (byte* pdst = &dst) - { - byte* ret = ImGuiPNative.ImStrdupcpy((byte*)pdst, pDstSize, str); - return ret; - } - } - public static byte* ImStrdupcpy(ref string dst, nuint* pDstSize, byte* str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dst != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dst); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStrdupcpy(pStr0, pDstSize, str); - dst = Utils.DecodeStringUTF8(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStrdupcpy(byte* dst, nuint* pDstSize, ref byte str) - { - fixed (byte* pstr = &str) - { - byte* ret = ImGuiPNative.ImStrdupcpy(dst, pDstSize, (byte*)pstr); - return ret; - } - } - public static byte* ImStrdupcpy(byte* dst, nuint* pDstSize, ReadOnlySpan str) - { - fixed (byte* pstr = str) - { - byte* ret = ImGuiPNative.ImStrdupcpy(dst, pDstSize, (byte*)pstr); - return ret; - } - } - public static byte* ImStrdupcpy(byte* dst, nuint* pDstSize, string str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStrdupcpy(dst, pDstSize, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStrdupcpy(ref byte dst, nuint* pDstSize, ref byte str) - { - fixed (byte* pdst = &dst) - { - fixed (byte* pstr = &str) - { - byte* ret = ImGuiPNative.ImStrdupcpy((byte*)pdst, pDstSize, (byte*)pstr); - return ret; - } - } - } - public static byte* ImStrdupcpy(ref byte dst, nuint* pDstSize, ReadOnlySpan str) - { - fixed (byte* pdst = &dst) - { - fixed (byte* pstr = str) - { - byte* ret = ImGuiPNative.ImStrdupcpy((byte*)pdst, pDstSize, (byte*)pstr); - return ret; - } - } - } - public static byte* ImStrdupcpy(ref string dst, nuint* pDstSize, string str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dst != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dst); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (str != null) - { - pStrSize1 = Utils.GetByteCountUTF8(str); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(str, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStrdupcpy(pStr0, pDstSize, pStr1); - dst = Utils.DecodeStringUTF8(pStr0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStrdupcpy(ref byte dst, nuint* pDstSize, string str) - { - fixed (byte* pdst = &dst) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStrdupcpy((byte*)pdst, pDstSize, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStrdupcpy(ref string dst, nuint* pDstSize, ref byte str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dst != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dst); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pstr = &str) - { - byte* ret = ImGuiPNative.ImStrdupcpy(pStr0, pDstSize, (byte*)pstr); - dst = Utils.DecodeStringUTF8(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStrdupcpy(ref string dst, nuint* pDstSize, ReadOnlySpan str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dst != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dst); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pstr = str) - { - byte* ret = ImGuiPNative.ImStrdupcpy(pStr0, pDstSize, (byte*)pstr); - dst = Utils.DecodeStringUTF8(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStrdupcpyS(byte* dst, nuint* pDstSize, byte* str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdupcpy(dst, pDstSize, str)); - return ret; - } - public static string ImStrdupcpyS(ref byte dst, nuint* pDstSize, byte* str) - { - fixed (byte* pdst = &dst) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdupcpy((byte*)pdst, pDstSize, str)); - return ret; - } - } - public static string ImStrdupcpyS(ref string dst, nuint* pDstSize, byte* str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dst != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dst); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdupcpy(pStr0, pDstSize, str)); - dst = Utils.DecodeStringUTF8(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStrdupcpyS(byte* dst, nuint* pDstSize, ref byte str) - { - fixed (byte* pstr = &str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdupcpy(dst, pDstSize, (byte*)pstr)); - return ret; - } - } - public static string ImStrdupcpyS(byte* dst, nuint* pDstSize, ReadOnlySpan str) - { - fixed (byte* pstr = str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdupcpy(dst, pDstSize, (byte*)pstr)); - return ret; - } - } - public static string ImStrdupcpyS(byte* dst, nuint* pDstSize, string str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdupcpy(dst, pDstSize, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStrdupcpyS(ref byte dst, nuint* pDstSize, ref byte str) - { - fixed (byte* pdst = &dst) - { - fixed (byte* pstr = &str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdupcpy((byte*)pdst, pDstSize, (byte*)pstr)); - return ret; - } - } - } - public static string ImStrdupcpyS(ref byte dst, nuint* pDstSize, ReadOnlySpan str) - { - fixed (byte* pdst = &dst) - { - fixed (byte* pstr = str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdupcpy((byte*)pdst, pDstSize, (byte*)pstr)); - return ret; - } - } - } - public static string ImStrdupcpyS(ref string dst, nuint* pDstSize, string str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dst != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dst); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (str != null) - { - pStrSize1 = Utils.GetByteCountUTF8(str); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(str, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdupcpy(pStr0, pDstSize, pStr1)); - dst = Utils.DecodeStringUTF8(pStr0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStrdupcpyS(ref byte dst, nuint* pDstSize, string str) - { - fixed (byte* pdst = &dst) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdupcpy((byte*)pdst, pDstSize, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStrdupcpyS(ref string dst, nuint* pDstSize, ref byte str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dst != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dst); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pstr = &str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdupcpy(pStr0, pDstSize, (byte*)pstr)); - dst = Utils.DecodeStringUTF8(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStrdupcpyS(ref string dst, nuint* pDstSize, ReadOnlySpan str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dst != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dst); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pstr = str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrdupcpy(pStr0, pDstSize, (byte*)pstr)); - dst = Utils.DecodeStringUTF8(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImStrlenW(ushort* str) - { - int ret = ImGuiPNative.ImStrlenW(str); - return ret; - } public static ushort* ImStrbolW(ushort* bufMidLine, ushort* bufBegin) { ushort* ret = ImGuiPNative.ImStrbolW(bufMidLine, bufBegin); return ret; } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, byte* needle, byte* needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, needle, needleEnd); - return ret; - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, needleEnd); - return ret; - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, needleEnd); - return ret; - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, byte* needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, needle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, needleEnd); - return ret; - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, needleEnd); - return ret; - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, byte* needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, needle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd); - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd); - return ret; - } - } - } - public static byte* ImStristr(string haystack, string haystackEnd, byte* needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, needle, needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd); - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd); - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, string needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, pStr0, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, string needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, pStr1, needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, string needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, pStr1, needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, ref byte needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(string haystack, string haystackEnd, string needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needle != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needle); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needle, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, pStr2, needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, ref byte needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, string needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ref byte needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, string needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, string haystackEnd, ref byte needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, string haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = needle) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, byte* needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, needle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, byte* needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, needle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, byte* needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, needle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, needle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, byte* needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, needle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, byte* needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, needle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, needle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(string haystack, string haystackEnd, byte* needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, needle, pStr2); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, byte* needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, byte* needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, byte* needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, byte* needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, string haystackEnd, byte* needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, needle, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, string haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, needle, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, string needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, string needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, byte* haystackEnd, string needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, haystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, string needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, pStr1, pStr2); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, byte* haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, ref byte needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, ref byte needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, ReadOnlySpan needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, string needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, pStr1, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, byte* haystackEnd, string needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, haystackEnd, pStr1, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, string needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, pStr1, pStr2); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ref byte haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, ref byte needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, ref byte needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, ReadOnlySpan needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, string needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, pStr1, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(byte* haystack, string haystackEnd, string needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(haystack, pStr0, pStr1, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(string haystack, string haystackEnd, string needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needle != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needle); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needle, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte* pStr3 = null; - int pStrSize3 = 0; - if (needleEnd != null) - { - pStrSize3 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize3 >= Utils.MaxStackallocSize) - { - pStr3 = Utils.Alloc(pStrSize3 + 1); - } - else - { - byte* pStrStack3 = stackalloc byte[pStrSize3 + 1]; - pStr3 = pStrStack3; - } - int pStrOffset3 = Utils.EncodeStringUTF8(needleEnd, pStr3, pStrSize3); - pStr3[pStrOffset3] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, pStr2, pStr3); - if (pStrSize3 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr3); - } - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ref byte haystack, string haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, pStr2); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - return ret; - } - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte* ret = ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, pStr2); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, ref byte needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, ref byte needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, ReadOnlySpan needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, string needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, string needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ref byte haystackEnd, string needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, pStr2); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ref byte needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ref byte needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, string needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, string needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, string needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, pStr2); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, string haystackEnd, ref byte needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, string haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, string haystackEnd, ref byte needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, pStr2); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, string haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, string haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static byte* ImStristr(string haystack, string haystackEnd, ReadOnlySpan needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = needle) - { - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, pStr2); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, string haystackEnd, string needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needle != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needle); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needle, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, pStr2, (byte*)pneedleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static byte* ImStristr(string haystack, string haystackEnd, string needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needle != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needle); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needle, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - byte* ret = ImGuiPNative.ImStristr(pStr0, pStr1, pStr2, (byte*)pneedleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, byte* needle, byte* needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, needle, needleEnd)); - return ret; - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, needleEnd)); - return ret; - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, needleEnd)); - return ret; - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, byte* needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, needle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, needleEnd)); - return ret; - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, needleEnd)); - return ret; - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, byte* needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, needle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd)); - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd)); - return ret; - } - } - } - public static string ImStristrS(string haystack, string haystackEnd, byte* needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, needle, needleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd)); - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd)); - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, byte* needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, string needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, pStr0, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, string needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, pStr1, needleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, string needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, pStr1, needleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, ref byte needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(string haystack, string haystackEnd, string needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needle != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needle); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needle, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, pStr2, needleEnd)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, needleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, ref byte needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, string needle, byte* needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, needleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, ref byte needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, string needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, needleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, ref byte needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, string needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, needleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, string haystackEnd, ref byte needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = &needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, needleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, string haystackEnd, ReadOnlySpan needle, byte* needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = needle) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, needleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, byte* needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, needle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, byte* needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, needle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, needle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, byte* needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, needle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, needle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, byte* needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, needle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, needle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, byte* needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, needle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, needle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(string haystack, string haystackEnd, byte* needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, needle, pStr2)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, byte* needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, byte* needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, needle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, byte* needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, byte* needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, byte* needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, byte* needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, needle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, string haystackEnd, byte* needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, needle, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, string haystackEnd, byte* needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, needle, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, string needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, pStr0, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, string needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, byte* haystackEnd, string needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, haystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, string needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, pStr1, pStr2)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, byte* haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, haystackEnd, pStr0, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, ref byte needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, ref byte needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, ReadOnlySpan needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, (byte*)pneedle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, string needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, pStr1, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, byte* haystackEnd, string needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, haystackEnd, pStr1, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, string needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, pStr1, pStr2)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ref byte haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, (byte*)phaystackEnd, pStr0, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, ref byte needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, ref byte needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, ReadOnlySpan needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, (byte*)pneedle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, string needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, pStr1, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(byte* haystack, string haystackEnd, string needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(haystack, pStr0, pStr1, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(string haystack, string haystackEnd, string needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needle != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needle); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needle, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte* pStr3 = null; - int pStrSize3 = 0; - if (needleEnd != null) - { - pStrSize3 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize3 >= Utils.MaxStackallocSize) - { - pStr3 = Utils.Alloc(pStrSize3 + 1); - } - else - { - byte* pStrStack3 = stackalloc byte[pStrSize3 + 1]; - pStr3 = pStrStack3; - } - int pStrOffset3 = Utils.EncodeStringUTF8(needleEnd, pStr3, pStrSize3); - pStr3[pStrOffset3] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, pStr2, pStr3)); - if (pStrSize3 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr3); - } - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ref byte haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ref byte haystack, string haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = &haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, pStr2)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - return ret; - } - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needleEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needleEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (needle != null) - { - pStrSize0 = Utils.GetByteCountUTF8(needle); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, ref byte needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, ref byte needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pneedle = needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, (byte*)pneedle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, string needle, ref byte needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, string needle, ReadOnlySpan needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, string needle, string needleEnd) - { - fixed (byte* phaystack = haystack) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystackEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr((byte*)phaystack, pStr0, pStr1, pStr2)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, ref byte needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, ref byte needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, ReadOnlySpan needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, string needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, string needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ref byte haystackEnd, string needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = &haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, pStr2)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, ref byte needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, ref byte needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = &needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - fixed (byte* pneedle = needle) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needleEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, string needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, string needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, string needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* phaystackEnd = haystackEnd) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (needle != null) - { - pStrSize1 = Utils.GetByteCountUTF8(needle); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, (byte*)phaystackEnd, pStr1, pStr2)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, string haystackEnd, ref byte needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, string haystackEnd, ref byte needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = &needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, string haystackEnd, ref byte needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = &needle) - { - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, pStr2)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, string haystackEnd, ReadOnlySpan needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, string haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = needle) - { - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static string ImStristrS(string haystack, string haystackEnd, ReadOnlySpan needle, string needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pneedle = needle) - { - byte* pStr2 = null; - int pStrSize2 = 0; - if (needleEnd != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needleEnd); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, (byte*)pneedle, pStr2)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, string haystackEnd, string needle, ref byte needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needle != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needle); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needle, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - fixed (byte* pneedleEnd = &needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, pStr2, (byte*)pneedleEnd)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static string ImStristrS(string haystack, string haystackEnd, string needle, ReadOnlySpan needleEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (haystack != null) - { - pStrSize0 = Utils.GetByteCountUTF8(haystack); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (haystackEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (needle != null) - { - pStrSize2 = Utils.GetByteCountUTF8(needle); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(needle, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - fixed (byte* pneedleEnd = needleEnd) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStristr(pStr0, pStr1, pStr2, (byte*)pneedleEnd)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void ImStrTrimBlanks(byte* str) - { - ImGuiPNative.ImStrTrimBlanks(str); - } - public static void ImStrTrimBlanks(ref byte str) - { - fixed (byte* pstr = &str) - { - ImGuiPNative.ImStrTrimBlanks((byte*)pstr); - } - } - public static void ImStrTrimBlanks(ref string str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.ImStrTrimBlanks(pStr0); - str = Utils.DecodeStringUTF8(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static byte* ImStrSkipBlank(byte* str) - { - byte* ret = ImGuiPNative.ImStrSkipBlank(str); - return ret; - } - public static byte* ImStrSkipBlank(ref byte str) - { - fixed (byte* pstr = &str) - { - byte* ret = ImGuiPNative.ImStrSkipBlank((byte*)pstr); - return ret; - } - } - public static byte* ImStrSkipBlank(ReadOnlySpan str) - { - fixed (byte* pstr = str) - { - byte* ret = ImGuiPNative.ImStrSkipBlank((byte*)pstr); - return ret; - } - } - public static byte* ImStrSkipBlank(string str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImStrSkipBlank(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImStrSkipBlankS(byte* str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrSkipBlank(str)); - return ret; - } - public static string ImStrSkipBlankS(ref byte str) - { - fixed (byte* pstr = &str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrSkipBlank((byte*)pstr)); - return ret; - } - } - public static string ImStrSkipBlankS(ReadOnlySpan str) - { - fixed (byte* pstr = str) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrSkipBlank((byte*)pstr)); - return ret; - } - } - public static string ImStrSkipBlankS(string str) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (str != null) - { - pStrSize0 = Utils.GetByteCountUTF8(str); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImStrSkipBlank(pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } public static bool ImCharIsBlankA(byte c) { byte ret = ImGuiPNative.ImCharIsBlankA(c); @@ -17967,241 +50,6 @@ public unsafe partial class ImGuiP byte ret = ImGuiPNative.ImCharIsBlankW(c); return ret != 0; } - public static byte* ImParseFormatFindStart(byte* format) - { - byte* ret = ImGuiPNative.ImParseFormatFindStart(format); - return ret; - } - public static byte* ImParseFormatFindStart(ref byte format) - { - fixed (byte* pformat = &format) - { - byte* ret = ImGuiPNative.ImParseFormatFindStart((byte*)pformat); - return ret; - } - } - public static byte* ImParseFormatFindStart(ReadOnlySpan format) - { - fixed (byte* pformat = format) - { - byte* ret = ImGuiPNative.ImParseFormatFindStart((byte*)pformat); - return ret; - } - } - public static byte* ImParseFormatFindStart(string format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImParseFormatFindStart(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImParseFormatFindStartS(byte* format) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImParseFormatFindStart(format)); - return ret; - } - public static string ImParseFormatFindStartS(ref byte format) - { - fixed (byte* pformat = &format) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImParseFormatFindStart((byte*)pformat)); - return ret; - } - } - public static string ImParseFormatFindStartS(ReadOnlySpan format) - { - fixed (byte* pformat = format) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImParseFormatFindStart((byte*)pformat)); - return ret; - } - } - public static string ImParseFormatFindStartS(string format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImParseFormatFindStart(pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static byte* ImParseFormatFindEnd(byte* format) - { - byte* ret = ImGuiPNative.ImParseFormatFindEnd(format); - return ret; - } - public static byte* ImParseFormatFindEnd(ref byte format) - { - fixed (byte* pformat = &format) - { - byte* ret = ImGuiPNative.ImParseFormatFindEnd((byte*)pformat); - return ret; - } - } - public static byte* ImParseFormatFindEnd(ReadOnlySpan format) - { - fixed (byte* pformat = format) - { - byte* ret = ImGuiPNative.ImParseFormatFindEnd((byte*)pformat); - return ret; - } - } - public static byte* ImParseFormatFindEnd(string format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* ret = ImGuiPNative.ImParseFormatFindEnd(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static string ImParseFormatFindEndS(byte* format) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImParseFormatFindEnd(format)); - return ret; - } - public static string ImParseFormatFindEndS(ref byte format) - { - fixed (byte* pformat = &format) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImParseFormatFindEnd((byte*)pformat)); - return ret; - } - } - public static string ImParseFormatFindEndS(ReadOnlySpan format) - { - fixed (byte* pformat = format) - { - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImParseFormatFindEnd((byte*)pformat)); - return ret; - } - } - public static string ImParseFormatFindEndS(string format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - string ret = Utils.DecodeStringUTF8(ImGuiPNative.ImParseFormatFindEnd(pStr0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImParseFormatPrecision(byte* format, int defaultValue) - { - int ret = ImGuiPNative.ImParseFormatPrecision(format, defaultValue); - return ret; - } - public static int ImParseFormatPrecision(ref byte format, int defaultValue) - { - fixed (byte* pformat = &format) - { - int ret = ImGuiPNative.ImParseFormatPrecision((byte*)pformat, defaultValue); - return ret; - } - } - public static int ImParseFormatPrecision(ReadOnlySpan format, int defaultValue) - { - fixed (byte* pformat = format) - { - int ret = ImGuiPNative.ImParseFormatPrecision((byte*)pformat, defaultValue); - return ret; - } - } - public static int ImParseFormatPrecision(string format, int defaultValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImParseFormatPrecision(pStr0, defaultValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } public static byte* ImTextCharToUtf8(byte* outBuf, uint c) { byte* ret = ImGuiPNative.ImTextCharToUtf8(outBuf, c); @@ -18244,1539 +92,11 @@ public unsafe partial class ImGuiP return ret; } } - public static int ImTextCharFromUtf8(uint* outChar, byte* inText, byte* inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, inText, inTextEnd); - return ret; - } - public static int ImTextCharFromUtf8(ref uint outChar, byte* inText, byte* inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, inText, inTextEnd); - return ret; - } - } - public static int ImTextCharFromUtf8(uint* outChar, ref byte inText, byte* inTextEnd) - { - fixed (byte* pinText = &inText) - { - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, (byte*)pinText, inTextEnd); - return ret; - } - } - public static int ImTextCharFromUtf8(uint* outChar, ReadOnlySpan inText, byte* inTextEnd) - { - fixed (byte* pinText = inText) - { - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, (byte*)pinText, inTextEnd); - return ret; - } - } - public static int ImTextCharFromUtf8(uint* outChar, string inText, byte* inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, pStr0, inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImTextCharFromUtf8(ref uint outChar, ref byte inText, byte* inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - fixed (byte* pinText = &inText) - { - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, (byte*)pinText, inTextEnd); - return ret; - } - } - } - public static int ImTextCharFromUtf8(ref uint outChar, ReadOnlySpan inText, byte* inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - fixed (byte* pinText = inText) - { - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, (byte*)pinText, inTextEnd); - return ret; - } - } - } - public static int ImTextCharFromUtf8(ref uint outChar, string inText, byte* inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, pStr0, inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCharFromUtf8(uint* outChar, byte* inText, ref byte inTextEnd) - { - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, inText, (byte*)pinTextEnd); - return ret; - } - } - public static int ImTextCharFromUtf8(uint* outChar, byte* inText, ReadOnlySpan inTextEnd) - { - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, inText, (byte*)pinTextEnd); - return ret; - } - } - public static int ImTextCharFromUtf8(uint* outChar, byte* inText, string inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inTextEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, inText, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImTextCharFromUtf8(ref uint outChar, byte* inText, ref byte inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, inText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCharFromUtf8(ref uint outChar, byte* inText, ReadOnlySpan inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, inText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCharFromUtf8(ref uint outChar, byte* inText, string inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inTextEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, inText, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCharFromUtf8(uint* outChar, ref byte inText, ref byte inTextEnd) - { - fixed (byte* pinText = &inText) - { - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, (byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCharFromUtf8(uint* outChar, ReadOnlySpan inText, ReadOnlySpan inTextEnd) - { - fixed (byte* pinText = inText) - { - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, (byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCharFromUtf8(uint* outChar, string inText, string inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (inTextEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(inTextEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImTextCharFromUtf8(uint* outChar, ref byte inText, ReadOnlySpan inTextEnd) - { - fixed (byte* pinText = &inText) - { - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, (byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCharFromUtf8(uint* outChar, ref byte inText, string inTextEnd) - { - fixed (byte* pinText = &inText) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inTextEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, (byte*)pinText, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCharFromUtf8(uint* outChar, ReadOnlySpan inText, ref byte inTextEnd) - { - fixed (byte* pinText = inText) - { - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, (byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCharFromUtf8(uint* outChar, ReadOnlySpan inText, string inTextEnd) - { - fixed (byte* pinText = inText) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inTextEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, (byte*)pinText, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCharFromUtf8(uint* outChar, string inText, ref byte inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, pStr0, (byte*)pinTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCharFromUtf8(uint* outChar, string inText, ReadOnlySpan inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8(outChar, pStr0, (byte*)pinTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCharFromUtf8(ref uint outChar, ref byte inText, ref byte inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - fixed (byte* pinText = &inText) - { - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, (byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - } - public static int ImTextCharFromUtf8(ref uint outChar, ReadOnlySpan inText, ReadOnlySpan inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - fixed (byte* pinText = inText) - { - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, (byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - } - public static int ImTextCharFromUtf8(ref uint outChar, string inText, string inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (inTextEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(inTextEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCharFromUtf8(ref uint outChar, ref byte inText, ReadOnlySpan inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - fixed (byte* pinText = &inText) - { - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, (byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - } - public static int ImTextCharFromUtf8(ref uint outChar, ref byte inText, string inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - fixed (byte* pinText = &inText) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inTextEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, (byte*)pinText, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static int ImTextCharFromUtf8(ref uint outChar, ReadOnlySpan inText, ref byte inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - fixed (byte* pinText = inText) - { - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, (byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - } - public static int ImTextCharFromUtf8(ref uint outChar, ReadOnlySpan inText, string inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - fixed (byte* pinText = inText) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inTextEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, (byte*)pinText, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static int ImTextCharFromUtf8(ref uint outChar, string inText, ref byte inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, pStr0, (byte*)pinTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static int ImTextCharFromUtf8(ref uint outChar, string inText, ReadOnlySpan inTextEnd) - { - fixed (uint* poutChar = &outChar) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCharFromUtf8((uint*)poutChar, pStr0, (byte*)pinTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - } - public static int ImTextCountCharsFromUtf8(byte* inText, byte* inTextEnd) - { - int ret = ImGuiPNative.ImTextCountCharsFromUtf8(inText, inTextEnd); - return ret; - } - public static int ImTextCountCharsFromUtf8(ref byte inText, byte* inTextEnd) - { - fixed (byte* pinText = &inText) - { - int ret = ImGuiPNative.ImTextCountCharsFromUtf8((byte*)pinText, inTextEnd); - return ret; - } - } - public static int ImTextCountCharsFromUtf8(ReadOnlySpan inText, byte* inTextEnd) - { - fixed (byte* pinText = inText) - { - int ret = ImGuiPNative.ImTextCountCharsFromUtf8((byte*)pinText, inTextEnd); - return ret; - } - } - public static int ImTextCountCharsFromUtf8(string inText, byte* inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCountCharsFromUtf8(pStr0, inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImTextCountCharsFromUtf8(byte* inText, ref byte inTextEnd) - { - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCountCharsFromUtf8(inText, (byte*)pinTextEnd); - return ret; - } - } - public static int ImTextCountCharsFromUtf8(byte* inText, ReadOnlySpan inTextEnd) - { - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCountCharsFromUtf8(inText, (byte*)pinTextEnd); - return ret; - } - } - public static int ImTextCountCharsFromUtf8(byte* inText, string inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inTextEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCountCharsFromUtf8(inText, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImTextCountCharsFromUtf8(ref byte inText, ref byte inTextEnd) - { - fixed (byte* pinText = &inText) - { - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCountCharsFromUtf8((byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCountCharsFromUtf8(ReadOnlySpan inText, ReadOnlySpan inTextEnd) - { - fixed (byte* pinText = inText) - { - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCountCharsFromUtf8((byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCountCharsFromUtf8(string inText, string inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (inTextEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(inTextEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - int ret = ImGuiPNative.ImTextCountCharsFromUtf8(pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImTextCountCharsFromUtf8(ref byte inText, ReadOnlySpan inTextEnd) - { - fixed (byte* pinText = &inText) - { - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCountCharsFromUtf8((byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCountCharsFromUtf8(ref byte inText, string inTextEnd) - { - fixed (byte* pinText = &inText) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inTextEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCountCharsFromUtf8((byte*)pinText, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCountCharsFromUtf8(ReadOnlySpan inText, ref byte inTextEnd) - { - fixed (byte* pinText = inText) - { - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCountCharsFromUtf8((byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCountCharsFromUtf8(ReadOnlySpan inText, string inTextEnd) - { - fixed (byte* pinText = inText) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inTextEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCountCharsFromUtf8((byte*)pinText, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCountCharsFromUtf8(string inText, ref byte inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCountCharsFromUtf8(pStr0, (byte*)pinTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCountCharsFromUtf8(string inText, ReadOnlySpan inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCountCharsFromUtf8(pStr0, (byte*)pinTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCountUtf8BytesFromChar(byte* inText, byte* inTextEnd) - { - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar(inText, inTextEnd); - return ret; - } - public static int ImTextCountUtf8BytesFromChar(ref byte inText, byte* inTextEnd) - { - fixed (byte* pinText = &inText) - { - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar((byte*)pinText, inTextEnd); - return ret; - } - } - public static int ImTextCountUtf8BytesFromChar(ReadOnlySpan inText, byte* inTextEnd) - { - fixed (byte* pinText = inText) - { - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar((byte*)pinText, inTextEnd); - return ret; - } - } - public static int ImTextCountUtf8BytesFromChar(string inText, byte* inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar(pStr0, inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImTextCountUtf8BytesFromChar(byte* inText, ref byte inTextEnd) - { - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar(inText, (byte*)pinTextEnd); - return ret; - } - } - public static int ImTextCountUtf8BytesFromChar(byte* inText, ReadOnlySpan inTextEnd) - { - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar(inText, (byte*)pinTextEnd); - return ret; - } - } - public static int ImTextCountUtf8BytesFromChar(byte* inText, string inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inTextEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar(inText, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImTextCountUtf8BytesFromChar(ref byte inText, ref byte inTextEnd) - { - fixed (byte* pinText = &inText) - { - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar((byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCountUtf8BytesFromChar(ReadOnlySpan inText, ReadOnlySpan inTextEnd) - { - fixed (byte* pinText = inText) - { - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar((byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCountUtf8BytesFromChar(string inText, string inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (inTextEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(inTextEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar(pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int ImTextCountUtf8BytesFromChar(ref byte inText, ReadOnlySpan inTextEnd) - { - fixed (byte* pinText = &inText) - { - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar((byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCountUtf8BytesFromChar(ref byte inText, string inTextEnd) - { - fixed (byte* pinText = &inText) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inTextEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar((byte*)pinText, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCountUtf8BytesFromChar(ReadOnlySpan inText, ref byte inTextEnd) - { - fixed (byte* pinText = inText) - { - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar((byte*)pinText, (byte*)pinTextEnd); - return ret; - } - } - } - public static int ImTextCountUtf8BytesFromChar(ReadOnlySpan inText, string inTextEnd) - { - fixed (byte* pinText = inText) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inTextEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar((byte*)pinText, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCountUtf8BytesFromChar(string inText, ref byte inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pinTextEnd = &inTextEnd) - { - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar(pStr0, (byte*)pinTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int ImTextCountUtf8BytesFromChar(string inText, ReadOnlySpan inTextEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pinTextEnd = inTextEnd) - { - int ret = ImGuiPNative.ImTextCountUtf8BytesFromChar(pStr0, (byte*)pinTextEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } public static int ImTextCountUtf8BytesFromStr(ushort* inText, ushort* inTextEnd) { int ret = ImGuiPNative.ImTextCountUtf8BytesFromStr(inText, inTextEnd); return ret; } - public static ImFileHandle ImFileOpen(byte* filename, byte* mode) - { - ImFileHandle ret = ImGuiPNative.ImFileOpen(filename, mode); - return ret; - } - public static ImFileHandle ImFileOpen(ref byte filename, byte* mode) - { - fixed (byte* pfilename = &filename) - { - ImFileHandle ret = ImGuiPNative.ImFileOpen((byte*)pfilename, mode); - return ret; - } - } - public static ImFileHandle ImFileOpen(ReadOnlySpan filename, byte* mode) - { - fixed (byte* pfilename = filename) - { - ImFileHandle ret = ImGuiPNative.ImFileOpen((byte*)pfilename, mode); - return ret; - } - } - public static ImFileHandle ImFileOpen(string filename, byte* mode) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImFileHandle ret = ImGuiPNative.ImFileOpen(pStr0, mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static ImFileHandle ImFileOpen(byte* filename, ref byte mode) - { - fixed (byte* pmode = &mode) - { - ImFileHandle ret = ImGuiPNative.ImFileOpen(filename, (byte*)pmode); - return ret; - } - } - public static ImFileHandle ImFileOpen(byte* filename, ReadOnlySpan mode) - { - fixed (byte* pmode = mode) - { - ImFileHandle ret = ImGuiPNative.ImFileOpen(filename, (byte*)pmode); - return ret; - } - } - public static ImFileHandle ImFileOpen(byte* filename, string mode) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImFileHandle ret = ImGuiPNative.ImFileOpen(filename, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static ImFileHandle ImFileOpen(ref byte filename, ref byte mode) - { - fixed (byte* pfilename = &filename) - { - fixed (byte* pmode = &mode) - { - ImFileHandle ret = ImGuiPNative.ImFileOpen((byte*)pfilename, (byte*)pmode); - return ret; - } - } - } - public static ImFileHandle ImFileOpen(ReadOnlySpan filename, ReadOnlySpan mode) - { - fixed (byte* pfilename = filename) - { - fixed (byte* pmode = mode) - { - ImFileHandle ret = ImGuiPNative.ImFileOpen((byte*)pfilename, (byte*)pmode); - return ret; - } - } - } - public static ImFileHandle ImFileOpen(string filename, string mode) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (mode != null) - { - pStrSize1 = Utils.GetByteCountUTF8(mode); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(mode, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - ImFileHandle ret = ImGuiPNative.ImFileOpen(pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static ImFileHandle ImFileOpen(ref byte filename, ReadOnlySpan mode) - { - fixed (byte* pfilename = &filename) - { - fixed (byte* pmode = mode) - { - ImFileHandle ret = ImGuiPNative.ImFileOpen((byte*)pfilename, (byte*)pmode); - return ret; - } - } - } - public static ImFileHandle ImFileOpen(ref byte filename, string mode) - { - fixed (byte* pfilename = &filename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImFileHandle ret = ImGuiPNative.ImFileOpen((byte*)pfilename, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static ImFileHandle ImFileOpen(ReadOnlySpan filename, ref byte mode) - { - fixed (byte* pfilename = filename) - { - fixed (byte* pmode = &mode) - { - ImFileHandle ret = ImGuiPNative.ImFileOpen((byte*)pfilename, (byte*)pmode); - return ret; - } - } - } - public static ImFileHandle ImFileOpen(ReadOnlySpan filename, string mode) - { - fixed (byte* pfilename = filename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImFileHandle ret = ImGuiPNative.ImFileOpen((byte*)pfilename, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static ImFileHandle ImFileOpen(string filename, ref byte mode) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pmode = &mode) - { - ImFileHandle ret = ImGuiPNative.ImFileOpen(pStr0, (byte*)pmode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static ImFileHandle ImFileOpen(string filename, ReadOnlySpan mode) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pmode = mode) - { - ImFileHandle ret = ImGuiPNative.ImFileOpen(pStr0, (byte*)pmode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } public static bool ImFileClose(ImFileHandle file) { byte ret = ImGuiPNative.ImFileClose(file); @@ -19797,1190 +117,6 @@ public unsafe partial class ImGuiP ulong ret = ImGuiPNative.ImFileWrite(data, size, count, file); return ret; } - public static void* ImFileLoadToMemory(byte* filename, byte* mode, nuint* outFileSize, int paddingBytes) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, mode, outFileSize, paddingBytes); - return ret; - } - public static void* ImFileLoadToMemory(byte* filename, byte* mode, nuint* outFileSize) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, mode, outFileSize, (int)(0)); - return ret; - } - public static void* ImFileLoadToMemory(byte* filename, byte* mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, mode, (nuint*)(default), (int)(0)); - return ret; - } - public static void* ImFileLoadToMemory(byte* filename, byte* mode, int paddingBytes) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, mode, (nuint*)(default), paddingBytes); - return ret; - } - public static void* ImFileLoadToMemory(ref byte filename, byte* mode, nuint* outFileSize, int paddingBytes) - { - fixed (byte* pfilename = &filename) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, mode, outFileSize, paddingBytes); - return ret; - } - } - public static void* ImFileLoadToMemory(ref byte filename, byte* mode, nuint* outFileSize) - { - fixed (byte* pfilename = &filename) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, mode, outFileSize, (int)(0)); - return ret; - } - } - public static void* ImFileLoadToMemory(ref byte filename, byte* mode) - { - fixed (byte* pfilename = &filename) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, mode, (nuint*)(default), (int)(0)); - return ret; - } - } - public static void* ImFileLoadToMemory(ref byte filename, byte* mode, int paddingBytes) - { - fixed (byte* pfilename = &filename) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, mode, (nuint*)(default), paddingBytes); - return ret; - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, byte* mode, nuint* outFileSize, int paddingBytes) - { - fixed (byte* pfilename = filename) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, mode, outFileSize, paddingBytes); - return ret; - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, byte* mode, nuint* outFileSize) - { - fixed (byte* pfilename = filename) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, mode, outFileSize, (int)(0)); - return ret; - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, byte* mode) - { - fixed (byte* pfilename = filename) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, mode, (nuint*)(default), (int)(0)); - return ret; - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, byte* mode, int paddingBytes) - { - fixed (byte* pfilename = filename) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, mode, (nuint*)(default), paddingBytes); - return ret; - } - } - public static void* ImFileLoadToMemory(string filename, byte* mode, nuint* outFileSize, int paddingBytes) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, mode, outFileSize, paddingBytes); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void* ImFileLoadToMemory(string filename, byte* mode, nuint* outFileSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, mode, outFileSize, (int)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void* ImFileLoadToMemory(string filename, byte* mode) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, mode, (nuint*)(default), (int)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void* ImFileLoadToMemory(string filename, byte* mode, int paddingBytes) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, mode, (nuint*)(default), paddingBytes); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void* ImFileLoadToMemory(byte* filename, ref byte mode, nuint* outFileSize, int paddingBytes) - { - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, (byte*)pmode, outFileSize, paddingBytes); - return ret; - } - } - public static void* ImFileLoadToMemory(byte* filename, ref byte mode, nuint* outFileSize) - { - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, (byte*)pmode, outFileSize, (int)(0)); - return ret; - } - } - public static void* ImFileLoadToMemory(byte* filename, ref byte mode) - { - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, (byte*)pmode, (nuint*)(default), (int)(0)); - return ret; - } - } - public static void* ImFileLoadToMemory(byte* filename, ref byte mode, int paddingBytes) - { - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, (byte*)pmode, (nuint*)(default), paddingBytes); - return ret; - } - } - public static void* ImFileLoadToMemory(byte* filename, ReadOnlySpan mode, nuint* outFileSize, int paddingBytes) - { - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, (byte*)pmode, outFileSize, paddingBytes); - return ret; - } - } - public static void* ImFileLoadToMemory(byte* filename, ReadOnlySpan mode, nuint* outFileSize) - { - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, (byte*)pmode, outFileSize, (int)(0)); - return ret; - } - } - public static void* ImFileLoadToMemory(byte* filename, ReadOnlySpan mode) - { - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, (byte*)pmode, (nuint*)(default), (int)(0)); - return ret; - } - } - public static void* ImFileLoadToMemory(byte* filename, ReadOnlySpan mode, int paddingBytes) - { - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, (byte*)pmode, (nuint*)(default), paddingBytes); - return ret; - } - } - public static void* ImFileLoadToMemory(byte* filename, string mode, nuint* outFileSize, int paddingBytes) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, pStr0, outFileSize, paddingBytes); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void* ImFileLoadToMemory(byte* filename, string mode, nuint* outFileSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, pStr0, outFileSize, (int)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void* ImFileLoadToMemory(byte* filename, string mode) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, pStr0, (nuint*)(default), (int)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void* ImFileLoadToMemory(byte* filename, string mode, int paddingBytes) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory(filename, pStr0, (nuint*)(default), paddingBytes); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void* ImFileLoadToMemory(ref byte filename, ref byte mode, nuint* outFileSize, int paddingBytes) - { - fixed (byte* pfilename = &filename) - { - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, outFileSize, paddingBytes); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ref byte filename, ref byte mode, nuint* outFileSize) - { - fixed (byte* pfilename = &filename) - { - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, outFileSize, (int)(0)); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ref byte filename, ref byte mode) - { - fixed (byte* pfilename = &filename) - { - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, (nuint*)(default), (int)(0)); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ref byte filename, ref byte mode, int paddingBytes) - { - fixed (byte* pfilename = &filename) - { - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, (nuint*)(default), paddingBytes); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, ReadOnlySpan mode, nuint* outFileSize, int paddingBytes) - { - fixed (byte* pfilename = filename) - { - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, outFileSize, paddingBytes); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, ReadOnlySpan mode, nuint* outFileSize) - { - fixed (byte* pfilename = filename) - { - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, outFileSize, (int)(0)); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, ReadOnlySpan mode) - { - fixed (byte* pfilename = filename) - { - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, (nuint*)(default), (int)(0)); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, ReadOnlySpan mode, int paddingBytes) - { - fixed (byte* pfilename = filename) - { - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, (nuint*)(default), paddingBytes); - return ret; - } - } - } - public static void* ImFileLoadToMemory(string filename, string mode, nuint* outFileSize, int paddingBytes) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (mode != null) - { - pStrSize1 = Utils.GetByteCountUTF8(mode); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(mode, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, pStr1, outFileSize, paddingBytes); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void* ImFileLoadToMemory(string filename, string mode, nuint* outFileSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (mode != null) - { - pStrSize1 = Utils.GetByteCountUTF8(mode); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(mode, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, pStr1, outFileSize, (int)(0)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void* ImFileLoadToMemory(string filename, string mode) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (mode != null) - { - pStrSize1 = Utils.GetByteCountUTF8(mode); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(mode, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, pStr1, (nuint*)(default), (int)(0)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void* ImFileLoadToMemory(string filename, string mode, int paddingBytes) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (mode != null) - { - pStrSize1 = Utils.GetByteCountUTF8(mode); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(mode, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, pStr1, (nuint*)(default), paddingBytes); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void* ImFileLoadToMemory(ref byte filename, ReadOnlySpan mode, nuint* outFileSize, int paddingBytes) - { - fixed (byte* pfilename = &filename) - { - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, outFileSize, paddingBytes); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ref byte filename, ReadOnlySpan mode, nuint* outFileSize) - { - fixed (byte* pfilename = &filename) - { - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, outFileSize, (int)(0)); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ref byte filename, ReadOnlySpan mode) - { - fixed (byte* pfilename = &filename) - { - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, (nuint*)(default), (int)(0)); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ref byte filename, ReadOnlySpan mode, int paddingBytes) - { - fixed (byte* pfilename = &filename) - { - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, (nuint*)(default), paddingBytes); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ref byte filename, string mode, nuint* outFileSize, int paddingBytes) - { - fixed (byte* pfilename = &filename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, pStr0, outFileSize, paddingBytes); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(ref byte filename, string mode, nuint* outFileSize) - { - fixed (byte* pfilename = &filename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, pStr0, outFileSize, (int)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(ref byte filename, string mode) - { - fixed (byte* pfilename = &filename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, pStr0, (nuint*)(default), (int)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(ref byte filename, string mode, int paddingBytes) - { - fixed (byte* pfilename = &filename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, pStr0, (nuint*)(default), paddingBytes); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, ref byte mode, nuint* outFileSize, int paddingBytes) - { - fixed (byte* pfilename = filename) - { - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, outFileSize, paddingBytes); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, ref byte mode, nuint* outFileSize) - { - fixed (byte* pfilename = filename) - { - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, outFileSize, (int)(0)); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, ref byte mode) - { - fixed (byte* pfilename = filename) - { - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, (nuint*)(default), (int)(0)); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, ref byte mode, int paddingBytes) - { - fixed (byte* pfilename = filename) - { - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, (byte*)pmode, (nuint*)(default), paddingBytes); - return ret; - } - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, string mode, nuint* outFileSize, int paddingBytes) - { - fixed (byte* pfilename = filename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, pStr0, outFileSize, paddingBytes); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, string mode, nuint* outFileSize) - { - fixed (byte* pfilename = filename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, pStr0, outFileSize, (int)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, string mode) - { - fixed (byte* pfilename = filename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, pStr0, (nuint*)(default), (int)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(ReadOnlySpan filename, string mode, int paddingBytes) - { - fixed (byte* pfilename = filename) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (mode != null) - { - pStrSize0 = Utils.GetByteCountUTF8(mode); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(mode, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - void* ret = ImGuiPNative.ImFileLoadToMemory((byte*)pfilename, pStr0, (nuint*)(default), paddingBytes); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(string filename, ref byte mode, nuint* outFileSize, int paddingBytes) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, (byte*)pmode, outFileSize, paddingBytes); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(string filename, ref byte mode, nuint* outFileSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, (byte*)pmode, outFileSize, (int)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(string filename, ref byte mode) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, (byte*)pmode, (nuint*)(default), (int)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(string filename, ref byte mode, int paddingBytes) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pmode = &mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, (byte*)pmode, (nuint*)(default), paddingBytes); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(string filename, ReadOnlySpan mode, nuint* outFileSize, int paddingBytes) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, (byte*)pmode, outFileSize, paddingBytes); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(string filename, ReadOnlySpan mode, nuint* outFileSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, (byte*)pmode, outFileSize, (int)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(string filename, ReadOnlySpan mode) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, (byte*)pmode, (nuint*)(default), (int)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static void* ImFileLoadToMemory(string filename, ReadOnlySpan mode, int paddingBytes) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (filename != null) - { - pStrSize0 = Utils.GetByteCountUTF8(filename); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(filename, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pmode = mode) - { - void* ret = ImGuiPNative.ImFileLoadToMemory(pStr0, (byte*)pmode, (nuint*)(default), paddingBytes); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } public static float ImPow(float x, float y) { float ret = ImGuiPNative.ImPow(x, y); @@ -23087,112 +2223,6 @@ public unsafe partial class ImGuiP return ret; } } - public static ImGuiWindowPtr ImGuiWindow(ImGuiContextPtr context, byte* name) - { - ImGuiWindowPtr ret = ImGuiPNative.ImGuiWindow(context, name); - return ret; - } - public static ImGuiWindowPtr ImGuiWindow(ref ImGuiContext context, byte* name) - { - fixed (ImGuiContext* pcontext = &context) - { - ImGuiWindowPtr ret = ImGuiPNative.ImGuiWindow((ImGuiContext*)pcontext, name); - return ret; - } - } - public static ImGuiWindowPtr ImGuiWindow(ImGuiContextPtr context, ref byte name) - { - fixed (byte* pname = &name) - { - ImGuiWindowPtr ret = ImGuiPNative.ImGuiWindow(context, (byte*)pname); - return ret; - } - } - public static ImGuiWindowPtr ImGuiWindow(ImGuiContextPtr context, ReadOnlySpan name) - { - fixed (byte* pname = name) - { - ImGuiWindowPtr ret = ImGuiPNative.ImGuiWindow(context, (byte*)pname); - return ret; - } - } - public static ImGuiWindowPtr ImGuiWindow(ImGuiContextPtr context, string name) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiWindowPtr ret = ImGuiPNative.ImGuiWindow(context, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static ImGuiWindowPtr ImGuiWindow(ref ImGuiContext context, ref byte name) - { - fixed (ImGuiContext* pcontext = &context) - { - fixed (byte* pname = &name) - { - ImGuiWindowPtr ret = ImGuiPNative.ImGuiWindow((ImGuiContext*)pcontext, (byte*)pname); - return ret; - } - } - } - public static ImGuiWindowPtr ImGuiWindow(ref ImGuiContext context, ReadOnlySpan name) - { - fixed (ImGuiContext* pcontext = &context) - { - fixed (byte* pname = name) - { - ImGuiWindowPtr ret = ImGuiPNative.ImGuiWindow((ImGuiContext*)pcontext, (byte*)pname); - return ret; - } - } - } - public static ImGuiWindowPtr ImGuiWindow(ref ImGuiContext context, string name) - { - fixed (ImGuiContext* pcontext = &context) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiWindowPtr ret = ImGuiPNative.ImGuiWindow((ImGuiContext*)pcontext, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } public static uint GetIDFromRectangle(ImGuiWindowPtr self, ImRect rAbs) { uint ret = ImGuiPNative.GetIDFromRectangle(self, rAbs); @@ -23495,53 +2525,6 @@ public unsafe partial class ImGuiP ImGuiWindowPtr ret = ImGuiPNative.FindWindowByID(id); return ret; } - public static ImGuiWindowPtr FindWindowByName(byte* name) - { - ImGuiWindowPtr ret = ImGuiPNative.FindWindowByName(name); - return ret; - } - public static ImGuiWindowPtr FindWindowByName(ref byte name) - { - fixed (byte* pname = &name) - { - ImGuiWindowPtr ret = ImGuiPNative.FindWindowByName((byte*)pname); - return ret; - } - } - public static ImGuiWindowPtr FindWindowByName(ReadOnlySpan name) - { - fixed (byte* pname = name) - { - ImGuiWindowPtr ret = ImGuiPNative.FindWindowByName((byte*)pname); - return ret; - } - } - public static ImGuiWindowPtr FindWindowByName(string name) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiWindowPtr ret = ImGuiPNative.FindWindowByName(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } public static void UpdateWindowParentAndRootLinks(ImGuiWindowPtr window, ImGuiWindowFlags flags, ImGuiWindowPtr parentWindow) { ImGuiPNative.UpdateWindowParentAndRootLinks(window, flags, parentWindow); @@ -24283,105 +3266,11 @@ public unsafe partial class ImGuiP { ImGuiPNative.ClearIniSettings(); } - public static ImGuiWindowSettingsPtr CreateNewWindowSettings(byte* name) - { - ImGuiWindowSettingsPtr ret = ImGuiPNative.CreateNewWindowSettings(name); - return ret; - } - public static ImGuiWindowSettingsPtr CreateNewWindowSettings(ref byte name) - { - fixed (byte* pname = &name) - { - ImGuiWindowSettingsPtr ret = ImGuiPNative.CreateNewWindowSettings((byte*)pname); - return ret; - } - } - public static ImGuiWindowSettingsPtr CreateNewWindowSettings(ReadOnlySpan name) - { - fixed (byte* pname = name) - { - ImGuiWindowSettingsPtr ret = ImGuiPNative.CreateNewWindowSettings((byte*)pname); - return ret; - } - } - public static ImGuiWindowSettingsPtr CreateNewWindowSettings(string name) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiWindowSettingsPtr ret = ImGuiPNative.CreateNewWindowSettings(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } public static ImGuiWindowSettingsPtr FindWindowSettings(uint id) { ImGuiWindowSettingsPtr ret = ImGuiPNative.FindWindowSettings(id); return ret; } - public static ImGuiWindowSettingsPtr FindOrCreateWindowSettings(byte* name) - { - ImGuiWindowSettingsPtr ret = ImGuiPNative.FindOrCreateWindowSettings(name); - return ret; - } - public static ImGuiWindowSettingsPtr FindOrCreateWindowSettings(ref byte name) - { - fixed (byte* pname = &name) - { - ImGuiWindowSettingsPtr ret = ImGuiPNative.FindOrCreateWindowSettings((byte*)pname); - return ret; - } - } - public static ImGuiWindowSettingsPtr FindOrCreateWindowSettings(ReadOnlySpan name) - { - fixed (byte* pname = name) - { - ImGuiWindowSettingsPtr ret = ImGuiPNative.FindOrCreateWindowSettings((byte*)pname); - return ret; - } - } - public static ImGuiWindowSettingsPtr FindOrCreateWindowSettings(string name) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiWindowSettingsPtr ret = ImGuiPNative.FindOrCreateWindowSettings(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } public static void AddSettingsHandler(ImGuiSettingsHandlerPtr handler) { ImGuiPNative.AddSettingsHandler(handler); @@ -24393,96 +3282,6 @@ public unsafe partial class ImGuiP ImGuiPNative.AddSettingsHandler((ImGuiSettingsHandler*)phandler); } } - public static void RemoveSettingsHandler(byte* typeName) - { - ImGuiPNative.RemoveSettingsHandler(typeName); - } - public static void RemoveSettingsHandler(ref byte typeName) - { - fixed (byte* ptypeName = &typeName) - { - ImGuiPNative.RemoveSettingsHandler((byte*)ptypeName); - } - } - public static void RemoveSettingsHandler(ReadOnlySpan typeName) - { - fixed (byte* ptypeName = typeName) - { - ImGuiPNative.RemoveSettingsHandler((byte*)ptypeName); - } - } - public static void RemoveSettingsHandler(string typeName) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (typeName != null) - { - pStrSize0 = Utils.GetByteCountUTF8(typeName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(typeName, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.RemoveSettingsHandler(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static ImGuiSettingsHandlerPtr FindSettingsHandler(byte* typeName) - { - ImGuiSettingsHandlerPtr ret = ImGuiPNative.FindSettingsHandler(typeName); - return ret; - } - public static ImGuiSettingsHandlerPtr FindSettingsHandler(ref byte typeName) - { - fixed (byte* ptypeName = &typeName) - { - ImGuiSettingsHandlerPtr ret = ImGuiPNative.FindSettingsHandler((byte*)ptypeName); - return ret; - } - } - public static ImGuiSettingsHandlerPtr FindSettingsHandler(ReadOnlySpan typeName) - { - fixed (byte* ptypeName = typeName) - { - ImGuiSettingsHandlerPtr ret = ImGuiPNative.FindSettingsHandler((byte*)ptypeName); - return ret; - } - } - public static ImGuiSettingsHandlerPtr FindSettingsHandler(string typeName) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (typeName != null) - { - pStrSize0 = Utils.GetByteCountUTF8(typeName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(typeName, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiSettingsHandlerPtr ret = ImGuiPNative.FindSettingsHandler(pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } public static void SetNextWindowScroll(Vector2 scroll) { ImGuiPNative.SetNextWindowScroll(scroll); @@ -24875,333 +3674,6 @@ public unsafe partial class ImGuiP { ImGuiPNative.LogToBuffer((int)(-1)); } - public static void LogSetNextTextDecoration(byte* prefix, byte* suffix) - { - ImGuiPNative.LogSetNextTextDecoration(prefix, suffix); - } - public static void LogSetNextTextDecoration(ref byte prefix, byte* suffix) - { - fixed (byte* pprefix = &prefix) - { - ImGuiPNative.LogSetNextTextDecoration((byte*)pprefix, suffix); - } - } - public static void LogSetNextTextDecoration(ReadOnlySpan prefix, byte* suffix) - { - fixed (byte* pprefix = prefix) - { - ImGuiPNative.LogSetNextTextDecoration((byte*)pprefix, suffix); - } - } - public static void LogSetNextTextDecoration(string prefix, byte* suffix) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (prefix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(prefix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.LogSetNextTextDecoration(pStr0, suffix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void LogSetNextTextDecoration(byte* prefix, ref byte suffix) - { - fixed (byte* psuffix = &suffix) - { - ImGuiPNative.LogSetNextTextDecoration(prefix, (byte*)psuffix); - } - } - public static void LogSetNextTextDecoration(byte* prefix, ReadOnlySpan suffix) - { - fixed (byte* psuffix = suffix) - { - ImGuiPNative.LogSetNextTextDecoration(prefix, (byte*)psuffix); - } - } - public static void LogSetNextTextDecoration(byte* prefix, string suffix) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (suffix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(suffix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(suffix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.LogSetNextTextDecoration(prefix, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void LogSetNextTextDecoration(ref byte prefix, ref byte suffix) - { - fixed (byte* pprefix = &prefix) - { - fixed (byte* psuffix = &suffix) - { - ImGuiPNative.LogSetNextTextDecoration((byte*)pprefix, (byte*)psuffix); - } - } - } - public static void LogSetNextTextDecoration(ReadOnlySpan prefix, ReadOnlySpan suffix) - { - fixed (byte* pprefix = prefix) - { - fixed (byte* psuffix = suffix) - { - ImGuiPNative.LogSetNextTextDecoration((byte*)pprefix, (byte*)psuffix); - } - } - } - public static void LogSetNextTextDecoration(string prefix, string suffix) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (prefix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(prefix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (suffix != null) - { - pStrSize1 = Utils.GetByteCountUTF8(suffix); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(suffix, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - ImGuiPNative.LogSetNextTextDecoration(pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void LogSetNextTextDecoration(ref byte prefix, ReadOnlySpan suffix) - { - fixed (byte* pprefix = &prefix) - { - fixed (byte* psuffix = suffix) - { - ImGuiPNative.LogSetNextTextDecoration((byte*)pprefix, (byte*)psuffix); - } - } - } - public static void LogSetNextTextDecoration(ref byte prefix, string suffix) - { - fixed (byte* pprefix = &prefix) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (suffix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(suffix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(suffix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.LogSetNextTextDecoration((byte*)pprefix, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void LogSetNextTextDecoration(ReadOnlySpan prefix, ref byte suffix) - { - fixed (byte* pprefix = prefix) - { - fixed (byte* psuffix = &suffix) - { - ImGuiPNative.LogSetNextTextDecoration((byte*)pprefix, (byte*)psuffix); - } - } - } - public static void LogSetNextTextDecoration(ReadOnlySpan prefix, string suffix) - { - fixed (byte* pprefix = prefix) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (suffix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(suffix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(suffix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.LogSetNextTextDecoration((byte*)pprefix, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void LogSetNextTextDecoration(string prefix, ref byte suffix) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (prefix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(prefix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* psuffix = &suffix) - { - ImGuiPNative.LogSetNextTextDecoration(pStr0, (byte*)psuffix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void LogSetNextTextDecoration(string prefix, ReadOnlySpan suffix) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (prefix != null) - { - pStrSize0 = Utils.GetByteCountUTF8(prefix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* psuffix = suffix) - { - ImGuiPNative.LogSetNextTextDecoration(pStr0, (byte*)psuffix); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static bool BeginChildEx(byte* name, uint id, Vector2 sizeArg, bool border, ImGuiWindowFlags flags) - { - byte ret = ImGuiPNative.BeginChildEx(name, id, sizeArg, border ? (byte)1 : (byte)0, flags); - return ret != 0; - } - public static bool BeginChildEx(ref byte name, uint id, Vector2 sizeArg, bool border, ImGuiWindowFlags flags) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiPNative.BeginChildEx((byte*)pname, id, sizeArg, border ? (byte)1 : (byte)0, flags); - return ret != 0; - } - } - public static bool BeginChildEx(ReadOnlySpan name, uint id, Vector2 sizeArg, bool border, ImGuiWindowFlags flags) - { - fixed (byte* pname = name) - { - byte ret = ImGuiPNative.BeginChildEx((byte*)pname, id, sizeArg, border ? (byte)1 : (byte)0, flags); - return ret != 0; - } - } - public static bool BeginChildEx(string name, uint id, Vector2 sizeArg, bool border, ImGuiWindowFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginChildEx(pStr0, id, sizeArg, border ? (byte)1 : (byte)0, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static void OpenPopupEx(uint id, ImGuiPopupFlags popupFlags) { ImGuiPNative.OpenPopupEx(id, popupFlags); @@ -25356,6440 +3828,6 @@ public unsafe partial class ImGuiP ImGuiPNative.FindBestWindowPosForPopupEx((Vector2*)ppOut, refPos, size, lastDir, rOuter, rAvoid, policy); } } - public static bool BeginViewportSideBar(byte* name, ImGuiViewportPtr viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) - { - byte ret = ImGuiPNative.BeginViewportSideBar(name, viewport, dir, size, windowFlags); - return ret != 0; - } - public static bool BeginViewportSideBar(ref byte name, ImGuiViewportPtr viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiPNative.BeginViewportSideBar((byte*)pname, viewport, dir, size, windowFlags); - return ret != 0; - } - } - public static bool BeginViewportSideBar(ReadOnlySpan name, ImGuiViewportPtr viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) - { - fixed (byte* pname = name) - { - byte ret = ImGuiPNative.BeginViewportSideBar((byte*)pname, viewport, dir, size, windowFlags); - return ret != 0; - } - } - public static bool BeginViewportSideBar(string name, ImGuiViewportPtr viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginViewportSideBar(pStr0, viewport, dir, size, windowFlags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginViewportSideBar(byte* name, ref ImGuiViewport viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) - { - fixed (ImGuiViewport* pviewport = &viewport) - { - byte ret = ImGuiPNative.BeginViewportSideBar(name, (ImGuiViewport*)pviewport, dir, size, windowFlags); - return ret != 0; - } - } - public static bool BeginViewportSideBar(ref byte name, ref ImGuiViewport viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) - { - fixed (byte* pname = &name) - { - fixed (ImGuiViewport* pviewport = &viewport) - { - byte ret = ImGuiPNative.BeginViewportSideBar((byte*)pname, (ImGuiViewport*)pviewport, dir, size, windowFlags); - return ret != 0; - } - } - } - public static bool BeginViewportSideBar(ReadOnlySpan name, ref ImGuiViewport viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) - { - fixed (byte* pname = name) - { - fixed (ImGuiViewport* pviewport = &viewport) - { - byte ret = ImGuiPNative.BeginViewportSideBar((byte*)pname, (ImGuiViewport*)pviewport, dir, size, windowFlags); - return ret != 0; - } - } - } - public static bool BeginViewportSideBar(string name, ref ImGuiViewport viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (ImGuiViewport* pviewport = &viewport) - { - byte ret = ImGuiPNative.BeginViewportSideBar(pStr0, (ImGuiViewport*)pviewport, dir, size, windowFlags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginMenuEx(byte* label, byte* icon, bool enabled) - { - byte ret = ImGuiPNative.BeginMenuEx(label, icon, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - public static bool BeginMenuEx(byte* label, byte* icon) - { - byte ret = ImGuiPNative.BeginMenuEx(label, icon, (byte)(1)); - return ret != 0; - } - public static bool BeginMenuEx(ref byte label, byte* icon, bool enabled) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, icon, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool BeginMenuEx(ref byte label, byte* icon) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, icon, (byte)(1)); - return ret != 0; - } - } - public static bool BeginMenuEx(ReadOnlySpan label, byte* icon, bool enabled) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, icon, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool BeginMenuEx(ReadOnlySpan label, byte* icon) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, icon, (byte)(1)); - return ret != 0; - } - } - public static bool BeginMenuEx(string label, byte* icon, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginMenuEx(pStr0, icon, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginMenuEx(string label, byte* icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginMenuEx(pStr0, icon, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginMenuEx(byte* label, ref byte icon, bool enabled) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.BeginMenuEx(label, (byte*)picon, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool BeginMenuEx(byte* label, ref byte icon) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.BeginMenuEx(label, (byte*)picon, (byte)(1)); - return ret != 0; - } - } - public static bool BeginMenuEx(byte* label, ReadOnlySpan icon, bool enabled) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.BeginMenuEx(label, (byte*)picon, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool BeginMenuEx(byte* label, ReadOnlySpan icon) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.BeginMenuEx(label, (byte*)picon, (byte)(1)); - return ret != 0; - } - } - public static bool BeginMenuEx(byte* label, string icon, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginMenuEx(label, pStr0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginMenuEx(byte* label, string icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginMenuEx(label, pStr0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginMenuEx(ref byte label, ref byte icon, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, (byte*)picon, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool BeginMenuEx(ref byte label, ref byte icon) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, (byte*)picon, (byte)(1)); - return ret != 0; - } - } - } - public static bool BeginMenuEx(ReadOnlySpan label, ReadOnlySpan icon, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, (byte*)picon, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool BeginMenuEx(ReadOnlySpan label, ReadOnlySpan icon) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, (byte*)picon, (byte)(1)); - return ret != 0; - } - } - } - public static bool BeginMenuEx(string label, string icon, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.BeginMenuEx(pStr0, pStr1, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginMenuEx(string label, string icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.BeginMenuEx(pStr0, pStr1, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginMenuEx(ref byte label, ReadOnlySpan icon, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, (byte*)picon, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool BeginMenuEx(ref byte label, ReadOnlySpan icon) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, (byte*)picon, (byte)(1)); - return ret != 0; - } - } - } - public static bool BeginMenuEx(ref byte label, string icon, bool enabled) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, pStr0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginMenuEx(ref byte label, string icon) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, pStr0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginMenuEx(ReadOnlySpan label, ref byte icon, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, (byte*)picon, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool BeginMenuEx(ReadOnlySpan label, ref byte icon) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, (byte*)picon, (byte)(1)); - return ret != 0; - } - } - } - public static bool BeginMenuEx(ReadOnlySpan label, string icon, bool enabled) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, pStr0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginMenuEx(ReadOnlySpan label, string icon) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginMenuEx((byte*)plabel, pStr0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginMenuEx(string label, ref byte icon, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.BeginMenuEx(pStr0, (byte*)picon, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginMenuEx(string label, ref byte icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.BeginMenuEx(pStr0, (byte*)picon, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginMenuEx(string label, ReadOnlySpan icon, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.BeginMenuEx(pStr0, (byte*)picon, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool BeginMenuEx(string label, ReadOnlySpan icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.BeginMenuEx(pStr0, (byte*)picon, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, byte* icon, byte* shortcut, bool selected, bool enabled) - { - byte ret = ImGuiPNative.MenuItemEx(label, icon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - public static bool MenuItemEx(byte* label, byte* icon, byte* shortcut, bool selected) - { - byte ret = ImGuiPNative.MenuItemEx(label, icon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - public static bool MenuItemEx(byte* label, byte* icon, byte* shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, icon, shortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - public static bool MenuItemEx(byte* label, byte* icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, icon, (byte*)(default), (byte)(0), (byte)(1)); - return ret != 0; - } - public static bool MenuItemEx(byte* label, byte* icon, bool selected) - { - byte ret = ImGuiPNative.MenuItemEx(label, icon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - public static bool MenuItemEx(byte* label, byte* icon, bool selected, bool enabled) - { - byte ret = ImGuiPNative.MenuItemEx(label, icon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - public static bool MenuItemEx(ref byte label, byte* icon, byte* shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, byte* icon, byte* shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, byte* icon, byte* shortcut) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, shortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, byte* icon) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)(default), (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, byte* icon, bool selected) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, byte* icon, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, byte* shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, byte* shortcut, bool selected) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, byte* shortcut) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, shortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)(default), (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, bool selected) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItemEx(string label, byte* icon, byte* shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, byte* icon, byte* shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, byte* icon, byte* shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, shortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, byte* icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, (byte*)(default), (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, byte* icon, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, byte* icon, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(byte* label, ref byte icon, byte* shortcut, bool selected, bool enabled) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ref byte icon, byte* shortcut, bool selected) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ref byte icon, byte* shortcut) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, shortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ref byte icon) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ref byte icon, bool selected) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ref byte icon, bool selected, bool enabled) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, byte* shortcut, bool selected, bool enabled) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, byte* shortcut, bool selected) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, byte* shortcut) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, shortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, bool selected) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, bool selected, bool enabled) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, string icon, byte* shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(byte* label, string icon, byte* shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(byte* label, string icon, byte* shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, shortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(byte* label, string icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, (byte*)(default), (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(byte* label, string icon, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(byte* label, string icon, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(ref byte label, ref byte icon, byte* shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ref byte icon, byte* shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ref byte icon, byte* shortcut) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, shortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ref byte icon) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ref byte icon, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ref byte icon, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, byte* shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, byte* shortcut, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, byte* shortcut) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, shortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, string icon, byte* shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, string icon, byte* shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, string icon, byte* shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, shortcut, (byte)(0), (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, string icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, (byte*)(default), (byte)(0), (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, string icon, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, string icon, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, byte* shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, byte* shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, byte* shortcut) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, shortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, string icon, byte* shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, string icon, byte* shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, string icon, byte* shortcut) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, shortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, string icon) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)(default), (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, string icon, bool selected) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, string icon, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, byte* shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, byte* shortcut, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, byte* shortcut) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, shortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, byte* shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, byte* shortcut, bool selected) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, byte* shortcut) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, shortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)(default), (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, bool selected) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ref byte icon, byte* shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ref byte icon, byte* shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ref byte icon, byte* shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, shortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ref byte icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ref byte icon, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ref byte icon, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, byte* shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, byte* shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, byte* shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, shortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, byte* icon, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, byte* icon, ref byte shortcut, bool selected) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, byte* icon, ref byte shortcut) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, byte* icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, byte* icon, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, byte* icon, ReadOnlySpan shortcut) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, byte* icon, string shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, icon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(byte* label, byte* icon, string shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, icon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(byte* label, byte* icon, string shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, icon, pStr0, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(ref byte label, byte* icon, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, byte* icon, ref byte shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, byte* icon, ref byte shortcut) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ReadOnlySpan shortcut) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, byte* icon, string shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, pStr1, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, byte* icon, string shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, pStr1, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, byte* icon, string shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, pStr1, (byte)(0), (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(ref byte label, byte* icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, byte* icon, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, byte* icon, ReadOnlySpan shortcut) - { - fixed (byte* plabel = &label) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, byte* icon, string shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, byte* icon, string shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, byte* icon, string shortcut) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, pStr0, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ref byte shortcut, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ref byte shortcut) - { - fixed (byte* plabel = label) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, string shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, string shortcut, bool selected) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, byte* icon, string shortcut) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, icon, pStr0, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, byte* icon, ref byte shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, byte* icon, ref byte shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, byte* icon, ref byte shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, byte* icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, byte* icon, ReadOnlySpan shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, byte* icon, ReadOnlySpan shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ref byte icon, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(byte* label, ref byte icon, ref byte shortcut, bool selected) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(byte* label, ref byte icon, ref byte shortcut) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ReadOnlySpan shortcut) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(byte* label, string icon, string shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, pStr1, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(byte* label, string icon, string shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, pStr1, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(byte* label, string icon, string shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, pStr1, (byte)(0), (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(byte* label, ref byte icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(byte* label, ref byte icon, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(byte* label, ref byte icon, ReadOnlySpan shortcut) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(byte* label, ref byte icon, string shortcut, bool selected, bool enabled) - { - fixed (byte* picon = &icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ref byte icon, string shortcut, bool selected) - { - fixed (byte* picon = &icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ref byte icon, string shortcut) - { - fixed (byte* picon = &icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, pStr0, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ref byte shortcut, bool selected) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ref byte shortcut) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, string shortcut, bool selected, bool enabled) - { - fixed (byte* picon = icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, string shortcut, bool selected) - { - fixed (byte* picon = icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, ReadOnlySpan icon, string shortcut) - { - fixed (byte* picon = icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(label, (byte*)picon, pStr0, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, string icon, ref byte shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, string icon, ref byte shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, string icon, ref byte shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, string icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, string icon, ReadOnlySpan shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(byte* label, string icon, ReadOnlySpan shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(label, pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, ref byte icon, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ref byte label, ref byte icon, ref byte shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ref byte label, ref byte icon, ref byte shortcut) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, ReadOnlySpan shortcut) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(string label, string icon, string shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (shortcut != null) - { - pStrSize2 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(shortcut, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, pStr2, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, string icon, string shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (shortcut != null) - { - pStrSize2 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(shortcut, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, pStr2, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(string label, string icon, string shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte* pStr2 = null; - int pStrSize2 = 0; - if (shortcut != null) - { - pStrSize2 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - pStr2 = Utils.Alloc(pStrSize2 + 1); - } - else - { - byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; - pStr2 = pStrStack2; - } - int pStrOffset2 = Utils.EncodeStringUTF8(shortcut, pStr2, pStrSize2); - pStr2[pStrOffset2] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, pStr2, (byte)(0), (byte)(1)); - if (pStrSize2 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr2); - } - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool MenuItemEx(ref byte label, ref byte icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ref byte label, ref byte icon, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ref byte label, ref byte icon, ReadOnlySpan shortcut) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ref byte label, ref byte icon, string shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ref byte icon, string shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ref byte icon, string shortcut) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = &icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, pStr0, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, ref byte shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, ref byte shortcut) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, ReadOnlySpan shortcut) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, string shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, string shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, string shortcut) - { - fixed (byte* plabel = &label) - { - fixed (byte* picon = icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, pStr0, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, string icon, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, string icon, ref byte shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, string icon, ref byte shortcut) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, string icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, string icon, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, string icon, ReadOnlySpan shortcut) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ref byte label, string icon, string shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, pStr1, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, string icon, string shortcut, bool selected) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, pStr1, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ref byte label, string icon, string shortcut) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, pStr1, (byte)(0), (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, ref byte shortcut, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, ref byte shortcut) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, ReadOnlySpan shortcut) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, string shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, string shortcut, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, string shortcut) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = &icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, pStr0, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, ref byte shortcut, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, ref byte shortcut) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - return ret != 0; - } - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, string shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, string shortcut, bool selected) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, string shortcut) - { - fixed (byte* plabel = label) - { - fixed (byte* picon = icon) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (shortcut != null) - { - pStrSize0 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, (byte*)picon, pStr0, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, ref byte shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, ref byte shortcut, bool selected) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, ref byte shortcut) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, ReadOnlySpan shortcut, bool selected) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, ReadOnlySpan shortcut) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, string shortcut, bool selected, bool enabled) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, pStr1, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, string shortcut, bool selected) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, pStr1, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(ReadOnlySpan label, string icon, string shortcut) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (icon != null) - { - pStrSize0 = Utils.GetByteCountUTF8(icon); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx((byte*)plabel, pStr0, pStr1, (byte)(0), (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ref byte icon, ref byte shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, ref byte icon, ref byte shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, ref byte icon, ref byte shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, ref byte icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, ref byte icon, ReadOnlySpan shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, ref byte icon, ReadOnlySpan shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, ref byte icon, string shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, pStr1, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ref byte icon, string shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, pStr1, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ref byte icon, string shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = &icon) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, pStr1, (byte)(0), (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, ref byte shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, ref byte shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, ref byte shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, ReadOnlySpan shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, ReadOnlySpan shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, string shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, pStr1, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, string shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, pStr1, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, ReadOnlySpan icon, string shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* picon = icon) - { - byte* pStr1 = null; - int pStrSize1 = 0; - if (shortcut != null) - { - pStrSize1 = Utils.GetByteCountUTF8(shortcut); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.MenuItemEx(pStr0, (byte*)picon, pStr1, (byte)(0), (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, string icon, ref byte shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, string icon, ref byte shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, string icon, ref byte shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pshortcut = &shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, string icon, ReadOnlySpan shortcut, bool selected, bool enabled) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, string icon, ReadOnlySpan shortcut, bool selected) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool MenuItemEx(string label, string icon, ReadOnlySpan shortcut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (icon != null) - { - pStrSize1 = Utils.GetByteCountUTF8(icon); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - fixed (byte* pshortcut = shortcut) - { - byte ret = ImGuiPNative.MenuItemEx(pStr0, pStr1, (byte*)pshortcut, (byte)(0), (byte)(1)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } public static bool BeginComboPopup(uint popupId, ImRect bb, ImGuiComboFlags flags) { byte ret = ImGuiPNative.BeginComboPopup(popupId, bb, flags); @@ -32701,49 +4739,6 @@ public unsafe partial class ImGuiP ImGuiPNative.SetWindowDock((ImGuiWindow*)pwindow, dockId, cond); } } - public static void DockBuilderDockWindow(byte* windowName, uint nodeId) - { - ImGuiPNative.DockBuilderDockWindow(windowName, nodeId); - } - public static void DockBuilderDockWindow(ref byte windowName, uint nodeId) - { - fixed (byte* pwindowName = &windowName) - { - ImGuiPNative.DockBuilderDockWindow((byte*)pwindowName, nodeId); - } - } - public static void DockBuilderDockWindow(ReadOnlySpan windowName, uint nodeId) - { - fixed (byte* pwindowName = windowName) - { - ImGuiPNative.DockBuilderDockWindow((byte*)pwindowName, nodeId); - } - } - public static void DockBuilderDockWindow(string windowName, uint nodeId) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (windowName != null) - { - pStrSize0 = Utils.GetByteCountUTF8(windowName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(windowName, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DockBuilderDockWindow(pStr0, nodeId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static ImGuiDockNodePtr DockBuilderGetNode(uint nodeId) { ImGuiDockNodePtr ret = ImGuiPNative.DockBuilderGetNode(nodeId); @@ -32825,286 +4820,6 @@ public unsafe partial class ImGuiP ImGuiPNative.DockBuilderCopyNode(srcNodeId, dstNodeId, (ImVector*)poutNodeRemapPairs); } } - public static void DockBuilderCopyWindowSettings(byte* srcName, byte* dstName) - { - ImGuiPNative.DockBuilderCopyWindowSettings(srcName, dstName); - } - public static void DockBuilderCopyWindowSettings(ref byte srcName, byte* dstName) - { - fixed (byte* psrcName = &srcName) - { - ImGuiPNative.DockBuilderCopyWindowSettings((byte*)psrcName, dstName); - } - } - public static void DockBuilderCopyWindowSettings(ReadOnlySpan srcName, byte* dstName) - { - fixed (byte* psrcName = srcName) - { - ImGuiPNative.DockBuilderCopyWindowSettings((byte*)psrcName, dstName); - } - } - public static void DockBuilderCopyWindowSettings(string srcName, byte* dstName) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (srcName != null) - { - pStrSize0 = Utils.GetByteCountUTF8(srcName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(srcName, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DockBuilderCopyWindowSettings(pStr0, dstName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void DockBuilderCopyWindowSettings(byte* srcName, ref byte dstName) - { - fixed (byte* pdstName = &dstName) - { - ImGuiPNative.DockBuilderCopyWindowSettings(srcName, (byte*)pdstName); - } - } - public static void DockBuilderCopyWindowSettings(byte* srcName, ReadOnlySpan dstName) - { - fixed (byte* pdstName = dstName) - { - ImGuiPNative.DockBuilderCopyWindowSettings(srcName, (byte*)pdstName); - } - } - public static void DockBuilderCopyWindowSettings(byte* srcName, string dstName) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dstName != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dstName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dstName, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DockBuilderCopyWindowSettings(srcName, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void DockBuilderCopyWindowSettings(ref byte srcName, ref byte dstName) - { - fixed (byte* psrcName = &srcName) - { - fixed (byte* pdstName = &dstName) - { - ImGuiPNative.DockBuilderCopyWindowSettings((byte*)psrcName, (byte*)pdstName); - } - } - } - public static void DockBuilderCopyWindowSettings(ReadOnlySpan srcName, ReadOnlySpan dstName) - { - fixed (byte* psrcName = srcName) - { - fixed (byte* pdstName = dstName) - { - ImGuiPNative.DockBuilderCopyWindowSettings((byte*)psrcName, (byte*)pdstName); - } - } - } - public static void DockBuilderCopyWindowSettings(string srcName, string dstName) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (srcName != null) - { - pStrSize0 = Utils.GetByteCountUTF8(srcName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(srcName, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (dstName != null) - { - pStrSize1 = Utils.GetByteCountUTF8(dstName); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(dstName, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - ImGuiPNative.DockBuilderCopyWindowSettings(pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void DockBuilderCopyWindowSettings(ref byte srcName, ReadOnlySpan dstName) - { - fixed (byte* psrcName = &srcName) - { - fixed (byte* pdstName = dstName) - { - ImGuiPNative.DockBuilderCopyWindowSettings((byte*)psrcName, (byte*)pdstName); - } - } - } - public static void DockBuilderCopyWindowSettings(ref byte srcName, string dstName) - { - fixed (byte* psrcName = &srcName) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dstName != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dstName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dstName, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DockBuilderCopyWindowSettings((byte*)psrcName, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void DockBuilderCopyWindowSettings(ReadOnlySpan srcName, ref byte dstName) - { - fixed (byte* psrcName = srcName) - { - fixed (byte* pdstName = &dstName) - { - ImGuiPNative.DockBuilderCopyWindowSettings((byte*)psrcName, (byte*)pdstName); - } - } - } - public static void DockBuilderCopyWindowSettings(ReadOnlySpan srcName, string dstName) - { - fixed (byte* psrcName = srcName) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (dstName != null) - { - pStrSize0 = Utils.GetByteCountUTF8(dstName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(dstName, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DockBuilderCopyWindowSettings((byte*)psrcName, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void DockBuilderCopyWindowSettings(string srcName, ref byte dstName) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (srcName != null) - { - pStrSize0 = Utils.GetByteCountUTF8(srcName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(srcName, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pdstName = &dstName) - { - ImGuiPNative.DockBuilderCopyWindowSettings(pStr0, (byte*)pdstName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void DockBuilderCopyWindowSettings(string srcName, ReadOnlySpan dstName) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (srcName != null) - { - pStrSize0 = Utils.GetByteCountUTF8(srcName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(srcName, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pdstName = dstName) - { - ImGuiPNative.DockBuilderCopyWindowSettings(pStr0, (byte*)pdstName); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } public static void DockBuilderFinish(uint nodeId) { ImGuiPNative.DockBuilderFinish(nodeId); @@ -33139,92 +4854,6 @@ public unsafe partial class ImGuiP ImGuiPNative.SetWindowClipRectBeforeSetChannel((ImGuiWindow*)pwindow, clipRect); } } - public static void BeginColumns(byte* strId, int count, ImGuiOldColumnFlags flags) - { - ImGuiPNative.BeginColumns(strId, count, flags); - } - public static void BeginColumns(byte* strId, int count) - { - ImGuiPNative.BeginColumns(strId, count, (ImGuiOldColumnFlags)(0)); - } - public static void BeginColumns(ref byte strId, int count, ImGuiOldColumnFlags flags) - { - fixed (byte* pstrId = &strId) - { - ImGuiPNative.BeginColumns((byte*)pstrId, count, flags); - } - } - public static void BeginColumns(ref byte strId, int count) - { - fixed (byte* pstrId = &strId) - { - ImGuiPNative.BeginColumns((byte*)pstrId, count, (ImGuiOldColumnFlags)(0)); - } - } - public static void BeginColumns(ReadOnlySpan strId, int count, ImGuiOldColumnFlags flags) - { - fixed (byte* pstrId = strId) - { - ImGuiPNative.BeginColumns((byte*)pstrId, count, flags); - } - } - public static void BeginColumns(ReadOnlySpan strId, int count) - { - fixed (byte* pstrId = strId) - { - ImGuiPNative.BeginColumns((byte*)pstrId, count, (ImGuiOldColumnFlags)(0)); - } - } - public static void BeginColumns(string strId, int count, ImGuiOldColumnFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.BeginColumns(pStr0, count, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void BeginColumns(string strId, int count) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.BeginColumns(pStr0, count, (ImGuiOldColumnFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static void EndColumns() { ImGuiPNative.EndColumns(); @@ -33241,53 +4870,6 @@ public unsafe partial class ImGuiP { ImGuiPNative.PopColumnsBackground(); } - public static uint GetColumnsID(byte* strId, int count) - { - uint ret = ImGuiPNative.GetColumnsID(strId, count); - return ret; - } - public static uint GetColumnsID(ref byte strId, int count) - { - fixed (byte* pstrId = &strId) - { - uint ret = ImGuiPNative.GetColumnsID((byte*)pstrId, count); - return ret; - } - } - public static uint GetColumnsID(ReadOnlySpan strId, int count) - { - fixed (byte* pstrId = strId) - { - uint ret = ImGuiPNative.GetColumnsID((byte*)pstrId, count); - return ret; - } - } - public static uint GetColumnsID(string strId, int count) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - uint ret = ImGuiPNative.GetColumnsID(pStr0, count); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } public static ImGuiOldColumnsPtr FindOrCreateColumns(ImGuiWindowPtr window, uint id) { ImGuiOldColumnsPtr ret = ImGuiPNative.FindOrCreateColumns(window, id); @@ -33371,382 +4953,6 @@ public unsafe partial class ImGuiP ImGuiTablePtr ret = ImGuiPNative.TableFindByID(id); return ret; } - public static bool BeginTableEx(byte* name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) - { - byte ret = ImGuiPNative.BeginTableEx(name, id, columnsCount, flags, outerSize, innerWidth); - return ret != 0; - } - public static bool BeginTableEx(byte* name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize) - { - byte ret = ImGuiPNative.BeginTableEx(name, id, columnsCount, flags, outerSize, (float)(0.0f)); - return ret != 0; - } - public static bool BeginTableEx(byte* name, uint id, int columnsCount, ImGuiTableFlags flags) - { - byte ret = ImGuiPNative.BeginTableEx(name, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), (float)(0.0f)); - return ret != 0; - } - public static bool BeginTableEx(byte* name, uint id, int columnsCount) - { - byte ret = ImGuiPNative.BeginTableEx(name, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), (float)(0.0f)); - return ret != 0; - } - public static bool BeginTableEx(byte* name, uint id, int columnsCount, Vector2 outerSize) - { - byte ret = ImGuiPNative.BeginTableEx(name, id, columnsCount, (ImGuiTableFlags)(0), outerSize, (float)(0.0f)); - return ret != 0; - } - public static bool BeginTableEx(byte* name, uint id, int columnsCount, ImGuiTableFlags flags, float innerWidth) - { - byte ret = ImGuiPNative.BeginTableEx(name, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), innerWidth); - return ret != 0; - } - public static bool BeginTableEx(byte* name, uint id, int columnsCount, float innerWidth) - { - byte ret = ImGuiPNative.BeginTableEx(name, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), innerWidth); - return ret != 0; - } - public static bool BeginTableEx(byte* name, uint id, int columnsCount, Vector2 outerSize, float innerWidth) - { - byte ret = ImGuiPNative.BeginTableEx(name, id, columnsCount, (ImGuiTableFlags)(0), outerSize, innerWidth); - return ret != 0; - } - public static bool BeginTableEx(ref byte name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, flags, outerSize, innerWidth); - return ret != 0; - } - } - public static bool BeginTableEx(ref byte name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, flags, outerSize, (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTableEx(ref byte name, uint id, int columnsCount, ImGuiTableFlags flags) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTableEx(ref byte name, uint id, int columnsCount) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTableEx(ref byte name, uint id, int columnsCount, Vector2 outerSize) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), outerSize, (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTableEx(ref byte name, uint id, int columnsCount, ImGuiTableFlags flags, float innerWidth) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), innerWidth); - return ret != 0; - } - } - public static bool BeginTableEx(ref byte name, uint id, int columnsCount, float innerWidth) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), innerWidth); - return ret != 0; - } - } - public static bool BeginTableEx(ref byte name, uint id, int columnsCount, Vector2 outerSize, float innerWidth) - { - fixed (byte* pname = &name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), outerSize, innerWidth); - return ret != 0; - } - } - public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) - { - fixed (byte* pname = name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, flags, outerSize, innerWidth); - return ret != 0; - } - } - public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize) - { - fixed (byte* pname = name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, flags, outerSize, (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, ImGuiTableFlags flags) - { - fixed (byte* pname = name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount) - { - fixed (byte* pname = name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, Vector2 outerSize) - { - fixed (byte* pname = name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), outerSize, (float)(0.0f)); - return ret != 0; - } - } - public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, ImGuiTableFlags flags, float innerWidth) - { - fixed (byte* pname = name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), innerWidth); - return ret != 0; - } - } - public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, float innerWidth) - { - fixed (byte* pname = name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), innerWidth); - return ret != 0; - } - } - public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, Vector2 outerSize, float innerWidth) - { - fixed (byte* pname = name) - { - byte ret = ImGuiPNative.BeginTableEx((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), outerSize, innerWidth); - return ret != 0; - } - } - public static bool BeginTableEx(string name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginTableEx(pStr0, id, columnsCount, flags, outerSize, innerWidth); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTableEx(string name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginTableEx(pStr0, id, columnsCount, flags, outerSize, (float)(0.0f)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTableEx(string name, uint id, int columnsCount, ImGuiTableFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginTableEx(pStr0, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), (float)(0.0f)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTableEx(string name, uint id, int columnsCount) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginTableEx(pStr0, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), (float)(0.0f)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTableEx(string name, uint id, int columnsCount, Vector2 outerSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginTableEx(pStr0, id, columnsCount, (ImGuiTableFlags)(0), outerSize, (float)(0.0f)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTableEx(string name, uint id, int columnsCount, ImGuiTableFlags flags, float innerWidth) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginTableEx(pStr0, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), innerWidth); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTableEx(string name, uint id, int columnsCount, float innerWidth) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginTableEx(pStr0, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), innerWidth); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool BeginTableEx(string name, uint id, int columnsCount, Vector2 outerSize, float innerWidth) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (name != null) - { - pStrSize0 = Utils.GetByteCountUTF8(name); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.BeginTableEx(pStr0, id, columnsCount, (ImGuiTableFlags)(0), outerSize, innerWidth); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static void TableBeginInitMemory(ImGuiTablePtr table, int columnsCount) { ImGuiPNative.TableBeginInitMemory(table, columnsCount); @@ -34419,675 +5625,6 @@ public unsafe partial class ImGuiP return ret != 0; } } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, byte* label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, label, pOpen, flags, dockedWindow); - return ret != 0; - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, byte* label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, label, pOpen, flags, dockedWindow); - return ret != 0; - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, ref byte label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, (byte*)plabel, pOpen, flags, dockedWindow); - return ret != 0; - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, ReadOnlySpan label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, (byte*)plabel, pOpen, flags, dockedWindow); - return ret != 0; - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, string label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TabItemEx(tabBar, pStr0, pOpen, flags, dockedWindow); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, ref byte label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, (byte*)plabel, pOpen, flags, dockedWindow); - return ret != 0; - } - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, ReadOnlySpan label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, (byte*)plabel, pOpen, flags, dockedWindow); - return ret != 0; - } - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, string label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, pStr0, pOpen, flags, dockedWindow); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, byte* label, ref bool pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, label, (bool*)ppOpen, flags, dockedWindow); - return ret != 0; - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, byte* label, ref bool pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, label, (bool*)ppOpen, flags, dockedWindow); - return ret != 0; - } - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, ref byte label, ref bool pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, (byte*)plabel, (bool*)ppOpen, flags, dockedWindow); - return ret != 0; - } - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, ReadOnlySpan label, ref bool pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (byte* plabel = label) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, (byte*)plabel, (bool*)ppOpen, flags, dockedWindow); - return ret != 0; - } - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, string label, ref bool pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, pStr0, (bool*)ppOpen, flags, dockedWindow); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, ref byte label, ref bool pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, (byte*)plabel, (bool*)ppOpen, flags, dockedWindow); - return ret != 0; - } - } - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, ReadOnlySpan label, ref bool pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (byte* plabel = label) - { - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, (byte*)plabel, (bool*)ppOpen, flags, dockedWindow); - return ret != 0; - } - } - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, string label, ref bool pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppOpen = &pOpen) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, pStr0, (bool*)ppOpen, flags, dockedWindow); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, byte* label, bool* pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, label, pOpen, flags, (ImGuiWindow*)pdockedWindow); - return ret != 0; - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, byte* label, bool* pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, label, pOpen, flags, (ImGuiWindow*)pdockedWindow); - return ret != 0; - } - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, ref byte label, bool* pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (byte* plabel = &label) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, (byte*)plabel, pOpen, flags, (ImGuiWindow*)pdockedWindow); - return ret != 0; - } - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, ReadOnlySpan label, bool* pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (byte* plabel = label) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, (byte*)plabel, pOpen, flags, (ImGuiWindow*)pdockedWindow); - return ret != 0; - } - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, string label, bool* pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, pStr0, pOpen, flags, (ImGuiWindow*)pdockedWindow); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, ref byte label, bool* pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (byte* plabel = &label) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, (byte*)plabel, pOpen, flags, (ImGuiWindow*)pdockedWindow); - return ret != 0; - } - } - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, ReadOnlySpan label, bool* pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (byte* plabel = label) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, (byte*)plabel, pOpen, flags, (ImGuiWindow*)pdockedWindow); - return ret != 0; - } - } - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, string label, bool* pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, pStr0, pOpen, flags, (ImGuiWindow*)pdockedWindow); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, byte* label, ref bool pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (bool* ppOpen = &pOpen) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, label, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); - return ret != 0; - } - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, byte* label, ref bool pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (bool* ppOpen = &pOpen) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, label, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); - return ret != 0; - } - } - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, ref byte label, ref bool pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppOpen = &pOpen) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, (byte*)plabel, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); - return ret != 0; - } - } - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, ReadOnlySpan label, ref bool pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (byte* plabel = label) - { - fixed (bool* ppOpen = &pOpen) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, (byte*)plabel, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); - return ret != 0; - } - } - } - } - public static bool TabItemEx(ImGuiTabBarPtr tabBar, string label, ref bool pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppOpen = &pOpen) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx(tabBar, pStr0, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, ref byte label, ref bool pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (byte* plabel = &label) - { - fixed (bool* ppOpen = &pOpen) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, (byte*)plabel, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); - return ret != 0; - } - } - } - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, ReadOnlySpan label, ref bool pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (byte* plabel = label) - { - fixed (bool* ppOpen = &pOpen) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, (byte*)plabel, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); - return ret != 0; - } - } - } - } - } - public static bool TabItemEx(ref ImGuiTabBar tabBar, string label, ref bool pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* ppOpen = &pOpen) - { - fixed (ImGuiWindow* pdockedWindow = &dockedWindow) - { - byte ret = ImGuiPNative.TabItemEx((ImGuiTabBar*)ptabBar, pStr0, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - } - } - public static Vector2 TabItemCalcSize(byte* label, bool hasCloseButton) - { - Vector2 ret; - ImGuiPNative.TabItemCalcSize(&ret, label, hasCloseButton ? (byte)1 : (byte)0); - return ret; - } - public static void TabItemCalcSize(Vector2* pOut, byte* label, bool hasCloseButton) - { - ImGuiPNative.TabItemCalcSize(pOut, label, hasCloseButton ? (byte)1 : (byte)0); - } - public static void TabItemCalcSize(ref Vector2 pOut, byte* label, bool hasCloseButton) - { - fixed (Vector2* ppOut = &pOut) - { - ImGuiPNative.TabItemCalcSize((Vector2*)ppOut, label, hasCloseButton ? (byte)1 : (byte)0); - } - } - public static Vector2 TabItemCalcSize(ref byte label, bool hasCloseButton) - { - fixed (byte* plabel = &label) - { - Vector2 ret; - ImGuiPNative.TabItemCalcSize(&ret, (byte*)plabel, hasCloseButton ? (byte)1 : (byte)0); - return ret; - } - } - public static Vector2 TabItemCalcSize(ReadOnlySpan label, bool hasCloseButton) - { - fixed (byte* plabel = label) - { - Vector2 ret; - ImGuiPNative.TabItemCalcSize(&ret, (byte*)plabel, hasCloseButton ? (byte)1 : (byte)0); - return ret; - } - } - public static Vector2 TabItemCalcSize(string label, bool hasCloseButton) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - Vector2 ret; - ImGuiPNative.TabItemCalcSize(&ret, pStr0, hasCloseButton ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static void TabItemCalcSize(ref Vector2 pOut, ref byte label, bool hasCloseButton) - { - fixed (Vector2* ppOut = &pOut) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.TabItemCalcSize((Vector2*)ppOut, (byte*)plabel, hasCloseButton ? (byte)1 : (byte)0); - } - } - } - public static void TabItemCalcSize(ref Vector2 pOut, ReadOnlySpan label, bool hasCloseButton) - { - fixed (Vector2* ppOut = &pOut) - { - fixed (byte* plabel = label) - { - ImGuiPNative.TabItemCalcSize((Vector2*)ppOut, (byte*)plabel, hasCloseButton ? (byte)1 : (byte)0); - } - } - } - public static void TabItemCalcSize(ref Vector2 pOut, string label, bool hasCloseButton) - { - fixed (Vector2* ppOut = &pOut) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.TabItemCalcSize((Vector2*)ppOut, pStr0, hasCloseButton ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void TabItemCalcSize(Vector2* pOut, ref byte label, bool hasCloseButton) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.TabItemCalcSize(pOut, (byte*)plabel, hasCloseButton ? (byte)1 : (byte)0); - } - } - public static void TabItemCalcSize(Vector2* pOut, ReadOnlySpan label, bool hasCloseButton) - { - fixed (byte* plabel = label) - { - ImGuiPNative.TabItemCalcSize(pOut, (byte*)plabel, hasCloseButton ? (byte)1 : (byte)0); - } - } - public static void TabItemCalcSize(Vector2* pOut, string label, bool hasCloseButton) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.TabItemCalcSize(pOut, pStr0, hasCloseButton ? (byte)1 : (byte)0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } public static void TabItemBackground(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, uint col) { ImGuiPNative.TabItemBackground(drawList, bb, flags, col); @@ -35099,494 +5636,6 @@ public unsafe partial class ImGuiP ImGuiPNative.TabItemBackground((ImDrawList*)pdrawList, bb, flags, col); } } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, byte* label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, bool* outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, byte* label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, bool* outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ref byte label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, bool* outTextClipped) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ReadOnlySpan label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, bool* outTextClipped) - { - fixed (byte* plabel = label) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, string label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, bool* outTextClipped) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ref byte label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, bool* outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); - } - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ReadOnlySpan label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, bool* outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = label) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); - } - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, string label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, bool* outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, byte* label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, bool* outTextClipped) - { - fixed (bool* poutJustClosed = &outJustClosed) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, byte* label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, bool* outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (bool* poutJustClosed = &outJustClosed) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); - } - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ref byte label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, bool* outTextClipped) - { - fixed (byte* plabel = &label) - { - fixed (bool* poutJustClosed = &outJustClosed) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); - } - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ReadOnlySpan label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, bool* outTextClipped) - { - fixed (byte* plabel = label) - { - fixed (bool* poutJustClosed = &outJustClosed) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); - } - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, string label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, bool* outTextClipped) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* poutJustClosed = &outJustClosed) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ref byte label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, bool* outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = &label) - { - fixed (bool* poutJustClosed = &outJustClosed) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); - } - } - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ReadOnlySpan label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, bool* outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = label) - { - fixed (bool* poutJustClosed = &outJustClosed) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); - } - } - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, string label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, bool* outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* poutJustClosed = &outJustClosed) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, byte* label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, ref bool outTextClipped) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, byte* label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, ref bool outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); - } - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ref byte label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, ref bool outTextClipped) - { - fixed (byte* plabel = &label) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); - } - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ReadOnlySpan label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, ref bool outTextClipped) - { - fixed (byte* plabel = label) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); - } - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, string label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, ref bool outTextClipped) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ref byte label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, ref bool outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = &label) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); - } - } - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ReadOnlySpan label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, ref bool outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = label) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); - } - } - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, string label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, ref bool outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, byte* label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, ref bool outTextClipped) - { - fixed (bool* poutJustClosed = &outJustClosed) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); - } - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, byte* label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, ref bool outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (bool* poutJustClosed = &outJustClosed) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); - } - } - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ref byte label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, ref bool outTextClipped) - { - fixed (byte* plabel = &label) - { - fixed (bool* poutJustClosed = &outJustClosed) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); - } - } - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ReadOnlySpan label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, ref bool outTextClipped) - { - fixed (byte* plabel = label) - { - fixed (bool* poutJustClosed = &outJustClosed) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); - } - } - } - } - public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, string label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, ref bool outTextClipped) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* poutJustClosed = &outJustClosed) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton(drawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ref byte label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, ref bool outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = &label) - { - fixed (bool* poutJustClosed = &outJustClosed) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); - } - } - } - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, ReadOnlySpan label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, ref bool outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = label) - { - fixed (bool* poutJustClosed = &outJustClosed) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); - } - } - } - } - } - public static void TabItemLabelAndCloseButton(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, string label, uint tabId, uint closeButtonId, bool isContentsVisible, ref bool outJustClosed, ref bool outTextClipped) - { - fixed (ImDrawList* pdrawList = &drawList) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (bool* poutJustClosed = &outJustClosed) - { - fixed (bool* poutTextClipped = &outTextClipped) - { - ImGuiPNative.TabItemLabelAndCloseButton((ImDrawList*)pdrawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - } - } public static void RenderFrame(Vector2 pMin, Vector2 pMax, uint fillCol, bool border, float rounding) { ImGuiPNative.RenderFrame(pMin, pMax, fillCol, border ? (byte)1 : (byte)0, rounding); @@ -35760,194 +5809,6 @@ public unsafe partial class ImGuiP ImDrawFlags ret = ImGuiPNative.CalcRoundingFlagsForRectInRect(rIn, rOuter, threshold); return ret; } - public static bool ButtonEx(byte* label, Vector2 sizeArg, ImGuiButtonFlags flags) - { - byte ret = ImGuiPNative.ButtonEx(label, sizeArg, flags); - return ret != 0; - } - public static bool ButtonEx(byte* label, Vector2 sizeArg) - { - byte ret = ImGuiPNative.ButtonEx(label, sizeArg, (ImGuiButtonFlags)(0)); - return ret != 0; - } - public static bool ButtonEx(byte* label) - { - byte ret = ImGuiPNative.ButtonEx(label, (Vector2)(new Vector2(0,0)), (ImGuiButtonFlags)(0)); - return ret != 0; - } - public static bool ButtonEx(byte* label, ImGuiButtonFlags flags) - { - byte ret = ImGuiPNative.ButtonEx(label, (Vector2)(new Vector2(0,0)), flags); - return ret != 0; - } - public static bool ButtonEx(ref byte label, Vector2 sizeArg, ImGuiButtonFlags flags) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.ButtonEx((byte*)plabel, sizeArg, flags); - return ret != 0; - } - } - public static bool ButtonEx(ref byte label, Vector2 sizeArg) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.ButtonEx((byte*)plabel, sizeArg, (ImGuiButtonFlags)(0)); - return ret != 0; - } - } - public static bool ButtonEx(ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.ButtonEx((byte*)plabel, (Vector2)(new Vector2(0,0)), (ImGuiButtonFlags)(0)); - return ret != 0; - } - } - public static bool ButtonEx(ref byte label, ImGuiButtonFlags flags) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.ButtonEx((byte*)plabel, (Vector2)(new Vector2(0,0)), flags); - return ret != 0; - } - } - public static bool ButtonEx(ReadOnlySpan label, Vector2 sizeArg, ImGuiButtonFlags flags) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.ButtonEx((byte*)plabel, sizeArg, flags); - return ret != 0; - } - } - public static bool ButtonEx(ReadOnlySpan label, Vector2 sizeArg) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.ButtonEx((byte*)plabel, sizeArg, (ImGuiButtonFlags)(0)); - return ret != 0; - } - } - public static bool ButtonEx(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.ButtonEx((byte*)plabel, (Vector2)(new Vector2(0,0)), (ImGuiButtonFlags)(0)); - return ret != 0; - } - } - public static bool ButtonEx(ReadOnlySpan label, ImGuiButtonFlags flags) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.ButtonEx((byte*)plabel, (Vector2)(new Vector2(0,0)), flags); - return ret != 0; - } - } - public static bool ButtonEx(string label, Vector2 sizeArg, ImGuiButtonFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.ButtonEx(pStr0, sizeArg, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ButtonEx(string label, Vector2 sizeArg) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.ButtonEx(pStr0, sizeArg, (ImGuiButtonFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ButtonEx(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.ButtonEx(pStr0, (Vector2)(new Vector2(0,0)), (ImGuiButtonFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ButtonEx(string label, ImGuiButtonFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.ButtonEx(pStr0, (Vector2)(new Vector2(0,0)), flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static bool CloseButton(uint id, Vector2 pos) { byte ret = ImGuiPNative.CloseButton(id, pos); @@ -35966,100 +5827,6 @@ public unsafe partial class ImGuiP return ret != 0; } } - public static bool ArrowButtonEx(byte* strId, ImGuiDir dir, Vector2 sizeArg, ImGuiButtonFlags flags) - { - byte ret = ImGuiPNative.ArrowButtonEx(strId, dir, sizeArg, flags); - return ret != 0; - } - public static bool ArrowButtonEx(byte* strId, ImGuiDir dir, Vector2 sizeArg) - { - byte ret = ImGuiPNative.ArrowButtonEx(strId, dir, sizeArg, (ImGuiButtonFlags)(0)); - return ret != 0; - } - public static bool ArrowButtonEx(ref byte strId, ImGuiDir dir, Vector2 sizeArg, ImGuiButtonFlags flags) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiPNative.ArrowButtonEx((byte*)pstrId, dir, sizeArg, flags); - return ret != 0; - } - } - public static bool ArrowButtonEx(ref byte strId, ImGuiDir dir, Vector2 sizeArg) - { - fixed (byte* pstrId = &strId) - { - byte ret = ImGuiPNative.ArrowButtonEx((byte*)pstrId, dir, sizeArg, (ImGuiButtonFlags)(0)); - return ret != 0; - } - } - public static bool ArrowButtonEx(ReadOnlySpan strId, ImGuiDir dir, Vector2 sizeArg, ImGuiButtonFlags flags) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiPNative.ArrowButtonEx((byte*)pstrId, dir, sizeArg, flags); - return ret != 0; - } - } - public static bool ArrowButtonEx(ReadOnlySpan strId, ImGuiDir dir, Vector2 sizeArg) - { - fixed (byte* pstrId = strId) - { - byte ret = ImGuiPNative.ArrowButtonEx((byte*)pstrId, dir, sizeArg, (ImGuiButtonFlags)(0)); - return ret != 0; - } - } - public static bool ArrowButtonEx(string strId, ImGuiDir dir, Vector2 sizeArg, ImGuiButtonFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.ArrowButtonEx(pStr0, dir, sizeArg, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool ArrowButtonEx(string strId, ImGuiDir dir, Vector2 sizeArg) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (strId != null) - { - pStrSize0 = Utils.GetByteCountUTF8(strId); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(strId, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.ArrowButtonEx(pStr0, dir, sizeArg, (ImGuiButtonFlags)(0)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static void Scrollbar(ImGuiAxis axis) { ImGuiPNative.Scrollbar(axis); @@ -36160,100 +5927,6 @@ public unsafe partial class ImGuiP { ImGuiPNative.SeparatorEx(flags); } - public static bool CheckboxFlags(byte* label, long* flags, long flagsValue) - { - byte ret = ImGuiPNative.CheckboxFlags(label, flags, flagsValue); - return ret != 0; - } - public static bool CheckboxFlags(ref byte label, long* flags, long flagsValue) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.CheckboxFlags((byte*)plabel, flags, flagsValue); - return ret != 0; - } - } - public static bool CheckboxFlags(ReadOnlySpan label, long* flags, long flagsValue) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.CheckboxFlags((byte*)plabel, flags, flagsValue); - return ret != 0; - } - } - public static bool CheckboxFlags(string label, long* flags, long flagsValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.CheckboxFlags(pStr0, flags, flagsValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool CheckboxFlags(byte* label, ulong* flags, ulong flagsValue) - { - byte ret = ImGuiPNative.CheckboxFlags(label, flags, flagsValue); - return ret != 0; - } - public static bool CheckboxFlags(ref byte label, ulong* flags, ulong flagsValue) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.CheckboxFlags((byte*)plabel, flags, flagsValue); - return ret != 0; - } - } - public static bool CheckboxFlags(ReadOnlySpan label, ulong* flags, ulong flagsValue) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.CheckboxFlags((byte*)plabel, flags, flagsValue); - return ret != 0; - } - } - public static bool CheckboxFlags(string label, ulong* flags, ulong flagsValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.CheckboxFlags(pStr0, flags, flagsValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public static bool ButtonBehavior(ImRect bb, uint id, bool* outHovered, bool* outHeld, ImGuiButtonFlags flags) { byte ret = ImGuiPNative.ButtonBehavior(bb, id, outHovered, outHeld, flags); @@ -36510,349 +6183,6 @@ public unsafe partial class ImGuiP } } } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, byte* label, byte* labelEnd) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, label, labelEnd); - return ret != 0; - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, byte* label) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, label, (byte*)(default)); - return ret != 0; - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ref byte label, byte* labelEnd) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, (byte*)plabel, labelEnd); - return ret != 0; - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, (byte*)plabel, (byte*)(default)); - return ret != 0; - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ReadOnlySpan label, byte* labelEnd) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, (byte*)plabel, labelEnd); - return ret != 0; - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, (byte*)plabel, (byte*)(default)); - return ret != 0; - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, string label, byte* labelEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, pStr0, labelEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, pStr0, (byte*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, byte* label, ref byte labelEnd) - { - fixed (byte* plabelEnd = &labelEnd) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, label, (byte*)plabelEnd); - return ret != 0; - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, byte* label, ReadOnlySpan labelEnd) - { - fixed (byte* plabelEnd = labelEnd) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, label, (byte*)plabelEnd); - return ret != 0; - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, byte* label, string labelEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (labelEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(labelEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(labelEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, label, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ref byte label, ref byte labelEnd) - { - fixed (byte* plabel = &label) - { - fixed (byte* plabelEnd = &labelEnd) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, (byte*)plabel, (byte*)plabelEnd); - return ret != 0; - } - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ReadOnlySpan label, ReadOnlySpan labelEnd) - { - fixed (byte* plabel = label) - { - fixed (byte* plabelEnd = labelEnd) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, (byte*)plabel, (byte*)plabelEnd); - return ret != 0; - } - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, string label, string labelEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (labelEnd != null) - { - pStrSize1 = Utils.GetByteCountUTF8(labelEnd); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(labelEnd, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, pStr0, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ref byte label, ReadOnlySpan labelEnd) - { - fixed (byte* plabel = &label) - { - fixed (byte* plabelEnd = labelEnd) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, (byte*)plabel, (byte*)plabelEnd); - return ret != 0; - } - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ref byte label, string labelEnd) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (labelEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(labelEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(labelEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, (byte*)plabel, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ReadOnlySpan label, ref byte labelEnd) - { - fixed (byte* plabel = label) - { - fixed (byte* plabelEnd = &labelEnd) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, (byte*)plabel, (byte*)plabelEnd); - return ret != 0; - } - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ReadOnlySpan label, string labelEnd) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (labelEnd != null) - { - pStrSize0 = Utils.GetByteCountUTF8(labelEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(labelEnd, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, (byte*)plabel, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, string label, ref byte labelEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* plabelEnd = &labelEnd) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, pStr0, (byte*)plabelEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, string label, ReadOnlySpan labelEnd) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* plabelEnd = labelEnd) - { - byte ret = ImGuiPNative.TreeNodeBehavior(id, flags, pStr0, (byte*)plabelEnd); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } public static bool TreeNodeBehaviorIsOpen(uint id, ImGuiTreeNodeFlags flags) { byte ret = ImGuiPNative.TreeNodeBehaviorIsOpen(id, flags); @@ -36876,302 +6206,6 @@ public unsafe partial class ImGuiP { ImGuiPNative.DataTypeApplyOp(dataType, op, output, arg1, arg2); } - public static bool DataTypeApplyFromText(byte* buf, ImGuiDataType dataType, void* pData, byte* format) - { - byte ret = ImGuiPNative.DataTypeApplyFromText(buf, dataType, pData, format); - return ret != 0; - } - public static bool DataTypeApplyFromText(ref byte buf, ImGuiDataType dataType, void* pData, byte* format) - { - fixed (byte* pbuf = &buf) - { - byte ret = ImGuiPNative.DataTypeApplyFromText((byte*)pbuf, dataType, pData, format); - return ret != 0; - } - } - public static bool DataTypeApplyFromText(ReadOnlySpan buf, ImGuiDataType dataType, void* pData, byte* format) - { - fixed (byte* pbuf = buf) - { - byte ret = ImGuiPNative.DataTypeApplyFromText((byte*)pbuf, dataType, pData, format); - return ret != 0; - } - } - public static bool DataTypeApplyFromText(string buf, ImGuiDataType dataType, void* pData, byte* format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (buf != null) - { - pStrSize0 = Utils.GetByteCountUTF8(buf); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.DataTypeApplyFromText(pStr0, dataType, pData, format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool DataTypeApplyFromText(byte* buf, ImGuiDataType dataType, void* pData, ref byte format) - { - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.DataTypeApplyFromText(buf, dataType, pData, (byte*)pformat); - return ret != 0; - } - } - public static bool DataTypeApplyFromText(byte* buf, ImGuiDataType dataType, void* pData, ReadOnlySpan format) - { - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.DataTypeApplyFromText(buf, dataType, pData, (byte*)pformat); - return ret != 0; - } - } - public static bool DataTypeApplyFromText(byte* buf, ImGuiDataType dataType, void* pData, string format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.DataTypeApplyFromText(buf, dataType, pData, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool DataTypeApplyFromText(ref byte buf, ImGuiDataType dataType, void* pData, ref byte format) - { - fixed (byte* pbuf = &buf) - { - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.DataTypeApplyFromText((byte*)pbuf, dataType, pData, (byte*)pformat); - return ret != 0; - } - } - } - public static bool DataTypeApplyFromText(ReadOnlySpan buf, ImGuiDataType dataType, void* pData, ReadOnlySpan format) - { - fixed (byte* pbuf = buf) - { - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.DataTypeApplyFromText((byte*)pbuf, dataType, pData, (byte*)pformat); - return ret != 0; - } - } - } - public static bool DataTypeApplyFromText(string buf, ImGuiDataType dataType, void* pData, string format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (buf != null) - { - pStrSize0 = Utils.GetByteCountUTF8(buf); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (format != null) - { - pStrSize1 = Utils.GetByteCountUTF8(format); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(format, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.DataTypeApplyFromText(pStr0, dataType, pData, pStr1); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool DataTypeApplyFromText(ref byte buf, ImGuiDataType dataType, void* pData, ReadOnlySpan format) - { - fixed (byte* pbuf = &buf) - { - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.DataTypeApplyFromText((byte*)pbuf, dataType, pData, (byte*)pformat); - return ret != 0; - } - } - } - public static bool DataTypeApplyFromText(ref byte buf, ImGuiDataType dataType, void* pData, string format) - { - fixed (byte* pbuf = &buf) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.DataTypeApplyFromText((byte*)pbuf, dataType, pData, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool DataTypeApplyFromText(ReadOnlySpan buf, ImGuiDataType dataType, void* pData, ref byte format) - { - fixed (byte* pbuf = buf) - { - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.DataTypeApplyFromText((byte*)pbuf, dataType, pData, (byte*)pformat); - return ret != 0; - } - } - } - public static bool DataTypeApplyFromText(ReadOnlySpan buf, ImGuiDataType dataType, void* pData, string format) - { - fixed (byte* pbuf = buf) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.DataTypeApplyFromText((byte*)pbuf, dataType, pData, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool DataTypeApplyFromText(string buf, ImGuiDataType dataType, void* pData, ref byte format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (buf != null) - { - pStrSize0 = Utils.GetByteCountUTF8(buf); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.DataTypeApplyFromText(pStr0, dataType, pData, (byte*)pformat); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool DataTypeApplyFromText(string buf, ImGuiDataType dataType, void* pData, ReadOnlySpan format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (buf != null) - { - pStrSize0 = Utils.GetByteCountUTF8(buf); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.DataTypeApplyFromText(pStr0, dataType, pData, (byte*)pformat); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } public static int DataTypeCompare(ImGuiDataType dataType, void* arg1, void* arg2) { int ret = ImGuiPNative.DataTypeCompare(dataType, arg1, arg2); @@ -37182,894 +6216,6 @@ public unsafe partial class ImGuiP byte ret = ImGuiPNative.DataTypeClamp(dataType, pData, pMin, pMax); return ret != 0; } - public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin, void* pClampMax) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, label, dataType, pData, format, pClampMin, pClampMax); - return ret != 0; - } - public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, label, dataType, pData, format, pClampMin, (void*)(default)); - return ret != 0; - } - public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, byte* format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, label, dataType, pData, format, (void*)(default), (void*)(default)); - return ret != 0; - } - public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin, void* pClampMax) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, format, pClampMin, pClampMax); - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, format, pClampMin, (void*)(default)); - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, byte* format) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, format, (void*)(default), (void*)(default)); - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin, void* pClampMax) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, format, pClampMin, pClampMax); - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, format, pClampMin, (void*)(default)); - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, byte* format) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, format, (void*)(default), (void*)(default)); - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, string label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin, void* pClampMax) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, pStr0, dataType, pData, format, pClampMin, pClampMax); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TempInputScalar(ImRect bb, uint id, string label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, pStr0, dataType, pData, format, pClampMin, (void*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TempInputScalar(ImRect bb, uint id, string label, ImGuiDataType dataType, void* pData, byte* format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, pStr0, dataType, pData, format, (void*)(default), (void*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, ref byte format, void* pClampMin, void* pClampMax) - { - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, label, dataType, pData, (byte*)pformat, pClampMin, pClampMax); - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, ref byte format, void* pClampMin) - { - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, label, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, ref byte format) - { - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, label, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, ReadOnlySpan format, void* pClampMin, void* pClampMax) - { - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, label, dataType, pData, (byte*)pformat, pClampMin, pClampMax); - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, ReadOnlySpan format, void* pClampMin) - { - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, label, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, ReadOnlySpan format) - { - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, label, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, string format, void* pClampMin, void* pClampMax) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, label, dataType, pData, pStr0, pClampMin, pClampMax); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, string format, void* pClampMin) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, label, dataType, pData, pStr0, pClampMin, (void*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, string format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, label, dataType, pData, pStr0, (void*)(default), (void*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, ref byte format, void* pClampMin, void* pClampMax) - { - fixed (byte* plabel = &label) - { - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, pClampMax); - return ret != 0; - } - } - } - public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, ref byte format, void* pClampMin) - { - fixed (byte* plabel = &label) - { - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); - return ret != 0; - } - } - } - public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, ref byte format) - { - fixed (byte* plabel = &label) - { - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); - return ret != 0; - } - } - } - public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, ReadOnlySpan format, void* pClampMin, void* pClampMax) - { - fixed (byte* plabel = label) - { - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, pClampMax); - return ret != 0; - } - } - } - public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, ReadOnlySpan format, void* pClampMin) - { - fixed (byte* plabel = label) - { - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); - return ret != 0; - } - } - } - public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, ReadOnlySpan format) - { - fixed (byte* plabel = label) - { - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); - return ret != 0; - } - } - } - public static bool TempInputScalar(ImRect bb, uint id, string label, ImGuiDataType dataType, void* pData, string format, void* pClampMin, void* pClampMax) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (format != null) - { - pStrSize1 = Utils.GetByteCountUTF8(format); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(format, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, pStr0, dataType, pData, pStr1, pClampMin, pClampMax); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TempInputScalar(ImRect bb, uint id, string label, ImGuiDataType dataType, void* pData, string format, void* pClampMin) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (format != null) - { - pStrSize1 = Utils.GetByteCountUTF8(format); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(format, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, pStr0, dataType, pData, pStr1, pClampMin, (void*)(default)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TempInputScalar(ImRect bb, uint id, string label, ImGuiDataType dataType, void* pData, string format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (format != null) - { - pStrSize1 = Utils.GetByteCountUTF8(format); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(format, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, pStr0, dataType, pData, pStr1, (void*)(default), (void*)(default)); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, ReadOnlySpan format, void* pClampMin, void* pClampMax) - { - fixed (byte* plabel = &label) - { - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, pClampMax); - return ret != 0; - } - } - } - public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, ReadOnlySpan format, void* pClampMin) - { - fixed (byte* plabel = &label) - { - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); - return ret != 0; - } - } - } - public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, ReadOnlySpan format) - { - fixed (byte* plabel = &label) - { - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); - return ret != 0; - } - } - } - public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, string format, void* pClampMin, void* pClampMax) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, pStr0, pClampMin, pClampMax); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, string format, void* pClampMin) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, pStr0, pClampMin, (void*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, string format) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, pStr0, (void*)(default), (void*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, ref byte format, void* pClampMin, void* pClampMax) - { - fixed (byte* plabel = label) - { - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, pClampMax); - return ret != 0; - } - } - } - public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, ref byte format, void* pClampMin) - { - fixed (byte* plabel = label) - { - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); - return ret != 0; - } - } - } - public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, ref byte format) - { - fixed (byte* plabel = label) - { - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); - return ret != 0; - } - } - } - public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, string format, void* pClampMin, void* pClampMax) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, pStr0, pClampMin, pClampMax); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, string format, void* pClampMin) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, pStr0, pClampMin, (void*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, string format) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (format != null) - { - pStrSize0 = Utils.GetByteCountUTF8(format); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiPNative.TempInputScalar(bb, id, (byte*)plabel, dataType, pData, pStr0, (void*)(default), (void*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, string label, ImGuiDataType dataType, void* pData, ref byte format, void* pClampMin, void* pClampMax) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, pStr0, dataType, pData, (byte*)pformat, pClampMin, pClampMax); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, string label, ImGuiDataType dataType, void* pData, ref byte format, void* pClampMin) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, pStr0, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, string label, ImGuiDataType dataType, void* pData, ref byte format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pformat = &format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, pStr0, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, string label, ImGuiDataType dataType, void* pData, ReadOnlySpan format, void* pClampMin, void* pClampMax) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, pStr0, dataType, pData, (byte*)pformat, pClampMin, pClampMax); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, string label, ImGuiDataType dataType, void* pData, ReadOnlySpan format, void* pClampMin) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, pStr0, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public static bool TempInputScalar(ImRect bb, uint id, string label, ImGuiDataType dataType, void* pData, ReadOnlySpan format) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* pformat = format) - { - byte ret = ImGuiPNative.TempInputScalar(bb, id, pStr0, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } public static bool TempInputIsActive(uint id) { byte ret = ImGuiPNative.TempInputIsActive(id); @@ -38080,422 +6226,6 @@ public unsafe partial class ImGuiP ImGuiInputTextStatePtr ret = ImGuiPNative.GetInputTextState(id); return ret; } - public static void Custom_StbTextMakeUndoReplace(ImGuiInputTextStatePtr str, int where, int oldLength, int newLength) - { - ImGuiPNative.Custom_StbTextMakeUndoReplace(str, where, oldLength, newLength); - } - public static void Custom_StbTextMakeUndoReplace(ref ImGuiInputTextState str, int where, int oldLength, int newLength) - { - fixed (ImGuiInputTextState* pstr = &str) - { - ImGuiPNative.Custom_StbTextMakeUndoReplace((ImGuiInputTextState*)pstr, where, oldLength, newLength); - } - } - public static void Custom_StbTextUndo(ImGuiInputTextStatePtr str) - { - ImGuiPNative.Custom_StbTextUndo(str); - } - public static void Custom_StbTextUndo(ref ImGuiInputTextState str) - { - fixed (ImGuiInputTextState* pstr = &str) - { - ImGuiPNative.Custom_StbTextUndo((ImGuiInputTextState*)pstr); - } - } - public static void ColorTooltip(byte* text, float* col, ImGuiColorEditFlags flags) - { - ImGuiPNative.ColorTooltip(text, col, flags); - } - public static void ColorTooltip(ref byte text, float* col, ImGuiColorEditFlags flags) - { - fixed (byte* ptext = &text) - { - ImGuiPNative.ColorTooltip((byte*)ptext, col, flags); - } - } - public static void ColorTooltip(ReadOnlySpan text, float* col, ImGuiColorEditFlags flags) - { - fixed (byte* ptext = text) - { - ImGuiPNative.ColorTooltip((byte*)ptext, col, flags); - } - } - public static void ColorTooltip(string text, float* col, ImGuiColorEditFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (text != null) - { - pStrSize0 = Utils.GetByteCountUTF8(text); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.ColorTooltip(pStr0, col, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void ColorTooltip(byte* text, ref float col, ImGuiColorEditFlags flags) - { - fixed (float* pcol = &col) - { - ImGuiPNative.ColorTooltip(text, (float*)pcol, flags); - } - } - public static void ColorTooltip(ref byte text, ref float col, ImGuiColorEditFlags flags) - { - fixed (byte* ptext = &text) - { - fixed (float* pcol = &col) - { - ImGuiPNative.ColorTooltip((byte*)ptext, (float*)pcol, flags); - } - } - } - public static void ColorTooltip(ReadOnlySpan text, ref float col, ImGuiColorEditFlags flags) - { - fixed (byte* ptext = text) - { - fixed (float* pcol = &col) - { - ImGuiPNative.ColorTooltip((byte*)ptext, (float*)pcol, flags); - } - } - } - public static void ColorTooltip(string text, ref float col, ImGuiColorEditFlags flags) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (text != null) - { - pStrSize0 = Utils.GetByteCountUTF8(text); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (float* pcol = &col) - { - ImGuiPNative.ColorTooltip(pStr0, (float*)pcol, flags); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static int PlotEx(ImGuiPlotType plotType, byte* label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, byte* overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - int ret = ImGuiPNative.PlotEx(plotType, label, valuesGetter, data, valuesCount, valuesOffset, overlayText, scaleMin, scaleMax, frameSize); - return ret; - } - public static int PlotEx(ImGuiPlotType plotType, ref byte label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, byte* overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - fixed (byte* plabel = &label) - { - int ret = ImGuiPNative.PlotEx(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, overlayText, scaleMin, scaleMax, frameSize); - return ret; - } - } - public static int PlotEx(ImGuiPlotType plotType, ReadOnlySpan label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, byte* overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - fixed (byte* plabel = label) - { - int ret = ImGuiPNative.PlotEx(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, overlayText, scaleMin, scaleMax, frameSize); - return ret; - } - } - public static int PlotEx(ImGuiPlotType plotType, string label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, byte* overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.PlotEx(plotType, pStr0, valuesGetter, data, valuesCount, valuesOffset, overlayText, scaleMin, scaleMax, frameSize); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int PlotEx(ImGuiPlotType plotType, byte* label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, ref byte overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - fixed (byte* poverlayText = &overlayText) - { - int ret = ImGuiPNative.PlotEx(plotType, label, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); - return ret; - } - } - public static int PlotEx(ImGuiPlotType plotType, byte* label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, ReadOnlySpan overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - fixed (byte* poverlayText = overlayText) - { - int ret = ImGuiPNative.PlotEx(plotType, label, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); - return ret; - } - } - public static int PlotEx(ImGuiPlotType plotType, byte* label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, string overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (overlayText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(overlayText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(overlayText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.PlotEx(plotType, label, valuesGetter, data, valuesCount, valuesOffset, pStr0, scaleMin, scaleMax, frameSize); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int PlotEx(ImGuiPlotType plotType, ref byte label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, ref byte overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - fixed (byte* plabel = &label) - { - fixed (byte* poverlayText = &overlayText) - { - int ret = ImGuiPNative.PlotEx(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); - return ret; - } - } - } - public static int PlotEx(ImGuiPlotType plotType, ReadOnlySpan label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, ReadOnlySpan overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - fixed (byte* plabel = label) - { - fixed (byte* poverlayText = overlayText) - { - int ret = ImGuiPNative.PlotEx(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); - return ret; - } - } - } - public static int PlotEx(ImGuiPlotType plotType, string label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, string overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte* pStr1 = null; - int pStrSize1 = 0; - if (overlayText != null) - { - pStrSize1 = Utils.GetByteCountUTF8(overlayText); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - pStr1 = Utils.Alloc(pStrSize1 + 1); - } - else - { - byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; - pStr1 = pStrStack1; - } - int pStrOffset1 = Utils.EncodeStringUTF8(overlayText, pStr1, pStrSize1); - pStr1[pStrOffset1] = 0; - } - int ret = ImGuiPNative.PlotEx(plotType, pStr0, valuesGetter, data, valuesCount, valuesOffset, pStr1, scaleMin, scaleMax, frameSize); - if (pStrSize1 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr1); - } - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - public static int PlotEx(ImGuiPlotType plotType, ref byte label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, ReadOnlySpan overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - fixed (byte* plabel = &label) - { - fixed (byte* poverlayText = overlayText) - { - int ret = ImGuiPNative.PlotEx(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); - return ret; - } - } - } - public static int PlotEx(ImGuiPlotType plotType, ref byte label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, string overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - fixed (byte* plabel = &label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (overlayText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(overlayText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(overlayText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.PlotEx(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, pStr0, scaleMin, scaleMax, frameSize); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int PlotEx(ImGuiPlotType plotType, ReadOnlySpan label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, ref byte overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - fixed (byte* plabel = label) - { - fixed (byte* poverlayText = &overlayText) - { - int ret = ImGuiPNative.PlotEx(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); - return ret; - } - } - } - public static int PlotEx(ImGuiPlotType plotType, ReadOnlySpan label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, string overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - fixed (byte* plabel = label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (overlayText != null) - { - pStrSize0 = Utils.GetByteCountUTF8(overlayText); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(overlayText, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - int ret = ImGuiPNative.PlotEx(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, pStr0, scaleMin, scaleMax, frameSize); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int PlotEx(ImGuiPlotType plotType, string label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, ref byte overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* poverlayText = &overlayText) - { - int ret = ImGuiPNative.PlotEx(plotType, pStr0, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } - public static int PlotEx(ImGuiPlotType plotType, string label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, ReadOnlySpan overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - fixed (byte* poverlayText = overlayText) - { - int ret = ImGuiPNative.PlotEx(plotType, pStr0, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret; - } - } public static void ShadeVertsLinearColorGradientKeepAlpha(ImDrawListPtr drawList, int vertStartIdx, int vertEndIdx, Vector2 gradientp0, Vector2 gradientp1, uint col0, uint col1) { ImGuiPNative.ShadeVertsLinearColorGradientKeepAlpha(drawList, vertStartIdx, vertEndIdx, gradientp0, gradientp1, col0, col1); @@ -38598,592 +6328,6 @@ public unsafe partial class ImGuiP ImGuiPNative.DebugNodeColumns((ImGuiOldColumns*)pcolumns); } } - public static void DebugNodeDockNode(ImGuiDockNodePtr node, byte* label) - { - ImGuiPNative.DebugNodeDockNode(node, label); - } - public static void DebugNodeDockNode(ref ImGuiDockNode node, byte* label) - { - fixed (ImGuiDockNode* pnode = &node) - { - ImGuiPNative.DebugNodeDockNode((ImGuiDockNode*)pnode, label); - } - } - public static void DebugNodeDockNode(ImGuiDockNodePtr node, ref byte label) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeDockNode(node, (byte*)plabel); - } - } - public static void DebugNodeDockNode(ImGuiDockNodePtr node, ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeDockNode(node, (byte*)plabel); - } - } - public static void DebugNodeDockNode(ImGuiDockNodePtr node, string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeDockNode(node, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void DebugNodeDockNode(ref ImGuiDockNode node, ref byte label) - { - fixed (ImGuiDockNode* pnode = &node) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeDockNode((ImGuiDockNode*)pnode, (byte*)plabel); - } - } - } - public static void DebugNodeDockNode(ref ImGuiDockNode node, ReadOnlySpan label) - { - fixed (ImGuiDockNode* pnode = &node) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeDockNode((ImGuiDockNode*)pnode, (byte*)plabel); - } - } - } - public static void DebugNodeDockNode(ref ImGuiDockNode node, string label) - { - fixed (ImGuiDockNode* pnode = &node) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeDockNode((ImGuiDockNode*)pnode, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, byte* label) - { - ImGuiPNative.DebugNodeDrawList(window, viewport, drawList, label); - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, byte* label) - { - fixed (ImGuiWindow* pwindow = &window) - { - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, viewport, drawList, label); - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ref ImGuiViewportP viewport, ImDrawListPtr drawList, byte* label) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - ImGuiPNative.DebugNodeDrawList(window, (ImGuiViewportP*)pviewport, drawList, label); - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ref ImGuiViewportP viewport, ImDrawListPtr drawList, byte* label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, drawList, label); - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ref ImDrawList drawList, byte* label) - { - fixed (ImDrawList* pdrawList = &drawList) - { - ImGuiPNative.DebugNodeDrawList(window, viewport, (ImDrawList*)pdrawList, label); - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ImGuiViewportPPtr viewport, ref ImDrawList drawList, byte* label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (ImDrawList* pdrawList = &drawList) - { - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, viewport, (ImDrawList*)pdrawList, label); - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ref ImGuiViewportP viewport, ref ImDrawList drawList, byte* label) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - fixed (ImDrawList* pdrawList = &drawList) - { - ImGuiPNative.DebugNodeDrawList(window, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, label); - } - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ref ImGuiViewportP viewport, ref ImDrawList drawList, byte* label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - fixed (ImDrawList* pdrawList = &drawList) - { - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, label); - } - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, ref byte label) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeDrawList(window, viewport, drawList, (byte*)plabel); - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeDrawList(window, viewport, drawList, (byte*)plabel); - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeDrawList(window, viewport, drawList, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, ref byte label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, viewport, drawList, (byte*)plabel); - } - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, ReadOnlySpan label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, viewport, drawList, (byte*)plabel); - } - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, string label) - { - fixed (ImGuiWindow* pwindow = &window) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, viewport, drawList, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ref ImGuiViewportP viewport, ImDrawListPtr drawList, ref byte label) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeDrawList(window, (ImGuiViewportP*)pviewport, drawList, (byte*)plabel); - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ref ImGuiViewportP viewport, ImDrawListPtr drawList, ReadOnlySpan label) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeDrawList(window, (ImGuiViewportP*)pviewport, drawList, (byte*)plabel); - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ref ImGuiViewportP viewport, ImDrawListPtr drawList, string label) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeDrawList(window, (ImGuiViewportP*)pviewport, drawList, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ref ImGuiViewportP viewport, ImDrawListPtr drawList, ref byte label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, drawList, (byte*)plabel); - } - } - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ref ImGuiViewportP viewport, ImDrawListPtr drawList, ReadOnlySpan label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, drawList, (byte*)plabel); - } - } - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ref ImGuiViewportP viewport, ImDrawListPtr drawList, string label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, drawList, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ref ImDrawList drawList, ref byte label) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeDrawList(window, viewport, (ImDrawList*)pdrawList, (byte*)plabel); - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ref ImDrawList drawList, ReadOnlySpan label) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeDrawList(window, viewport, (ImDrawList*)pdrawList, (byte*)plabel); - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ref ImDrawList drawList, string label) - { - fixed (ImDrawList* pdrawList = &drawList) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeDrawList(window, viewport, (ImDrawList*)pdrawList, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ImGuiViewportPPtr viewport, ref ImDrawList drawList, ref byte label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, viewport, (ImDrawList*)pdrawList, (byte*)plabel); - } - } - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ImGuiViewportPPtr viewport, ref ImDrawList drawList, ReadOnlySpan label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, viewport, (ImDrawList*)pdrawList, (byte*)plabel); - } - } - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ImGuiViewportPPtr viewport, ref ImDrawList drawList, string label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (ImDrawList* pdrawList = &drawList) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, viewport, (ImDrawList*)pdrawList, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ref ImGuiViewportP viewport, ref ImDrawList drawList, ref byte label) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeDrawList(window, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, (byte*)plabel); - } - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ref ImGuiViewportP viewport, ref ImDrawList drawList, ReadOnlySpan label) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeDrawList(window, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, (byte*)plabel); - } - } - } - } - public static void DebugNodeDrawList(ImGuiWindowPtr window, ref ImGuiViewportP viewport, ref ImDrawList drawList, string label) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - fixed (ImDrawList* pdrawList = &drawList) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeDrawList(window, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ref ImGuiViewportP viewport, ref ImDrawList drawList, ref byte label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, (byte*)plabel); - } - } - } - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ref ImGuiViewportP viewport, ref ImDrawList drawList, ReadOnlySpan label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - fixed (ImDrawList* pdrawList = &drawList) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, (byte*)plabel); - } - } - } - } - } - public static void DebugNodeDrawList(ref ImGuiWindow window, ref ImGuiViewportP viewport, ref ImDrawList drawList, string label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (ImGuiViewportP* pviewport = &viewport) - { - fixed (ImDrawList* pdrawList = &drawList) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeDrawList((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - } - } public static void DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawListPtr outDrawList, ImDrawListPtr drawList, ImDrawCmdPtr drawCmd, bool showMesh, bool showAabb) { ImGuiPNative.DebugNodeDrawCmdShowMeshAndBoundingBox(outDrawList, drawList, drawCmd, showMesh ? (byte)1 : (byte)0, showAabb ? (byte)1 : (byte)0); @@ -39291,202 +6435,6 @@ public unsafe partial class ImGuiP } } } - public static void DebugNodeStorage(ImGuiStoragePtr storage, byte* label) - { - ImGuiPNative.DebugNodeStorage(storage, label); - } - public static void DebugNodeStorage(ref ImGuiStorage storage, byte* label) - { - fixed (ImGuiStorage* pstorage = &storage) - { - ImGuiPNative.DebugNodeStorage((ImGuiStorage*)pstorage, label); - } - } - public static void DebugNodeStorage(ImGuiStoragePtr storage, ref byte label) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeStorage(storage, (byte*)plabel); - } - } - public static void DebugNodeStorage(ImGuiStoragePtr storage, ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeStorage(storage, (byte*)plabel); - } - } - public static void DebugNodeStorage(ImGuiStoragePtr storage, string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeStorage(storage, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void DebugNodeStorage(ref ImGuiStorage storage, ref byte label) - { - fixed (ImGuiStorage* pstorage = &storage) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeStorage((ImGuiStorage*)pstorage, (byte*)plabel); - } - } - } - public static void DebugNodeStorage(ref ImGuiStorage storage, ReadOnlySpan label) - { - fixed (ImGuiStorage* pstorage = &storage) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeStorage((ImGuiStorage*)pstorage, (byte*)plabel); - } - } - } - public static void DebugNodeStorage(ref ImGuiStorage storage, string label) - { - fixed (ImGuiStorage* pstorage = &storage) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeStorage((ImGuiStorage*)pstorage, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void DebugNodeTabBar(ImGuiTabBarPtr tabBar, byte* label) - { - ImGuiPNative.DebugNodeTabBar(tabBar, label); - } - public static void DebugNodeTabBar(ref ImGuiTabBar tabBar, byte* label) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - ImGuiPNative.DebugNodeTabBar((ImGuiTabBar*)ptabBar, label); - } - } - public static void DebugNodeTabBar(ImGuiTabBarPtr tabBar, ref byte label) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeTabBar(tabBar, (byte*)plabel); - } - } - public static void DebugNodeTabBar(ImGuiTabBarPtr tabBar, ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeTabBar(tabBar, (byte*)plabel); - } - } - public static void DebugNodeTabBar(ImGuiTabBarPtr tabBar, string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeTabBar(tabBar, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void DebugNodeTabBar(ref ImGuiTabBar tabBar, ref byte label) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeTabBar((ImGuiTabBar*)ptabBar, (byte*)plabel); - } - } - } - public static void DebugNodeTabBar(ref ImGuiTabBar tabBar, ReadOnlySpan label) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeTabBar((ImGuiTabBar*)ptabBar, (byte*)plabel); - } - } - } - public static void DebugNodeTabBar(ref ImGuiTabBar tabBar, string label) - { - fixed (ImGuiTabBar* ptabBar = &tabBar) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeTabBar((ImGuiTabBar*)ptabBar, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } public static void DebugNodeTable(ImGuiTablePtr table) { ImGuiPNative.DebugNodeTable(table); @@ -39520,104 +6468,6 @@ public unsafe partial class ImGuiP ImGuiPNative.DebugNodeInputTextState((ImGuiInputTextState*)pstate); } } - public static void DebugNodeWindow(ImGuiWindowPtr window, byte* label) - { - ImGuiPNative.DebugNodeWindow(window, label); - } - public static void DebugNodeWindow(ref ImGuiWindow window, byte* label) - { - fixed (ImGuiWindow* pwindow = &window) - { - ImGuiPNative.DebugNodeWindow((ImGuiWindow*)pwindow, label); - } - } - public static void DebugNodeWindow(ImGuiWindowPtr window, ref byte label) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeWindow(window, (byte*)plabel); - } - } - public static void DebugNodeWindow(ImGuiWindowPtr window, ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeWindow(window, (byte*)plabel); - } - } - public static void DebugNodeWindow(ImGuiWindowPtr window, string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeWindow(window, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void DebugNodeWindow(ref ImGuiWindow window, ref byte label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeWindow((ImGuiWindow*)pwindow, (byte*)plabel); - } - } - } - public static void DebugNodeWindow(ref ImGuiWindow window, ReadOnlySpan label) - { - fixed (ImGuiWindow* pwindow = &window) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeWindow((ImGuiWindow*)pwindow, (byte*)plabel); - } - } - } - public static void DebugNodeWindow(ref ImGuiWindow window, string label) - { - fixed (ImGuiWindow* pwindow = &window) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeWindow((ImGuiWindow*)pwindow, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } public static void DebugNodeWindowSettings(ImGuiWindowSettingsPtr settings) { ImGuiPNative.DebugNodeWindowSettings(settings); @@ -39629,104 +6479,6 @@ public unsafe partial class ImGuiP ImGuiPNative.DebugNodeWindowSettings((ImGuiWindowSettings*)psettings); } } - public static void DebugNodeWindowsList(ImVector* windows, byte* label) - { - ImGuiPNative.DebugNodeWindowsList(windows, label); - } - public static void DebugNodeWindowsList(ref ImVector windows, byte* label) - { - fixed (ImVector* pwindows = &windows) - { - ImGuiPNative.DebugNodeWindowsList((ImVector*)pwindows, label); - } - } - public static void DebugNodeWindowsList(ImVector* windows, ref byte label) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeWindowsList(windows, (byte*)plabel); - } - } - public static void DebugNodeWindowsList(ImVector* windows, ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeWindowsList(windows, (byte*)plabel); - } - } - public static void DebugNodeWindowsList(ImVector* windows, string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeWindowsList(windows, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void DebugNodeWindowsList(ref ImVector windows, ref byte label) - { - fixed (ImVector* pwindows = &windows) - { - fixed (byte* plabel = &label) - { - ImGuiPNative.DebugNodeWindowsList((ImVector*)pwindows, (byte*)plabel); - } - } - } - public static void DebugNodeWindowsList(ref ImVector windows, ReadOnlySpan label) - { - fixed (ImVector* pwindows = &windows) - { - fixed (byte* plabel = label) - { - ImGuiPNative.DebugNodeWindowsList((ImVector*)pwindows, (byte*)plabel); - } - } - } - public static void DebugNodeWindowsList(ref ImVector windows, string label) - { - fixed (ImVector* pwindows = &windows) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.DebugNodeWindowsList((ImVector*)pwindows, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } public static void DebugNodeWindowsListByBeginStackParent(ImGuiWindowPtrPtr windows, int windowsSize, ImGuiWindowPtr parentInBeginStack) { ImGuiPNative.DebugNodeWindowsListByBeginStackParent(windows, windowsSize, parentInBeginStack); @@ -39889,202 +6641,6 @@ public unsafe partial class ImGuiP ImGuiPNative.ImFontAtlasBuildFinish((ImFontAtlas*)patlas); } } - public static void ImFontAtlasBuildRender8bppRectFromString(ImFontAtlasPtr atlas, int textureIndex, int x, int y, int w, int h, byte* inStr, byte inMarkerChar, byte inMarkerPixelValue) - { - ImGuiPNative.ImFontAtlasBuildRender8bppRectFromString(atlas, textureIndex, x, y, w, h, inStr, inMarkerChar, inMarkerPixelValue); - } - public static void ImFontAtlasBuildRender8bppRectFromString(ref ImFontAtlas atlas, int textureIndex, int x, int y, int w, int h, byte* inStr, byte inMarkerChar, byte inMarkerPixelValue) - { - fixed (ImFontAtlas* patlas = &atlas) - { - ImGuiPNative.ImFontAtlasBuildRender8bppRectFromString((ImFontAtlas*)patlas, textureIndex, x, y, w, h, inStr, inMarkerChar, inMarkerPixelValue); - } - } - public static void ImFontAtlasBuildRender8bppRectFromString(ImFontAtlasPtr atlas, int textureIndex, int x, int y, int w, int h, ref byte inStr, byte inMarkerChar, byte inMarkerPixelValue) - { - fixed (byte* pinStr = &inStr) - { - ImGuiPNative.ImFontAtlasBuildRender8bppRectFromString(atlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); - } - } - public static void ImFontAtlasBuildRender8bppRectFromString(ImFontAtlasPtr atlas, int textureIndex, int x, int y, int w, int h, ReadOnlySpan inStr, byte inMarkerChar, byte inMarkerPixelValue) - { - fixed (byte* pinStr = inStr) - { - ImGuiPNative.ImFontAtlasBuildRender8bppRectFromString(atlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); - } - } - public static void ImFontAtlasBuildRender8bppRectFromString(ImFontAtlasPtr atlas, int textureIndex, int x, int y, int w, int h, string inStr, byte inMarkerChar, byte inMarkerPixelValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inStr != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inStr); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inStr, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.ImFontAtlasBuildRender8bppRectFromString(atlas, textureIndex, x, y, w, h, pStr0, inMarkerChar, inMarkerPixelValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void ImFontAtlasBuildRender8bppRectFromString(ref ImFontAtlas atlas, int textureIndex, int x, int y, int w, int h, ref byte inStr, byte inMarkerChar, byte inMarkerPixelValue) - { - fixed (ImFontAtlas* patlas = &atlas) - { - fixed (byte* pinStr = &inStr) - { - ImGuiPNative.ImFontAtlasBuildRender8bppRectFromString((ImFontAtlas*)patlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); - } - } - } - public static void ImFontAtlasBuildRender8bppRectFromString(ref ImFontAtlas atlas, int textureIndex, int x, int y, int w, int h, ReadOnlySpan inStr, byte inMarkerChar, byte inMarkerPixelValue) - { - fixed (ImFontAtlas* patlas = &atlas) - { - fixed (byte* pinStr = inStr) - { - ImGuiPNative.ImFontAtlasBuildRender8bppRectFromString((ImFontAtlas*)patlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); - } - } - } - public static void ImFontAtlasBuildRender8bppRectFromString(ref ImFontAtlas atlas, int textureIndex, int x, int y, int w, int h, string inStr, byte inMarkerChar, byte inMarkerPixelValue) - { - fixed (ImFontAtlas* patlas = &atlas) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inStr != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inStr); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inStr, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.ImFontAtlasBuildRender8bppRectFromString((ImFontAtlas*)patlas, textureIndex, x, y, w, h, pStr0, inMarkerChar, inMarkerPixelValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } - public static void ImFontAtlasBuildRender32bppRectFromString(ImFontAtlasPtr atlas, int textureIndex, int x, int y, int w, int h, byte* inStr, byte inMarkerChar, uint inMarkerPixelValue) - { - ImGuiPNative.ImFontAtlasBuildRender32bppRectFromString(atlas, textureIndex, x, y, w, h, inStr, inMarkerChar, inMarkerPixelValue); - } - public static void ImFontAtlasBuildRender32bppRectFromString(ref ImFontAtlas atlas, int textureIndex, int x, int y, int w, int h, byte* inStr, byte inMarkerChar, uint inMarkerPixelValue) - { - fixed (ImFontAtlas* patlas = &atlas) - { - ImGuiPNative.ImFontAtlasBuildRender32bppRectFromString((ImFontAtlas*)patlas, textureIndex, x, y, w, h, inStr, inMarkerChar, inMarkerPixelValue); - } - } - public static void ImFontAtlasBuildRender32bppRectFromString(ImFontAtlasPtr atlas, int textureIndex, int x, int y, int w, int h, ref byte inStr, byte inMarkerChar, uint inMarkerPixelValue) - { - fixed (byte* pinStr = &inStr) - { - ImGuiPNative.ImFontAtlasBuildRender32bppRectFromString(atlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); - } - } - public static void ImFontAtlasBuildRender32bppRectFromString(ImFontAtlasPtr atlas, int textureIndex, int x, int y, int w, int h, ReadOnlySpan inStr, byte inMarkerChar, uint inMarkerPixelValue) - { - fixed (byte* pinStr = inStr) - { - ImGuiPNative.ImFontAtlasBuildRender32bppRectFromString(atlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); - } - } - public static void ImFontAtlasBuildRender32bppRectFromString(ImFontAtlasPtr atlas, int textureIndex, int x, int y, int w, int h, string inStr, byte inMarkerChar, uint inMarkerPixelValue) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inStr != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inStr); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inStr, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.ImFontAtlasBuildRender32bppRectFromString(atlas, textureIndex, x, y, w, h, pStr0, inMarkerChar, inMarkerPixelValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - public static void ImFontAtlasBuildRender32bppRectFromString(ref ImFontAtlas atlas, int textureIndex, int x, int y, int w, int h, ref byte inStr, byte inMarkerChar, uint inMarkerPixelValue) - { - fixed (ImFontAtlas* patlas = &atlas) - { - fixed (byte* pinStr = &inStr) - { - ImGuiPNative.ImFontAtlasBuildRender32bppRectFromString((ImFontAtlas*)patlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); - } - } - } - public static void ImFontAtlasBuildRender32bppRectFromString(ref ImFontAtlas atlas, int textureIndex, int x, int y, int w, int h, ReadOnlySpan inStr, byte inMarkerChar, uint inMarkerPixelValue) - { - fixed (ImFontAtlas* patlas = &atlas) - { - fixed (byte* pinStr = inStr) - { - ImGuiPNative.ImFontAtlasBuildRender32bppRectFromString((ImFontAtlas*)patlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); - } - } - } - public static void ImFontAtlasBuildRender32bppRectFromString(ref ImFontAtlas atlas, int textureIndex, int x, int y, int w, int h, string inStr, byte inMarkerChar, uint inMarkerPixelValue) - { - fixed (ImFontAtlas* patlas = &atlas) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (inStr != null) - { - pStrSize0 = Utils.GetByteCountUTF8(inStr); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(inStr, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - ImGuiPNative.ImFontAtlasBuildRender32bppRectFromString((ImFontAtlas*)patlas, textureIndex, x, y, w, h, pStr0, inMarkerChar, inMarkerPixelValue); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - } - } public static void ImFontAtlasBuildMultiplyCalcLookupTable(byte* outTable, float inMultiplyFactor, float gammaFactor) { ImGuiPNative.ImFontAtlasBuildMultiplyCalcLookupTable(outTable, inMultiplyFactor, gammaFactor); @@ -40103,78 +6659,97 @@ public unsafe partial class ImGuiP ImGuiPNative.ImFontAtlasBuildMultiplyCalcLookupTable((byte*)poutTable, inMultiplyFactor, gammaFactor); } } - public static void ImFontAtlasBuildMultiplyRectAlpha8(byte* table, byte* pixels, int x, int y, int w, int h, int stride) - { - ImGuiPNative.ImFontAtlasBuildMultiplyRectAlpha8(table, pixels, x, y, w, h, stride); - } - public static void ImFontAtlasBuildMultiplyRectAlpha8(ref byte table, byte* pixels, int x, int y, int w, int h, int stride) - { - fixed (byte* ptable = &table) - { - ImGuiPNative.ImFontAtlasBuildMultiplyRectAlpha8((byte*)ptable, pixels, x, y, w, h, stride); - } - } - public static void ImFontAtlasBuildMultiplyRectAlpha8(ReadOnlySpan table, byte* pixels, int x, int y, int w, int h, int stride) - { - fixed (byte* ptable = table) - { - ImGuiPNative.ImFontAtlasBuildMultiplyRectAlpha8((byte*)ptable, pixels, x, y, w, h, stride); - } - } - public static void ImFontAtlasBuildMultiplyRectAlpha8(byte* table, ref byte pixels, int x, int y, int w, int h, int stride) - { - fixed (byte* ppixels = &pixels) - { - ImGuiPNative.ImFontAtlasBuildMultiplyRectAlpha8(table, (byte*)ppixels, x, y, w, h, stride); - } - } - public static void ImFontAtlasBuildMultiplyRectAlpha8(ref byte table, ref byte pixels, int x, int y, int w, int h, int stride) - { - fixed (byte* ptable = &table) - { - fixed (byte* ppixels = &pixels) - { - ImGuiPNative.ImFontAtlasBuildMultiplyRectAlpha8((byte*)ptable, (byte*)ppixels, x, y, w, h, stride); - } - } - } - public static void ImFontAtlasBuildMultiplyRectAlpha8(ReadOnlySpan table, ref byte pixels, int x, int y, int w, int h, int stride) - { - fixed (byte* ptable = table) - { - fixed (byte* ppixels = &pixels) - { - ImGuiPNative.ImFontAtlasBuildMultiplyRectAlpha8((byte*)ptable, (byte*)ppixels, x, y, w, h, stride); - } - } - } } -// DISCARDED: ColorEditOptionsPopup -// DISCARDED: ColorPickerOptionsPopup -// DISCARDED: DebugLog -// DISCARDED: DebugLogV -// DISCARDED: DragBehavior -// DISCARDED: FindRenderedTextEnd +// DISCARDED: internal static byte ArrowButtonExNative(byte* strId, ImGuiDir dir, Vector2 sizeArg, ImGuiButtonFlags flags) +// DISCARDED: internal static byte BeginChildExNative(byte* name, uint id, Vector2 sizeArg, byte border, ImGuiWindowFlags flags) +// DISCARDED: internal static void BeginColumnsNative(byte* strId, int count, ImGuiOldColumnFlags flags) +// DISCARDED: internal static byte BeginMenuExNative(byte* label, byte* icon, byte enabled) +// DISCARDED: internal static byte BeginTableExNative(byte* name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) +// DISCARDED: internal static byte BeginViewportSideBarNative(byte* name, ImGuiViewport* viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) +// DISCARDED: internal static byte ButtonExNative(byte* label, Vector2 sizeArg, ImGuiButtonFlags flags) +// DISCARDED: internal static byte CheckboxFlagsNative(byte* label, long* flags, long flagsValue) +// DISCARDED: internal static byte CheckboxFlagsNative(byte* label, ulong* flags, ulong flagsValue) +// DISCARDED: internal static void ColorEditOptionsPopupNative(float* col, ImGuiColorEditFlags flags) +// DISCARDED: internal static void ColorPickerOptionsPopupNative(float* refCol, ImGuiColorEditFlags flags) +// DISCARDED: internal static void ColorTooltipNative(byte* text, float* col, ImGuiColorEditFlags flags) +// DISCARDED: internal static ImGuiWindowSettings* CreateNewWindowSettingsNative(byte* name) +// DISCARDED: internal static void Custom_StbTextMakeUndoReplaceNative(ImGuiInputTextState* str, int where, int oldLength, int newLength) +// DISCARDED: internal static void Custom_StbTextUndoNative(ImGuiInputTextState* str) +// DISCARDED: internal static byte DataTypeApplyFromTextNative(byte* buf, ImGuiDataType dataType, void* pData, byte* format) +// DISCARDED: internal static void DebugLogNative(byte* fmt) +// DISCARDED: internal static void DebugLogVNative(byte* fmt, nuint args) +// DISCARDED: internal static void DebugNodeDockNodeNative(ImGuiDockNode* node, byte* label) +// DISCARDED: internal static void DebugNodeDrawListNative(ImGuiWindow* window, ImGuiViewportP* viewport, ImDrawList* drawList, byte* label) +// DISCARDED: internal static void DebugNodeStorageNative(ImGuiStorage* storage, byte* label) +// DISCARDED: internal static void DebugNodeTabBarNative(ImGuiTabBar* tabBar, byte* label) +// DISCARDED: internal static void DebugNodeWindowNative(ImGuiWindow* window, byte* label) +// DISCARDED: internal static void DebugNodeWindowsListNative(ImVector* windows, byte* label) +// DISCARDED: internal static void DockBuilderCopyWindowSettingsNative(byte* srcName, byte* dstName) +// DISCARDED: internal static void DockBuilderDockWindowNative(byte* windowName, uint nodeId) +// DISCARDED: internal static byte DragBehaviorNative(uint id, ImGuiDataType dataType, void* pV, float vSpeed, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags) +// DISCARDED: internal static ImGuiWindowSettings* FindOrCreateWindowSettingsNative(byte* name) +// DISCARDED: internal static byte* FindRenderedTextEndNative(byte* text, byte* textEnd) // DISCARDED: FindRenderedTextEndS -// DISCARDED: GetID -// DISCARDED: GetIDWithSeed -// DISCARDED: ImFormatStringToTempBuffer -// DISCARDED: ImFormatStringToTempBufferV -// DISCARDED: ImHashData -// DISCARDED: ImHashStr -// DISCARDED: ImParseFormatSanitizeForPrinting -// DISCARDED: ImParseFormatSanitizeForScanning +// DISCARDED: internal static ImGuiSettingsHandler* FindSettingsHandlerNative(byte* typeName) +// DISCARDED: internal static ImGuiWindow* FindWindowByNameNative(byte* name) +// DISCARDED: internal static uint GetColumnsIDNative(byte* strId, int count) +// DISCARDED: internal static uint GetIDNative(ImGuiWindow* self, byte* str, byte* strEnd) +// DISCARDED: internal static uint GetIDNative(ImGuiWindow* self, void* ptr) +// DISCARDED: internal static uint GetIDNative(ImGuiWindow* self, int n) +// DISCARDED: internal static uint GetIDWithSeedNative(byte* strIdBegin, byte* strIdEnd, uint seed) +// DISCARDED: internal static void* ImFileLoadToMemoryNative(byte* filename, byte* mode, nuint* outFileSize, int paddingBytes) +// DISCARDED: internal static ImFileHandle ImFileOpenNative(byte* filename, byte* mode) +// DISCARDED: internal static void ImFontAtlasBuildMultiplyRectAlpha8Native(byte* table, byte* pixels, int x, int y, int w, int h, int stride) +// DISCARDED: internal static void ImFontAtlasBuildRender32bppRectFromStringNative(ImFontAtlas* atlas, int textureIndex, int x, int y, int w, int h, byte* inStr, byte inMarkerChar, uint inMarkerPixelValue) +// DISCARDED: internal static void ImFontAtlasBuildRender8bppRectFromStringNative(ImFontAtlas* atlas, int textureIndex, int x, int y, int w, int h, byte* inStr, byte inMarkerChar, byte inMarkerPixelValue) +// DISCARDED: internal static void ImFormatStringToTempBufferNative(byte** outBuf, byte** outBufEnd, byte* fmt) +// DISCARDED: internal static void ImFormatStringToTempBufferVNative(byte** outBuf, byte** outBufEnd, byte* fmt, nuint args) +// DISCARDED: internal static ImGuiWindow* ImGuiWindowNative(ImGuiContext* context, byte* name) +// DISCARDED: internal static uint ImHashDataNative(void* data, nuint dataSize, uint seed) +// DISCARDED: internal static uint ImHashStrNative(byte* data, nuint dataSize, uint seed) +// DISCARDED: internal static byte* ImParseFormatFindEndNative(byte* format) +// DISCARDED: ImParseFormatFindEndS +// DISCARDED: internal static byte* ImParseFormatFindStartNative(byte* format) +// DISCARDED: ImParseFormatFindStartS +// DISCARDED: internal static int ImParseFormatPrecisionNative(byte* format, int defaultValue) +// DISCARDED: internal static void ImParseFormatSanitizeForPrintingNative(byte* fmtIn, byte* fmtOut, nuint fmtOutSize) +// DISCARDED: internal static byte* ImParseFormatSanitizeForScanningNative(byte* fmtIn, byte* fmtOut, nuint fmtOutSize) // DISCARDED: ImParseFormatSanitizeForScanningS -// DISCARDED: ImStrchrRange +// DISCARDED: internal static byte* ImStrchrRangeNative(byte* strBegin, byte* strEnd, byte c) // DISCARDED: ImStrchrRangeS -// DISCARDED: ImStreolRange +// DISCARDED: internal static byte* ImStrdupNative(byte* str) +// DISCARDED: internal static byte* ImStrdupcpyNative(byte* dst, nuint* pDstSize, byte* str) +// DISCARDED: ImStrdupcpyS +// DISCARDED: ImStrdupS +// DISCARDED: internal static byte* ImStreolRangeNative(byte* str, byte* strEnd) // DISCARDED: ImStreolRangeS -// DISCARDED: LogRenderedText -// DISCARDED: RenderText -// DISCARDED: RenderTextClipped -// DISCARDED: RenderTextClippedEx -// DISCARDED: RenderTextEllipsis -// DISCARDED: RenderTextWrapped -// DISCARDED: SliderBehavior -// DISCARDED: TextEx +// DISCARDED: internal static int ImStricmpNative(byte* str1, byte* str2) +// DISCARDED: internal static byte* ImStristrNative(byte* haystack, byte* haystackEnd, byte* needle, byte* needleEnd) +// DISCARDED: ImStristrS +// DISCARDED: internal static int ImStrlenWNative(ushort* str) +// DISCARDED: internal static void ImStrncpyNative(byte* dst, byte* src, nuint count) +// DISCARDED: internal static int ImStrnicmpNative(byte* str1, byte* str2, nuint count) +// DISCARDED: internal static byte* ImStrSkipBlankNative(byte* str) +// DISCARDED: ImStrSkipBlankS +// DISCARDED: internal static void ImStrTrimBlanksNative(byte* str) +// DISCARDED: internal static int ImTextCharFromUtf8Native(uint* outChar, byte* inText, byte* inTextEnd) +// DISCARDED: internal static int ImTextCountCharsFromUtf8Native(byte* inText, byte* inTextEnd) +// DISCARDED: internal static int ImTextCountUtf8BytesFromCharNative(byte* inText, byte* inTextEnd) +// DISCARDED: internal static void LogRenderedTextNative(Vector2* refPos, byte* text, byte* textEnd) +// DISCARDED: internal static void LogSetNextTextDecorationNative(byte* prefix, byte* suffix) +// DISCARDED: internal static byte MenuItemExNative(byte* label, byte* icon, byte* shortcut, byte selected, byte enabled) +// DISCARDED: internal static int PlotExNative(ImGuiPlotType plotType, byte* label, delegate*, void*, int, int, byte*, float, float, Vector2, float> valuesGetter, void* data, int valuesCount, int valuesOffset, byte* overlayText, float scaleMin, float scaleMax, Vector2 frameSize) +// DISCARDED: internal static void RemoveSettingsHandlerNative(byte* typeName) +// DISCARDED: internal static void RenderTextNative(Vector2 pos, byte* text, byte* textEnd, byte hideTextAfterHash) +// DISCARDED: internal static void RenderTextClippedNative(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRect* clipRect) +// DISCARDED: internal static void RenderTextClippedExNative(ImDrawList* drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRect* clipRect) +// DISCARDED: internal static void RenderTextEllipsisNative(ImDrawList* drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, byte* textEnd, Vector2* textSizeIfKnown) +// DISCARDED: internal static void RenderTextWrappedNative(Vector2 pos, byte* text, byte* textEnd, float wrapWidth) +// DISCARDED: internal static byte SliderBehaviorNative(ImRect bb, uint id, ImGuiDataType dataType, void* pV, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags, ImRect* outGrabBb) +// DISCARDED: internal static void TabItemCalcSizeNative(Vector2* pOut, byte* label, byte hasCloseButton) +// DISCARDED: internal static byte TabItemExNative(ImGuiTabBar* tabBar, byte* label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindow* dockedWindow) +// DISCARDED: internal static void TabItemLabelAndCloseButtonNative(ImDrawList* drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, byte* label, uint tabId, uint closeButtonId, byte isContentsVisible, bool* outJustClosed, bool* outTextClipped) +// DISCARDED: internal static byte TempInputScalarNative(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin, void* pClampMax) +// DISCARDED: internal static void TextExNative(byte* text, byte* textEnd, ImGuiTextFlags flags) +// DISCARDED: internal static byte TreeNodeBehaviorNative(uint id, ImGuiTreeNodeFlags flags, byte* label, byte* labelEnd) diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiPayload.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiPayload.gen.cs index 15fb357c9..a2db21747 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiPayload.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiPayload.gen.cs @@ -25,65 +25,6 @@ public unsafe partial struct ImGuiPayload ImGuiNative.Destroy(@this); } } - public unsafe bool IsDataType(byte* type) - { - fixed (ImGuiPayload* @this = &this) - { - byte ret = ImGuiNative.IsDataType(@this, type); - return ret != 0; - } - } - public unsafe bool IsDataType(ref byte type) - { - fixed (ImGuiPayload* @this = &this) - { - fixed (byte* ptype = &type) - { - byte ret = ImGuiNative.IsDataType(@this, (byte*)ptype); - return ret != 0; - } - } - } - public unsafe bool IsDataType(ReadOnlySpan type) - { - fixed (ImGuiPayload* @this = &this) - { - fixed (byte* ptype = type) - { - byte ret = ImGuiNative.IsDataType(@this, (byte*)ptype); - return ret != 0; - } - } - } - public unsafe bool IsDataType(string type) - { - fixed (ImGuiPayload* @this = &this) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (type != null) - { - pStrSize0 = Utils.GetByteCountUTF8(type); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(type, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.IsDataType(@this, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } public unsafe bool IsDelivery() { fixed (ImGuiPayload* @this = &this) @@ -101,4 +42,5 @@ public unsafe partial struct ImGuiPayload } } } +// DISCARDED: IsDataType diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiPayloadPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiPayloadPtr.gen.cs index c590a2db6..5dec38288 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiPayloadPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiPayloadPtr.gen.cs @@ -19,53 +19,6 @@ public unsafe partial struct ImGuiPayloadPtr { ImGuiNative.Destroy(Handle); } - public unsafe bool IsDataType(byte* type) - { - byte ret = ImGuiNative.IsDataType(Handle, type); - return ret != 0; - } - public unsafe bool IsDataType(ref byte type) - { - fixed (byte* ptype = &type) - { - byte ret = ImGuiNative.IsDataType(Handle, (byte*)ptype); - return ret != 0; - } - } - public unsafe bool IsDataType(ReadOnlySpan type) - { - fixed (byte* ptype = type) - { - byte ret = ImGuiNative.IsDataType(Handle, (byte*)ptype); - return ret != 0; - } - } - public unsafe bool IsDataType(string type) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (type != null) - { - pStrSize0 = Utils.GetByteCountUTF8(type); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(type, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.IsDataType(Handle, pStr0); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public unsafe bool IsDelivery() { byte ret = ImGuiNative.IsDelivery(Handle); @@ -77,4 +30,5 @@ public unsafe partial struct ImGuiPayloadPtr return ret != 0; } } +// DISCARDED: IsDataType diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiTextFilter.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiTextFilter.gen.cs index 4d1c7c85d..6acd610ff 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiTextFilter.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiTextFilter.gen.cs @@ -32,140 +32,6 @@ public unsafe partial struct ImGuiTextFilter ImGuiNative.Destroy(@this); } } - public unsafe bool Draw(byte* label, float width) - { - fixed (ImGuiTextFilter* @this = &this) - { - byte ret = ImGuiNative.Draw(@this, label, width); - return ret != 0; - } - } - public unsafe bool Draw(byte* label) - { - fixed (ImGuiTextFilter* @this = &this) - { - byte ret = ImGuiNative.Draw(@this, label, (float)(0.0f)); - return ret != 0; - } - } - public unsafe bool Draw() - { - fixed (ImGuiTextFilter* @this = &this) - { - bool ret = ImGui.Draw(@this, (string)"Filter(inc,-exc)", (float)(0.0f)); - return ret; - } - } - public unsafe bool Draw(float width) - { - fixed (ImGuiTextFilter* @this = &this) - { - bool ret = ImGui.Draw(@this, (string)"Filter(inc,-exc)", width); - return ret; - } - } - public unsafe bool Draw(ref byte label, float width) - { - fixed (ImGuiTextFilter* @this = &this) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Draw(@this, (byte*)plabel, width); - return ret != 0; - } - } - } - public unsafe bool Draw(ref byte label) - { - fixed (ImGuiTextFilter* @this = &this) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Draw(@this, (byte*)plabel, (float)(0.0f)); - return ret != 0; - } - } - } - public unsafe bool Draw(ReadOnlySpan label, float width) - { - fixed (ImGuiTextFilter* @this = &this) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Draw(@this, (byte*)plabel, width); - return ret != 0; - } - } - } - public unsafe bool Draw(ReadOnlySpan label) - { - fixed (ImGuiTextFilter* @this = &this) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Draw(@this, (byte*)plabel, (float)(0.0f)); - return ret != 0; - } - } - } - public unsafe bool Draw(string label, float width) - { - fixed (ImGuiTextFilter* @this = &this) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Draw(@this, pStr0, width); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } - public unsafe bool Draw(string label) - { - fixed (ImGuiTextFilter* @this = &this) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Draw(@this, pStr0, (float)(0.0f)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - } public unsafe bool IsActive() { fixed (ImGuiTextFilter* @this = &this) @@ -175,5 +41,6 @@ public unsafe partial struct ImGuiTextFilter } } } +// DISCARDED: Draw // DISCARDED: PassFilter diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiTextFilterPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiTextFilterPtr.gen.cs index 5f6a11c5d..2470cb0f6 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiTextFilterPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiTextFilterPtr.gen.cs @@ -23,115 +23,12 @@ public unsafe partial struct ImGuiTextFilterPtr { ImGuiNative.Destroy(Handle); } - public unsafe bool Draw(byte* label, float width) - { - byte ret = ImGuiNative.Draw(Handle, label, width); - return ret != 0; - } - public unsafe bool Draw(byte* label) - { - byte ret = ImGuiNative.Draw(Handle, label, (float)(0.0f)); - return ret != 0; - } - public unsafe bool Draw() - { - bool ret = ImGui.Draw(Handle, (string)"Filter(inc,-exc)", (float)(0.0f)); - return ret; - } - public unsafe bool Draw(float width) - { - bool ret = ImGui.Draw(Handle, (string)"Filter(inc,-exc)", width); - return ret; - } - public unsafe bool Draw(ref byte label, float width) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Draw(Handle, (byte*)plabel, width); - return ret != 0; - } - } - public unsafe bool Draw(ref byte label) - { - fixed (byte* plabel = &label) - { - byte ret = ImGuiNative.Draw(Handle, (byte*)plabel, (float)(0.0f)); - return ret != 0; - } - } - public unsafe bool Draw(ReadOnlySpan label, float width) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Draw(Handle, (byte*)plabel, width); - return ret != 0; - } - } - public unsafe bool Draw(ReadOnlySpan label) - { - fixed (byte* plabel = label) - { - byte ret = ImGuiNative.Draw(Handle, (byte*)plabel, (float)(0.0f)); - return ret != 0; - } - } - public unsafe bool Draw(string label, float width) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Draw(Handle, pStr0, width); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } - public unsafe bool Draw(string label) - { - byte* pStr0 = null; - int pStrSize0 = 0; - if (label != null) - { - pStrSize0 = Utils.GetByteCountUTF8(label); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - pStr0 = Utils.Alloc(pStrSize0 + 1); - } - else - { - byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; - pStr0 = pStrStack0; - } - int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); - pStr0[pStrOffset0] = 0; - } - byte ret = ImGuiNative.Draw(Handle, pStr0, (float)(0.0f)); - if (pStrSize0 >= Utils.MaxStackallocSize) - { - Utils.Free(pStr0); - } - return ret != 0; - } public unsafe bool IsActive() { byte ret = ImGuiNative.IsActive(Handle); return ret != 0; } } +// DISCARDED: Draw // DISCARDED: PassFilter diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImDrawList.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImDrawList.Custom.cs index 00c34358e..b26774588 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImDrawList.Custom.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImDrawList.Custom.cs @@ -1,36 +1,37 @@ using System.Numerics; -using System.Runtime.CompilerServices; namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImDrawList { - public void AddText(Vector2 pos, uint col, AutoUtf8Buffer text) + public void AddText(Vector2 pos, uint col, Utf8Buffer text) { - fixed (ImDrawList* thisPtr = &this) ImGui.AddText(thisPtr, pos, col, text); + fixed (ImDrawList* thisPtr = &this) + ImGui.AddText(thisPtr, pos, col, text); } public void AddText( - ImFontPtr font, float fontSize, Vector2 pos, uint col, AutoUtf8Buffer text, float wrapWidth, + ImFontPtr font, float fontSize, Vector2 pos, uint col, Utf8Buffer text, float wrapWidth, scoped in Vector4 cpuFineClipRect) { - fixed (ImDrawList* thisPtr = - &this) ImGui.AddText(thisPtr, font, fontSize, pos, col, text, wrapWidth, cpuFineClipRect); + fixed (ImDrawList* thisPtr = &this) + ImGui.AddText(thisPtr, font, fontSize, pos, col, text, wrapWidth, cpuFineClipRect); } public void AddText( - ImFontPtr font, float fontSize, Vector2 pos, uint col, AutoUtf8Buffer text, float wrapWidth = 0f) + ImFontPtr font, float fontSize, Vector2 pos, uint col, Utf8Buffer text, float wrapWidth = 0f) { - fixed (ImDrawList* thisPtr = &this) ImGui.AddText(thisPtr, font, fontSize, pos, col, text, wrapWidth); + fixed (ImDrawList* thisPtr = &this) + ImGui.AddText(thisPtr, font, fontSize, pos, col, text, wrapWidth); } } public partial struct ImDrawListPtr { - public void AddText(Vector2 pos, uint col, AutoUtf8Buffer text) => ImGui.AddText(this, pos, col, text); + public void AddText(Vector2 pos, uint col, Utf8Buffer text) => ImGui.AddText(this, pos, col, text); public void AddText( - ImFontPtr font, float fontSize, Vector2 pos, uint col, AutoUtf8Buffer text, float wrapWidth, + ImFontPtr font, float fontSize, Vector2 pos, uint col, Utf8Buffer text, float wrapWidth, scoped in Vector4 cpuFineClipRect) => ImGui.AddText( this, font, @@ -42,6 +43,6 @@ public partial struct ImDrawListPtr cpuFineClipRect); public void AddText( - ImFontPtr font, float fontSize, Vector2 pos, uint col, AutoUtf8Buffer text, float wrapWidth = 0f) => + ImFontPtr font, float fontSize, Vector2 pos, uint col, Utf8Buffer text, float wrapWidth = 0f) => ImGui.AddText(this, font, fontSize, pos, col, text, wrapWidth); } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImFont.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImFont.Custom.cs index 5f580f365..83c86515f 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImFont.Custom.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImFont.Custom.cs @@ -1,5 +1,4 @@ using System.Numerics; -using System.Runtime.CompilerServices; namespace Dalamud.Bindings.ImGui; @@ -11,7 +10,7 @@ public unsafe partial struct ImFont } public readonly void RenderText( - ImDrawListPtr drawList, float size, Vector2 pos, uint col, Vector4 clipRect, AutoUtf8Buffer text, + ImDrawListPtr drawList, float size, Vector2 pos, uint col, Vector4 clipRect, Utf8Buffer text, float wrapWidth = 0.0f, bool cpuFineClip = false) { fixed (ImFont* thisPtr = @@ -21,11 +20,11 @@ public unsafe partial struct ImFont public partial struct ImFontPtr { - public readonly int CalcWordWrapPositionA(float scale, AutoUtf8Buffer text, float wrapWidth) => + public readonly int CalcWordWrapPositionA(float scale, Utf8Buffer text, float wrapWidth) => ImGui.CalcWordWrapPositionA(this, scale, text, wrapWidth); public readonly void RenderText( - ImDrawListPtr drawList, float size, Vector2 pos, uint col, Vector4 clipRect, AutoUtf8Buffer text, + ImDrawListPtr drawList, float size, Vector2 pos, uint col, Vector4 clipRect, Utf8Buffer text, float wrapWidth = 0.0f, bool cpuFineClip = false) => ImGui.RenderText( this, drawList, diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImFontAtlas.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImFontAtlas.Custom.cs new file mode 100644 index 000000000..27c8098bc --- /dev/null +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImFontAtlas.Custom.cs @@ -0,0 +1,78 @@ +namespace Dalamud.Bindings.ImGui; + +public unsafe partial struct ImFontAtlas +{ + public ImFontPtr AddFontFromFileTTF( + Utf8Buffer filename, float sizePixels, ImFontConfigPtr fontCfg = default, ushort* glyphRanges = null) + { + fixed (ImFontAtlas* thisPtr = &this) + return ImGui.AddFontFromFileTTF(thisPtr, filename, sizePixels, fontCfg, glyphRanges); + } + + public ImFontPtr AddFontFromMemoryCompressedBase85TTF( + Utf8Buffer compressedFontDatabase85, float sizePixels, ImFontConfigPtr fontCfg = default, + ushort* glyphRanges = null) + { + fixed (ImFontAtlas* thisPtr = &this) + { + return ImGui.AddFontFromMemoryCompressedBase85TTF( + thisPtr, + compressedFontDatabase85, + sizePixels, + fontCfg, + glyphRanges); + } + } + + public ImFontPtr AddFontFromMemoryCompressedTTF( + ReadOnlySpan compressedFontData, float sizePixels, ImFontConfigPtr fontCfg = default, + ushort* glyphRanges = null) + { + fixed (ImFontAtlas* thisPtr = &this) + { + return ImGui.AddFontFromMemoryCompressedTTF( + thisPtr, + compressedFontData, + sizePixels, + fontCfg, + glyphRanges); + } + } + + public ImFontPtr AddFontFromMemoryTTF( + ReadOnlySpan fontData, float sizePixels, ImFontConfigPtr fontCfg = default, + ushort* glyphRanges = null) + { + fixed (ImFontAtlas* thisPtr = &this) + { + return ImGui.AddFontFromMemoryTTF( + thisPtr, + fontData, + sizePixels, + fontCfg, + glyphRanges); + } + } +} + +public unsafe partial struct ImFontAtlasPtr +{ + public ImFontPtr AddFontFromFileTTF( + Utf8Buffer filename, float sizePixels, ImFontConfigPtr fontCfg = default, ushort* glyphRanges = null) => + ImGui.AddFontFromFileTTF(this, filename, sizePixels, fontCfg, glyphRanges); + + public ImFontPtr AddFontFromMemoryCompressedBase85TTF( + Utf8Buffer compressedFontDatabase85, float sizePixels, ImFontConfigPtr fontCfg = default, + ushort* glyphRanges = null) => + ImGui.AddFontFromMemoryCompressedBase85TTF(this, compressedFontDatabase85, sizePixels, fontCfg, glyphRanges); + + public ImFontPtr AddFontFromMemoryCompressedTTF( + ReadOnlySpan compressedFontData, float sizePixels, ImFontConfigPtr fontCfg = default, + ushort* glyphRanges = null) => + ImGui.AddFontFromMemoryCompressedTTF(this, compressedFontData, sizePixels, fontCfg, glyphRanges); + + public ImFontPtr AddFontFromMemoryTTF( + ReadOnlySpan fontData, float sizePixels, ImFontConfigPtr fontCfg = default, + ushort* glyphRanges = null) => + ImGui.AddFontFromMemoryTTF(this, fontData, sizePixels, fontCfg, glyphRanges); +} diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImFontGlyphRangesBuilder.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImFontGlyphRangesBuilder.Custom.cs index c897bb080..48e6a8735 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImFontGlyphRangesBuilder.Custom.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImFontGlyphRangesBuilder.Custom.cs @@ -1,10 +1,8 @@ -using System.Runtime.CompilerServices; - namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImFontGlyphRangesBuilder { - public void AddText(AutoUtf8Buffer text) + public void AddText(Utf8Buffer text) { fixed (ImFontGlyphRangesBuilder* thisPtr = &this) ImGui.AddText(thisPtr, text); } @@ -12,5 +10,5 @@ public unsafe partial struct ImFontGlyphRangesBuilder public partial struct ImFontGlyphRangesBuilderPtr { - public void AddText(AutoUtf8Buffer text) => ImGui.AddText(this, text); + public void AddText(Utf8Buffer text) => ImGui.AddText(this, text); } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ColorEditPicker.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ColorEditPicker.cs index 507fd1eef..e2a5a8219 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ColorEditPicker.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ColorEditPicker.cs @@ -1,6 +1,5 @@ using System.Diagnostics.CodeAnalysis; using System.Numerics; -using System.Runtime.CompilerServices; namespace Dalamud.Bindings.ImGui; @@ -8,9 +7,9 @@ namespace Dalamud.Bindings.ImGui; public static unsafe partial class ImGui { public static bool ColorEdit3( - AutoUtf8Buffer label, scoped ref Vector3 col, ImGuiColorEditFlags flags = ImGuiColorEditFlags.None) + Utf8Buffer label, scoped ref Vector3 col, ImGuiColorEditFlags flags = ImGuiColorEditFlags.None) { - fixed (byte* labelPtr = label.NullTerminatedSpan) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) fixed (Vector3* colPtr = &col) { var res = ImGuiNative.ColorEdit3(labelPtr, &colPtr->X, flags) != 0; @@ -20,9 +19,9 @@ public static unsafe partial class ImGui } public static bool ColorEdit4( - AutoUtf8Buffer label, scoped ref Vector4 col, ImGuiColorEditFlags flags = ImGuiColorEditFlags.None) + Utf8Buffer label, scoped ref Vector4 col, ImGuiColorEditFlags flags = ImGuiColorEditFlags.None) { - fixed (byte* labelPtr = label.NullTerminatedSpan) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) fixed (Vector4* colPtr = &col) { var res = ImGuiNative.ColorEdit4(labelPtr, &colPtr->X, flags) != 0; @@ -32,9 +31,9 @@ public static unsafe partial class ImGui } public static bool ColorPicker3( - AutoUtf8Buffer label, scoped ref Vector3 col, ImGuiColorEditFlags flags = ImGuiColorEditFlags.None) + Utf8Buffer label, scoped ref Vector3 col, ImGuiColorEditFlags flags = ImGuiColorEditFlags.None) { - fixed (byte* labelPtr = label.NullTerminatedSpan) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) fixed (Vector3* colPtr = &col) { var res = ImGuiNative.ColorPicker3(labelPtr, &colPtr->X, flags) != 0; @@ -44,9 +43,9 @@ public static unsafe partial class ImGui } public static bool ColorPicker4( - AutoUtf8Buffer label, scoped ref Vector4 col, ImGuiColorEditFlags flags = ImGuiColorEditFlags.None) + Utf8Buffer label, scoped ref Vector4 col, ImGuiColorEditFlags flags = ImGuiColorEditFlags.None) { - fixed (byte* labelPtr = label.NullTerminatedSpan) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) fixed (Vector4* colPtr = &col) { var res = ImGuiNative.ColorPicker4(labelPtr, &colPtr->X, flags, null) != 0; @@ -56,9 +55,9 @@ public static unsafe partial class ImGui } public static bool ColorPicker4( - AutoUtf8Buffer label, scoped ref Vector4 col, ImGuiColorEditFlags flags, scoped in Vector4 refCol) + Utf8Buffer label, scoped ref Vector4 col, ImGuiColorEditFlags flags, scoped in Vector4 refCol) { - fixed (byte* labelPtr = label.NullTerminatedSpan) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) fixed (Vector4* colPtr = &col) fixed (Vector4* refColPtr = &refCol) { @@ -68,9 +67,9 @@ public static unsafe partial class ImGui } } - public static bool ColorPicker4(AutoUtf8Buffer label, scoped ref Vector4 col, scoped in Vector4 refCol) + public static bool ColorPicker4(Utf8Buffer label, scoped ref Vector4 col, scoped in Vector4 refCol) { - fixed (byte* labelPtr = label.NullTerminatedSpan) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) fixed (Vector4* colPtr = &col) fixed (Vector4* refColPtr = &refCol) { diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ComboAndList.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ComboAndList.cs new file mode 100644 index 000000000..eaf7fbf11 --- /dev/null +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ComboAndList.cs @@ -0,0 +1,222 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; + +namespace Dalamud.Bindings.ImGui; + +[SuppressMessage("ReSharper", "InconsistentNaming")] +public static unsafe partial class ImGui +{ + public delegate bool PopulateAutoUtf8BufferDelegate(int index, out Utf8Buffer outText); + + public delegate bool PopulateAutoUtf8BufferDelegate(scoped in T context, int index, out Utf8Buffer outText); + + public static bool Combo( + Utf8Buffer label, ref int currentItem, scoped in T items, int popupMaxHeightInItems = -1) + where T : IList => + Combo( + label, + ref currentItem, + static (scoped in T items, int index, out Utf8Buffer outText) => + { + outText = items[index]; + return true; + }, + items, + items.Count, + popupMaxHeightInItems); + + public static bool Combo( + Utf8Buffer label, ref int currentItem, IReadOnlyList items, int popupMaxHeightInItems = -1) => + Combo( + label, + ref currentItem, + static (scoped in IReadOnlyList items, int index, out Utf8Buffer outText) => + { + outText = items[index]; + return true; + }, + items, + items.Count, + popupMaxHeightInItems); + + public static bool Combo( + Utf8Buffer label, ref int currentItem, Utf8Buffer itemsSeparatedByZeros, int popupMaxHeightInItems = -1) + { + if (!itemsSeparatedByZeros.Span.EndsWith("\0\0"u8)) + itemsSeparatedByZeros.AppendFormatted("\0\0"u8); + + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (int* currentItemPtr = ¤tItem) + fixed (byte* itemsSeparatedByZerosPtr = itemsSeparatedByZeros.Span) + { + var r = ImGuiNative.Combo(labelPtr, currentItemPtr, itemsSeparatedByZerosPtr, popupMaxHeightInItems) != 0; + label.Dispose(); + itemsSeparatedByZeros.Dispose(); + return r; + } + } + + public static bool Combo( + Utf8Buffer label, ref int currentItem, PopulateAutoUtf8BufferDelegate itemsGetter, + scoped in TContext context, int itemsCount, int popupMaxHeightInItems = -1) + { + Utf8Buffer textBuffer = default; + var dataBuffer = stackalloc void*[3]; + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (int* currentItemPtr = ¤tItem) +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + fixed (TContext* contextPtr = &context) + { + dataBuffer[0] = &textBuffer; + dataBuffer[1] = &itemsGetter; + dataBuffer[2] = contextPtr; +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + var r = ImGuiNative.Combo( + labelPtr, + currentItemPtr, + (delegate*, void*, int, int, bool>) + (nint)(delegate* unmanaged)&PopulateUtf8BufferDelegateWithContext, + dataBuffer, + itemsCount, + popupMaxHeightInItems) != 0; + label.Dispose(); + textBuffer.Dispose(); + return r; + } + } + + public static bool Combo( + Utf8Buffer label, ref int currentItem, PopulateAutoUtf8BufferDelegate itemsGetter, int itemsCount, + int popupMaxHeightInItems = -1) + { + Utf8Buffer textBuffer = default; + var dataBuffer = stackalloc void*[2]; + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (int* currentItemPtr = ¤tItem) +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + { + dataBuffer[0] = &textBuffer; + dataBuffer[1] = &itemsGetter; +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + var r = ImGuiNative.Combo( + labelPtr, + currentItemPtr, + (delegate*, void*, int, int, bool>) + (nint)(delegate* unmanaged)&PopulateUtf8BufferDelegateWithoutContext, + dataBuffer, + itemsCount, + popupMaxHeightInItems) != 0; + label.Dispose(); + textBuffer.Dispose(); + return r; + } + } + + public static bool ListBox( + Utf8Buffer label, ref int currentItem, scoped in T items, int popupMaxHeightInItems = -1) + where T : IList => + ListBox( + label, + ref currentItem, + static (scoped in T items, int index, out Utf8Buffer outText) => + { + outText = items[index]; + return true; + }, + items, + items.Count, + popupMaxHeightInItems); + + public static bool ListBox( + Utf8Buffer label, ref int currentItem, IReadOnlyList items, int popupMaxHeightInItems = -1) => + ListBox( + label, + ref currentItem, + static (scoped in IReadOnlyList items, int index, out Utf8Buffer outText) => + { + outText = items[index]; + return true; + }, + items, + items.Count, + popupMaxHeightInItems); + + public static bool ListBox( + Utf8Buffer label, ref int currentItem, PopulateAutoUtf8BufferDelegate itemsGetter, + scoped in TContext context, int itemsCount, int popupMaxHeightInItems = -1) + { + Utf8Buffer textBuffer = default; + var dataBuffer = stackalloc void*[3]; + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (int* currentItemPtr = ¤tItem) +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + fixed (TContext* contextPtr = &context) + { + dataBuffer[0] = &textBuffer; + dataBuffer[1] = &itemsGetter; + dataBuffer[2] = contextPtr; +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + var r = ImGuiNative.ListBox( + labelPtr, + currentItemPtr, + (delegate*, void*, int, int, bool>) + (nint)(delegate* unmanaged)&PopulateUtf8BufferDelegateWithContext, + dataBuffer, + itemsCount, + popupMaxHeightInItems) != 0; + label.Dispose(); + textBuffer.Dispose(); + return r; + } + } + + public static bool ListBox( + Utf8Buffer label, ref int currentItem, PopulateAutoUtf8BufferDelegate itemsGetter, int itemsCount, + int popupMaxHeightInItems = -1) + { + Utf8Buffer textBuffer = default; + var dataBuffer = stackalloc void*[2]; + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (int* currentItemPtr = ¤tItem) +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + { + dataBuffer[0] = &textBuffer; + dataBuffer[1] = &itemsGetter; +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + var r = ImGuiNative.ListBox( + labelPtr, + currentItemPtr, + (delegate*, void*, int, int, bool>) + (nint)(delegate* unmanaged)&PopulateUtf8BufferDelegateWithoutContext, + dataBuffer, + itemsCount, + popupMaxHeightInItems) != 0; + label.Dispose(); + textBuffer.Dispose(); + return r; + } + } + + [UnmanagedCallersOnly] + private static bool PopulateUtf8BufferDelegateWithContext(void* data, int index, byte** text) + { +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + ref var textBuffer = ref *(Utf8Buffer*)((void**)data)[0]; + return ((PopulateAutoUtf8BufferDelegate*)((void**)data)[1])->Invoke( + *(object*)((void**)data)[2], + index, + out textBuffer); +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + } + + [UnmanagedCallersOnly] + private static bool PopulateUtf8BufferDelegateWithoutContext(void* data, int index, byte** text) + { +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + ref var textBuffer = ref *(Utf8Buffer*)((void**)data)[0]; + return ((PopulateAutoUtf8BufferDelegate*)((void**)data)[1])->Invoke( + index, + out textBuffer); +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + } +} diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.DragScalar.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.DragScalar.cs index 1191a5a1a..d039fda31 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.DragScalar.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.DragScalar.cs @@ -1,6 +1,5 @@ using System.Diagnostics.CodeAnalysis; using System.Numerics; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Dalamud.Bindings.ImGui; @@ -9,8 +8,8 @@ namespace Dalamud.Bindings.ImGui; public static unsafe partial class ImGui { public static bool DragSByte( - AutoUtf8Buffer label, scoped ref sbyte v, float vSpeed = 1.0f, sbyte vMin = 0, sbyte vMax = 0, - AutoUtf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( + Utf8Buffer label, scoped ref sbyte v, float vSpeed = 1.0f, sbyte vMin = 0, sbyte vMax = 0, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.S8, ref v, @@ -21,8 +20,8 @@ public static unsafe partial class ImGui flags); public static bool DragSByte( - AutoUtf8Buffer label, Span v, float vSpeed = 1.0f, sbyte vMin = 0, sbyte vMax = 0, - AutoUtf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( + Utf8Buffer label, Span v, float vSpeed = 1.0f, sbyte vMin = 0, sbyte vMax = 0, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.S8, v, @@ -33,8 +32,8 @@ public static unsafe partial class ImGui flags); public static bool DragByte( - AutoUtf8Buffer label, scoped ref byte v, float vSpeed = 1.0f, byte vMin = 0, byte vMax = 0, - AutoUtf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( + Utf8Buffer label, scoped ref byte v, float vSpeed = 1.0f, byte vMin = 0, byte vMax = 0, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.U8, ref v, @@ -45,8 +44,8 @@ public static unsafe partial class ImGui flags); public static bool DragByte( - AutoUtf8Buffer label, Span v, float vSpeed = 1.0f, byte vMin = 0, byte vMax = 0, - AutoUtf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( + Utf8Buffer label, Span v, float vSpeed = 1.0f, byte vMin = 0, byte vMax = 0, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.U8, v, @@ -57,8 +56,8 @@ public static unsafe partial class ImGui flags); public static bool DragShort( - AutoUtf8Buffer label, scoped ref short v, float vSpeed = 1.0f, short vMin = 0, short vMax = 0, - AutoUtf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( + Utf8Buffer label, scoped ref short v, float vSpeed = 1.0f, short vMin = 0, short vMax = 0, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.S16, ref v, @@ -69,8 +68,8 @@ public static unsafe partial class ImGui flags); public static bool DragShort( - AutoUtf8Buffer label, Span v, float vSpeed = 1.0f, short vMin = 0, short vMax = 0, - AutoUtf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( + Utf8Buffer label, Span v, float vSpeed = 1.0f, short vMin = 0, short vMax = 0, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.S16, v, @@ -81,8 +80,8 @@ public static unsafe partial class ImGui flags); public static bool DragUShort( - AutoUtf8Buffer label, scoped ref ushort v, float vSpeed = 1.0f, ushort vMin = 0, ushort vMax = 0, - AutoUtf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( + Utf8Buffer label, scoped ref ushort v, float vSpeed = 1.0f, ushort vMin = 0, ushort vMax = 0, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.U16, ref v, @@ -93,8 +92,8 @@ public static unsafe partial class ImGui flags); public static bool DragUShort( - AutoUtf8Buffer label, Span v, float vSpeed = 1.0f, ushort vMin = 0, ushort vMax = 0, - AutoUtf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( + Utf8Buffer label, Span v, float vSpeed = 1.0f, ushort vMin = 0, ushort vMax = 0, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.U16, v, @@ -105,8 +104,8 @@ public static unsafe partial class ImGui flags); public static bool DragInt( - AutoUtf8Buffer label, scoped ref int v, float vSpeed = 1.0f, int vMin = 0, int vMax = 0, - AutoUtf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( + Utf8Buffer label, scoped ref int v, float vSpeed = 1.0f, int vMin = 0, int vMax = 0, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.S32, ref v, @@ -117,8 +116,8 @@ public static unsafe partial class ImGui flags); public static bool DragInt( - AutoUtf8Buffer label, Span v, float vSpeed = 1.0f, int vMin = 0, - int vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, float vSpeed = 1.0f, int vMin = 0, + int vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.S32, @@ -130,8 +129,8 @@ public static unsafe partial class ImGui flags); public static bool DragUInt( - AutoUtf8Buffer label, scoped ref uint v, float vSpeed = 1.0f, uint vMin = 0, - uint vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref uint v, float vSpeed = 1.0f, uint vMin = 0, + uint vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.U32, @@ -143,8 +142,8 @@ public static unsafe partial class ImGui flags); public static bool DragUInt( - AutoUtf8Buffer label, Span v, float vSpeed = 1.0f, uint vMin = 0, - uint vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, float vSpeed = 1.0f, uint vMin = 0, + uint vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.U32, @@ -156,8 +155,8 @@ public static unsafe partial class ImGui flags); public static bool DragLong( - AutoUtf8Buffer label, scoped ref long v, float vSpeed = 1.0f, long vMin = 0, - long vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref long v, float vSpeed = 1.0f, long vMin = 0, + long vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.S64, @@ -169,8 +168,8 @@ public static unsafe partial class ImGui flags); public static bool DragLong( - AutoUtf8Buffer label, Span v, float vSpeed = 1.0f, long vMin = 0, - long vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, float vSpeed = 1.0f, long vMin = 0, + long vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.S64, @@ -182,8 +181,8 @@ public static unsafe partial class ImGui flags); public static bool DragULong( - AutoUtf8Buffer label, scoped ref ulong v, float vSpeed = 1.0f, - ulong vMin = 0, ulong vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref ulong v, float vSpeed = 1.0f, + ulong vMin = 0, ulong vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.U64, @@ -195,8 +194,8 @@ public static unsafe partial class ImGui flags); public static bool DragULong( - AutoUtf8Buffer label, Span v, float vSpeed = 1.0f, ulong vMin = 0, - ulong vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, float vSpeed = 1.0f, ulong vMin = 0, + ulong vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.U64, @@ -208,8 +207,8 @@ public static unsafe partial class ImGui flags); public static bool DragFloat( - AutoUtf8Buffer label, scoped ref float v, float vSpeed = 1.0f, - float vMin = 0.0f, float vMax = 0.0f, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref float v, float vSpeed = 1.0f, + float vMin = 0.0f, float vMax = 0.0f, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.Float, @@ -221,8 +220,8 @@ public static unsafe partial class ImGui flags); public static bool DragFloat( - AutoUtf8Buffer label, Span v, float vSpeed = 1.0f, float vMin = 0.0f, - float vMax = 0.0f, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, float vSpeed = 1.0f, float vMin = 0.0f, + float vMax = 0.0f, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.Float, @@ -234,8 +233,8 @@ public static unsafe partial class ImGui flags); public static bool DragFloat2( - AutoUtf8Buffer label, scoped ref Vector2 v, float vSpeed = 1.0f, - float vMin = 0.0f, float vMax = 0.0f, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref Vector2 v, float vSpeed = 1.0f, + float vMin = 0.0f, float vMax = 0.0f, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.Float, @@ -247,8 +246,8 @@ public static unsafe partial class ImGui flags); public static bool DragFloat3( - AutoUtf8Buffer label, scoped ref Vector3 v, float vSpeed = 1.0f, - float vMin = 0.0f, float vMax = 0.0f, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref Vector3 v, float vSpeed = 1.0f, + float vMin = 0.0f, float vMax = 0.0f, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.Float, @@ -260,8 +259,8 @@ public static unsafe partial class ImGui flags); public static bool DragFloat4( - AutoUtf8Buffer label, scoped ref Vector4 v, float vSpeed = 1.0f, - float vMin = 0.0f, float vMax = 0.0f, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref Vector4 v, float vSpeed = 1.0f, + float vMin = 0.0f, float vMax = 0.0f, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.Float, @@ -273,8 +272,8 @@ public static unsafe partial class ImGui flags); public static bool DragDouble( - AutoUtf8Buffer label, scoped ref double v, float vSpeed = 1.0f, - double vMin = 0.0f, double vMax = 0.0f, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref double v, float vSpeed = 1.0f, + double vMin = 0.0f, double vMax = 0.0f, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.Double, @@ -286,8 +285,8 @@ public static unsafe partial class ImGui flags); public static bool DragDouble( - AutoUtf8Buffer label, Span v, float vSpeed = 1.0f, - double vMin = 0.0f, double vMax = 0.0f, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, float vSpeed = 1.0f, + double vMin = 0.0f, double vMax = 0.0f, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.Double, @@ -299,12 +298,12 @@ public static unsafe partial class ImGui flags); public static bool DragScalar( - AutoUtf8Buffer label, ImGuiDataType dataType, scoped ref T v, float vSpeed, - scoped in T vMin, scoped in T vMax, AutoUtf8Buffer format = default, + Utf8Buffer label, ImGuiDataType dataType, scoped ref T v, float vSpeed, + scoped in T vMin, scoped in T vMax, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) where T : unmanaged, INumber, IBinaryNumber { - fixed (byte* labelPtr = label.NullTerminatedSpan) - fixed (byte* formatPtr = format.IsInitialized ? format.NullTerminatedSpan : null) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) fixed (T* vPtr = &v) fixed (T* vMinPtr = &vMin) fixed (T* vMaxPtr = &vMax) @@ -317,12 +316,12 @@ public static unsafe partial class ImGui } public static bool DragScalar( - AutoUtf8Buffer label, ImGuiDataType dataType, Span v, float vSpeed, - scoped in T vMin, scoped in T vMax, AutoUtf8Buffer format = default, + Utf8Buffer label, ImGuiDataType dataType, Span v, float vSpeed, + scoped in T vMin, scoped in T vMax, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) where T : unmanaged, INumber, IBinaryNumber { - fixed (byte* labelPtr = label.NullTerminatedSpan) - fixed (byte* formatPtr = format.IsInitialized ? format.NullTerminatedSpan : null) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) fixed (T* vPtr = v) fixed (T* vMinPtr = &vMin) fixed (T* vMaxPtr = &vMax) @@ -344,17 +343,17 @@ public static unsafe partial class ImGui } public static bool DragFloatRange2( - AutoUtf8Buffer label, scoped ref float vCurrentMin, + Utf8Buffer label, scoped ref float vCurrentMin, scoped ref float vCurrentMax, float vSpeed = 1.0f, float vMin = 0.0f, float vMax = 0.0f, - AutoUtf8Buffer format = default, - AutoUtf8Buffer formatMax = default, + Utf8Buffer format = default, + Utf8Buffer formatMax = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) { - fixed (byte* labelPtr = label.NullTerminatedSpan) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) fixed (float* vCurrentMinPtr = &vCurrentMin) fixed (float* vCurrentMaxPtr = &vCurrentMax) - fixed (byte* formatPtr = format.IsInitialized ? format.NullTerminatedSpan : "%.3f"u8) - fixed (byte* formatMaxPtr = formatMax.IsInitialized ? formatMax.NullTerminatedSpan : null) + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference("%.3f"u8)) + fixed (byte* formatMaxPtr = &formatMax.GetPinnableNullTerminatedReference()) { var res = ImGuiNative.DragFloatRange2( labelPtr, @@ -374,17 +373,17 @@ public static unsafe partial class ImGui } public static bool DragIntRange2( - AutoUtf8Buffer label, scoped ref int vCurrentMin, + Utf8Buffer label, scoped ref int vCurrentMin, scoped ref int vCurrentMax, float vSpeed = 1.0f, int vMin = 0, int vMax = 0, - AutoUtf8Buffer format = default, - AutoUtf8Buffer formatMax = default, + Utf8Buffer format = default, + Utf8Buffer formatMax = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) { - fixed (byte* labelPtr = label.NullTerminatedSpan) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) fixed (int* vCurrentMinPtr = &vCurrentMin) fixed (int* vCurrentMaxPtr = &vCurrentMax) - fixed (byte* formatPtr = format.IsInitialized ? format.NullTerminatedSpan : "%d"u8) - fixed (byte* formatMaxPtr = formatMax.IsInitialized ? formatMax.NullTerminatedSpan : null) + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference("%d"u8)) + fixed (byte* formatMaxPtr = &formatMax.GetPinnableNullTerminatedReference()) { var res = ImGuiNative.DragIntRange2( labelPtr, diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.InputScalar.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.InputScalar.cs index a8f9e96c1..fe9016e9d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.InputScalar.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.InputScalar.cs @@ -1,6 +1,5 @@ using System.Diagnostics.CodeAnalysis; using System.Numerics; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Dalamud.Bindings.ImGui; @@ -9,8 +8,8 @@ namespace Dalamud.Bindings.ImGui; public static unsafe partial class ImGui { public static bool InputSByte( - AutoUtf8Buffer label, scoped ref sbyte data, sbyte step = 0, sbyte stepFast = 0, - AutoUtf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( + Utf8Buffer label, scoped ref sbyte data, sbyte step = 0, sbyte stepFast = 0, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.S8, ref data, @@ -20,7 +19,7 @@ public static unsafe partial class ImGui flags); public static bool InputSByte( - AutoUtf8Buffer label, Span data, sbyte step = 0, sbyte stepFast = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span data, sbyte step = 0, sbyte stepFast = 0, Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.S8, @@ -31,7 +30,7 @@ public static unsafe partial class ImGui flags); public static bool InputByte( - AutoUtf8Buffer label, scoped ref byte data, byte step = 0, byte stepFast = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref byte data, byte step = 0, byte stepFast = 0, Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.U8, @@ -42,7 +41,7 @@ public static unsafe partial class ImGui flags); public static bool InputByte( - AutoUtf8Buffer label, Span data, byte step = 0, byte stepFast = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span data, byte step = 0, byte stepFast = 0, Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.U8, @@ -53,8 +52,8 @@ public static unsafe partial class ImGui flags); public static bool InputShort( - AutoUtf8Buffer label, scoped ref short data, short step = 0, short stepFast = 0, - AutoUtf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( + Utf8Buffer label, scoped ref short data, short step = 0, short stepFast = 0, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.S16, ref data, @@ -64,7 +63,7 @@ public static unsafe partial class ImGui flags); public static bool InputShort( - AutoUtf8Buffer label, Span data, short step = 0, short stepFast = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span data, short step = 0, short stepFast = 0, Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.S16, @@ -75,8 +74,8 @@ public static unsafe partial class ImGui flags); public static bool InputUShort( - AutoUtf8Buffer label, scoped ref ushort data, ushort step = 0, ushort stepFast = 0, - AutoUtf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( + Utf8Buffer label, scoped ref ushort data, ushort step = 0, ushort stepFast = 0, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.U16, ref data, @@ -86,7 +85,7 @@ public static unsafe partial class ImGui flags); public static bool InputUShort( - AutoUtf8Buffer label, Span data, ushort step = 0, ushort stepFast = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span data, ushort step = 0, ushort stepFast = 0, Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.U16, @@ -97,7 +96,7 @@ public static unsafe partial class ImGui flags); public static bool InputInt( - AutoUtf8Buffer label, scoped ref int data, int step = 0, int stepFast = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref int data, int step = 0, int stepFast = 0, Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.S32, @@ -108,7 +107,7 @@ public static unsafe partial class ImGui flags); public static bool InputInt( - AutoUtf8Buffer label, Span data, int step = 0, int stepFast = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span data, int step = 0, int stepFast = 0, Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.S32, @@ -119,7 +118,7 @@ public static unsafe partial class ImGui flags); public static bool InputUInt( - AutoUtf8Buffer label, scoped ref uint data, uint step = 0, uint stepFast = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref uint data, uint step = 0, uint stepFast = 0, Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.U32, @@ -130,7 +129,7 @@ public static unsafe partial class ImGui flags); public static bool InputUInt( - AutoUtf8Buffer label, Span data, uint step = 0, uint stepFast = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span data, uint step = 0, uint stepFast = 0, Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.U32, @@ -141,7 +140,7 @@ public static unsafe partial class ImGui flags); public static bool InputLong( - AutoUtf8Buffer label, scoped ref long data, long step = 0, long stepFast = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref long data, long step = 0, long stepFast = 0, Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.S64, @@ -152,7 +151,7 @@ public static unsafe partial class ImGui flags); public static bool InputLong( - AutoUtf8Buffer label, Span data, long step = 0, long stepFast = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span data, long step = 0, long stepFast = 0, Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.S64, @@ -163,8 +162,8 @@ public static unsafe partial class ImGui flags); public static bool InputULong( - AutoUtf8Buffer label, scoped ref ulong data, ulong step = 0, ulong stepFast = 0, - AutoUtf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( + Utf8Buffer label, scoped ref ulong data, ulong step = 0, ulong stepFast = 0, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.U64, ref data, @@ -174,7 +173,7 @@ public static unsafe partial class ImGui flags); public static bool InputULong( - AutoUtf8Buffer label, Span data, ulong step = 0, ulong stepFast = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span data, ulong step = 0, ulong stepFast = 0, Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, ImGuiDataType.U64, @@ -185,23 +184,23 @@ public static unsafe partial class ImGui flags); public static bool InputFloat( - AutoUtf8Buffer label, scoped ref float data, float step = 0.0f, + Utf8Buffer label, scoped ref float data, float step = 0.0f, float stepFast = 0.0f, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar(label, ImGuiDataType.Float, ref data, step, stepFast, format.MoveOrDefault("%.3f"u8), flags); public static bool InputFloat( - AutoUtf8Buffer label, Span data, float step = 0.0f, + Utf8Buffer label, Span data, float step = 0.0f, float stepFast = 0.0f, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar(label, ImGuiDataType.Float, data, step, stepFast, format.MoveOrDefault("%.3f"u8), flags); public static bool InputFloat2( - AutoUtf8Buffer label, scoped ref Vector2 data, float step = 0.0f, + Utf8Buffer label, scoped ref Vector2 data, float step = 0.0f, float stepFast = 0.0f, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, @@ -213,9 +212,9 @@ public static unsafe partial class ImGui flags); public static bool InputFloat3( - AutoUtf8Buffer label, scoped ref Vector3 data, float step = 0.0f, + Utf8Buffer label, scoped ref Vector3 data, float step = 0.0f, float stepFast = 0.0f, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, @@ -227,9 +226,9 @@ public static unsafe partial class ImGui flags); public static bool InputFloat4( - AutoUtf8Buffer label, scoped ref Vector4 data, float step = 0.0f, + Utf8Buffer label, scoped ref Vector4 data, float step = 0.0f, float stepFast = 0.0f, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar( label, @@ -241,28 +240,28 @@ public static unsafe partial class ImGui flags); public static bool InputDouble( - AutoUtf8Buffer label, scoped ref double data, double step = 0.0f, + Utf8Buffer label, scoped ref double data, double step = 0.0f, double stepFast = 0.0f, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar(label, ImGuiDataType.Double, ref data, step, stepFast, format.MoveOrDefault("%.3f"u8), flags); public static bool InputDouble( - AutoUtf8Buffer label, Span data, double step = 0.0f, + Utf8Buffer label, Span data, double step = 0.0f, double stepFast = 0.0f, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) => InputScalar(label, ImGuiDataType.Double, data, step, stepFast, format.MoveOrDefault("%.3f"u8), flags); public static bool InputScalar( - AutoUtf8Buffer label, ImGuiDataType dataType, scoped ref T data, + Utf8Buffer label, ImGuiDataType dataType, scoped ref T data, scoped in T step, scoped in T stepFast, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) where T : unmanaged, IBinaryNumber { - fixed (byte* labelPtr = label.NullTerminatedSpan) - fixed (byte* formatPtr = format.IsInitialized ? format.NullTerminatedSpan : null) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) fixed (T* dataPtr = &data) fixed (T* stepPtr = &step) fixed (T* stepFastPtr = &stepFast) @@ -282,14 +281,14 @@ public static unsafe partial class ImGui } public static bool InputScalar( - AutoUtf8Buffer label, ImGuiDataType dataType, Span data, + Utf8Buffer label, ImGuiDataType dataType, Span data, scoped in T step, scoped in T stepFast, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiInputTextFlags flags = ImGuiInputTextFlags.None) where T : unmanaged, INumber, IBinaryNumber { - fixed (byte* labelPtr = label.NullTerminatedSpan) - fixed (byte* formatPtr = format.IsInitialized ? format.NullTerminatedSpan : null) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) fixed (T* dataPtr = data) fixed (T* stepPtr = &step) fixed (T* stepFastPtr = &stepFast) diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Misc.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Misc.cs index 964d016a1..457f27bcf 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Misc.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Misc.cs @@ -1,18 +1,27 @@ using System.Diagnostics.CodeAnalysis; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; +using System.Text; namespace Dalamud.Bindings.ImGui; [SuppressMessage("ReSharper", "InconsistentNaming")] public static unsafe partial class ImGui { + public static ImGuiPayloadPtr AcceptDragDropPayload( + Utf8Buffer type, ImGuiDragDropFlags flags = ImGuiDragDropFlags.None) + { + fixed (byte* typePtr = &type.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.AcceptDragDropPayload(typePtr, flags); + type.Dispose(); + return r; + } + } + public static ImFontPtr AddFontFromFileTTF( - ImFontAtlasPtr self, AutoUtf8Buffer filename, float sizePixels, ImFontConfigPtr fontCfg = default, + ImFontAtlasPtr self, Utf8Buffer filename, float sizePixels, ImFontConfigPtr fontCfg = default, ushort* glyphRanges = null) { - fixed (byte* filenamePtr = filename.NullTerminatedSpan) + fixed (byte* filenamePtr = &filename.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.AddFontFromFileTTF(self, filenamePtr, sizePixels, fontCfg, glyphRanges); filename.Dispose(); @@ -21,10 +30,10 @@ public static unsafe partial class ImGui } public static ImFontPtr AddFontFromMemoryCompressedBase85TTF( - ImFontAtlasPtr self, AutoUtf8Buffer compressedFontDatabase85, float sizePixels, + ImFontAtlasPtr self, Utf8Buffer compressedFontDatabase85, float sizePixels, ImFontConfigPtr fontCfg = default, ushort* glyphRanges = null) { - fixed (byte* compressedFontDatabase85Ptr = compressedFontDatabase85.NullTerminatedSpan) + fixed (byte* compressedFontDatabase85Ptr = &compressedFontDatabase85.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.AddFontFromMemoryCompressedBase85TTF( self, @@ -65,6 +74,15 @@ public static unsafe partial class ImGui glyphRanges); } + public static void AddInputCharacter(ImGuiIOPtr self, char c) => ImGuiNative.AddInputCharacter(self, c); + public static void AddInputCharacter(ImGuiIOPtr self, Rune c) => ImGuiNative.AddInputCharacter(self, (uint)c.Value); + public static void AddInputCharacters(ImGuiIOPtr self, Utf8Buffer str) + { + fixed (byte* strPtr = &str.GetPinnableNullTerminatedReference()) + ImGuiNative.AddInputCharactersUTF8(self.Handle, strPtr); + str.Dispose(); + } + public static ref bool GetBoolRef(ImGuiStoragePtr self, uint key, bool defaultValue = false) => ref *ImGuiNative.GetBoolRef(self.Handle, key, defaultValue ? (byte)1 : (byte)0); @@ -86,7 +104,7 @@ public static unsafe partial class ImGui return ref *(T*)ImGuiNative.GetVoidPtrRef(self.Handle, key, *(void**)&defaultValue); } - public static uint GetID(AutoUtf8Buffer strId) + public static uint GetID(Utf8Buffer strId) { fixed (byte* strIdPtr = strId.Span) { @@ -100,7 +118,7 @@ public static unsafe partial class ImGui public static uint GetID(nuint ptrId) => ImGuiNative.GetID((void*)ptrId); public static uint GetID(void* ptrId) => ImGuiNative.GetID(ptrId); - public static void PushID(AutoUtf8Buffer strId) + public static void PushID(Utf8Buffer strId) { fixed (byte* strIdPtr = strId.Span) { @@ -115,6 +133,3 @@ public static unsafe partial class ImGui public static void PushID(void* ptrId) => ImGuiNative.PushID(ptrId); } - -// DISCARDED: PlotHistogram -// DISCARDED: PlotLines diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Plot.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Plot.cs new file mode 100644 index 000000000..3e715cc1e --- /dev/null +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Plot.cs @@ -0,0 +1,193 @@ +using System.Diagnostics.CodeAnalysis; +using System.Numerics; +using System.Runtime.InteropServices; + +namespace Dalamud.Bindings.ImGui; + +[SuppressMessage("ReSharper", "InconsistentNaming")] +public static unsafe partial class ImGui +{ + public delegate float GetFloatDelegate(int index); + + public delegate float GetFloatDelegate(scoped in T context, int index); + + public static void PlotHistogram( + Utf8Buffer label, ReadOnlySpan values, int valuesOffset = 0, Utf8Buffer overlayText = default, + float scaleMin = float.MaxValue, float scaleMax = float.MaxValue, Vector2 graphSize = default, + int stride = sizeof(float)) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (float* valuesPtr = values) + fixed (byte* overlayTextPtr = &overlayText.GetPinnableNullTerminatedReference()) + { + ImGuiNative.PlotHistogram( + labelPtr, + valuesPtr, + values.Length, + valuesOffset, + overlayTextPtr, + scaleMin, + scaleMax, + graphSize, + stride); + } + + label.Dispose(); + overlayText.Dispose(); + } + + public static void PlotHistogram( + Utf8Buffer label, GetFloatDelegate valuesGetter, scoped in TContext context, int valuesCount, + int valuesOffset = 0, Utf8Buffer overlayText = default, float scaleMin = float.MaxValue, + float scaleMax = float.MaxValue, Vector2 graphSize = default) + { + var dataBuffer = stackalloc void*[2]; + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* overlayTextPtr = &overlayText.GetPinnableNullTerminatedReference()) +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + fixed (TContext* contextPtr = &context) + { + dataBuffer[0] = &valuesGetter; + dataBuffer[1] = contextPtr; +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + ImGuiNative.PlotHistogram( + labelPtr, + (delegate*, void*, int, int, byte*, float, float, Vector2, float>) + (nint)(delegate* unmanaged)&GetFloatWithContext, + dataBuffer, + valuesCount, + valuesOffset, + overlayTextPtr, + scaleMin, + scaleMax, + graphSize); + } + + label.Dispose(); + overlayText.Dispose(); + } + + public static void PlotHistogram( + Utf8Buffer label, GetFloatDelegate valuesGetter, int valuesCount, + int valuesOffset = 0, Utf8Buffer overlayText = default, float scaleMin = float.MaxValue, + float scaleMax = float.MaxValue, Vector2 graphSize = default) + { + var dataBuffer = stackalloc void*[1]; + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* overlayTextPtr = &overlayText.GetPinnableNullTerminatedReference()) +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + { + dataBuffer[0] = &valuesGetter; +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + ImGuiNative.PlotHistogram( + labelPtr, + (delegate*, void*, int, int, byte*, float, float, Vector2, float>) + (nint)(delegate* unmanaged)&GetFloatWithContext, + dataBuffer, + valuesCount, + valuesOffset, + overlayTextPtr, + scaleMin, + scaleMax, + graphSize); + } + + label.Dispose(); + overlayText.Dispose(); + } + + public static void PlotLines( + Utf8Buffer label, ReadOnlySpan values, int valuesOffset = 0, Utf8Buffer overlayText = default, + float scaleMin = float.MaxValue, float scaleMax = float.MaxValue, Vector2 graphSize = default, + int stride = sizeof(float)) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (float* valuesPtr = values) + fixed (byte* overlayTextPtr = &overlayText.GetPinnableNullTerminatedReference()) + { + ImGuiNative.PlotLines( + labelPtr, + valuesPtr, + values.Length, + valuesOffset, + overlayTextPtr, + scaleMin, + scaleMax, + graphSize, + stride); + } + + label.Dispose(); + overlayText.Dispose(); + } + + public static void PlotLines( + Utf8Buffer label, GetFloatDelegate valuesGetter, scoped in TContext context, int valuesCount, + int valuesOffset = 0, Utf8Buffer overlayText = default, float scaleMin = float.MaxValue, + float scaleMax = float.MaxValue, Vector2 graphSize = default) + { + var dataBuffer = stackalloc void*[2]; + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* overlayTextPtr = &overlayText.GetPinnableNullTerminatedReference()) +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + fixed (TContext* contextPtr = &context) + { + dataBuffer[0] = &valuesGetter; + dataBuffer[1] = contextPtr; +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + ImGuiNative.PlotLines( + labelPtr, + (delegate*, void*, int, int, byte*, float, float, Vector2, float>) + (nint)(delegate* unmanaged)&GetFloatWithContext, + dataBuffer, + valuesCount, + valuesOffset, + overlayTextPtr, + scaleMin, + scaleMax, + graphSize); + } + + label.Dispose(); + overlayText.Dispose(); + } + + public static void PlotLines( + Utf8Buffer label, GetFloatDelegate valuesGetter, int valuesCount, + int valuesOffset = 0, Utf8Buffer overlayText = default, float scaleMin = float.MaxValue, + float scaleMax = float.MaxValue, Vector2 graphSize = default) + { + var dataBuffer = stackalloc void*[1]; + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* overlayTextPtr = &overlayText.GetPinnableNullTerminatedReference()) +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + { + dataBuffer[0] = &valuesGetter; +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + ImGuiNative.PlotLines( + labelPtr, + (delegate*, void*, int, int, byte*, float, float, Vector2, float>) + (nint)(delegate* unmanaged)&GetFloatWithContext, + dataBuffer, + valuesCount, + valuesOffset, + overlayTextPtr, + scaleMin, + scaleMax, + graphSize); + } + + label.Dispose(); + overlayText.Dispose(); + } + +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + [UnmanagedCallersOnly] + private static float GetFloatWithContext(void* data, int index) => + ((GetFloatDelegate*)((void**)data)[0])->Invoke(*(object*)((void**)data)[1], index); + + [UnmanagedCallersOnly] + private static float GetFloatWithoutContext(void* data, int index) => + ((GetFloatDelegate*)((void**)data)[0])->Invoke(index); +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type +} diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.SliderScalar.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.SliderScalar.cs index 8abaea45e..f94df875b 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.SliderScalar.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.SliderScalar.cs @@ -1,6 +1,5 @@ using System.Diagnostics.CodeAnalysis; using System.Numerics; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Dalamud.Bindings.ImGui; @@ -9,7 +8,7 @@ namespace Dalamud.Bindings.ImGui; public static unsafe partial class ImGui { public static bool SliderSByte( - AutoUtf8Buffer label, scoped ref sbyte v, sbyte vMin = 0, sbyte vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref sbyte v, sbyte vMin = 0, sbyte vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.S8, @@ -20,7 +19,7 @@ public static unsafe partial class ImGui flags); public static bool SliderSByte( - AutoUtf8Buffer label, Span v, sbyte vMin = 0, sbyte vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, sbyte vMin = 0, sbyte vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.S8, @@ -31,7 +30,7 @@ public static unsafe partial class ImGui flags); public static bool SliderByte( - AutoUtf8Buffer label, scoped ref byte v, byte vMin = 0, byte vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref byte v, byte vMin = 0, byte vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.U8, @@ -42,7 +41,7 @@ public static unsafe partial class ImGui flags); public static bool SliderByte( - AutoUtf8Buffer label, Span v, byte vMin = 0, byte vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, byte vMin = 0, byte vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.U8, @@ -53,7 +52,7 @@ public static unsafe partial class ImGui flags); public static bool SliderShort( - AutoUtf8Buffer label, scoped ref short v, short vMin = 0, short vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref short v, short vMin = 0, short vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.S16, @@ -64,7 +63,7 @@ public static unsafe partial class ImGui flags); public static bool SliderShort( - AutoUtf8Buffer label, Span v, short vMin = 0, short vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, short vMin = 0, short vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.S16, @@ -75,7 +74,7 @@ public static unsafe partial class ImGui flags); public static bool SliderUShort( - AutoUtf8Buffer label, scoped ref ushort v, ushort vMin = 0, ushort vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref ushort v, ushort vMin = 0, ushort vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.U16, @@ -86,7 +85,7 @@ public static unsafe partial class ImGui flags); public static bool SliderUShort( - AutoUtf8Buffer label, Span v, ushort vMin = 0, ushort vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, ushort vMin = 0, ushort vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.U16, @@ -97,7 +96,7 @@ public static unsafe partial class ImGui flags); public static bool SliderInt( - AutoUtf8Buffer label, scoped ref int v, int vMin = 0, int vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref int v, int vMin = 0, int vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.S32, @@ -108,7 +107,7 @@ public static unsafe partial class ImGui flags); public static bool SliderInt( - AutoUtf8Buffer label, Span v, int vMin = 0, int vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, int vMin = 0, int vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.S32, @@ -119,7 +118,7 @@ public static unsafe partial class ImGui flags); public static bool SliderUInt( - AutoUtf8Buffer label, scoped ref uint v, uint vMin = 0, uint vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref uint v, uint vMin = 0, uint vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.U32, @@ -130,7 +129,7 @@ public static unsafe partial class ImGui flags); public static bool SliderUInt( - AutoUtf8Buffer label, Span v, uint vMin = 0, uint vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, uint vMin = 0, uint vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.U32, @@ -141,7 +140,7 @@ public static unsafe partial class ImGui flags); public static bool SliderLong( - AutoUtf8Buffer label, scoped ref long v, long vMin = 0, long vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref long v, long vMin = 0, long vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.S64, @@ -152,7 +151,7 @@ public static unsafe partial class ImGui flags); public static bool SliderLong( - AutoUtf8Buffer label, Span v, long vMin = 0, long vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, long vMin = 0, long vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.S64, @@ -163,7 +162,7 @@ public static unsafe partial class ImGui flags); public static bool SliderULong( - AutoUtf8Buffer label, scoped ref ulong v, ulong vMin = 0, ulong vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref ulong v, ulong vMin = 0, ulong vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.U64, @@ -174,7 +173,7 @@ public static unsafe partial class ImGui flags); public static bool SliderULong( - AutoUtf8Buffer label, Span v, ulong vMin = 0, ulong vMax = 0, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, ulong vMin = 0, ulong vMax = 0, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.U64, @@ -185,7 +184,7 @@ public static unsafe partial class ImGui flags); public static bool SliderFloat( - AutoUtf8Buffer label, scoped ref float v, float vMin = 0.0f, float vMax = 0.0f, AutoUtf8Buffer format = default, + Utf8Buffer label, scoped ref float v, float vMin = 0.0f, float vMax = 0.0f, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.Float, @@ -196,7 +195,7 @@ public static unsafe partial class ImGui flags); public static bool SliderFloat( - AutoUtf8Buffer label, Span v, float vMin = 0.0f, float vMax = 0.0f, AutoUtf8Buffer format = default, + Utf8Buffer label, Span v, float vMin = 0.0f, float vMax = 0.0f, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.Float, @@ -207,8 +206,8 @@ public static unsafe partial class ImGui flags); public static bool SliderFloat2( - AutoUtf8Buffer label, scoped ref Vector2 v, float vMin = 0.0f, float vMax = 0.0f, - AutoUtf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( + Utf8Buffer label, scoped ref Vector2 v, float vMin = 0.0f, float vMax = 0.0f, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.Float, MemoryMarshal.Cast(new(ref v)), @@ -218,8 +217,8 @@ public static unsafe partial class ImGui flags); public static bool SliderFloat3( - AutoUtf8Buffer label, scoped ref Vector3 v, float vMin = 0.0f, float vMax = 0.0f, - AutoUtf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => + Utf8Buffer label, scoped ref Vector3 v, float vMin = 0.0f, float vMax = 0.0f, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.Float, @@ -230,9 +229,9 @@ public static unsafe partial class ImGui flags); public static bool SliderFloat4( - AutoUtf8Buffer label, scoped ref Vector4 v, float vMin = 0.0f, + Utf8Buffer label, scoped ref Vector4 v, float vMin = 0.0f, float vMax = 0.0f, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, @@ -244,28 +243,28 @@ public static unsafe partial class ImGui flags); public static bool SliderDouble( - AutoUtf8Buffer label, scoped ref double v, double vMin = 0.0f, + Utf8Buffer label, scoped ref double v, double vMin = 0.0f, double vMax = 0.0f, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar(label, ImGuiDataType.Double, ref v, vMin, vMax, format.MoveOrDefault("%.3f"u8), flags); public static bool SliderDouble( - AutoUtf8Buffer label, Span v, double vMin = 0.0f, + Utf8Buffer label, Span v, double vMin = 0.0f, double vMax = 0.0f, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar(label, ImGuiDataType.Double, v, vMin, vMax, format.MoveOrDefault("%.3f"u8), flags); public static bool SliderScalar( - AutoUtf8Buffer label, ImGuiDataType dataType, scoped ref T v, + Utf8Buffer label, ImGuiDataType dataType, scoped ref T v, scoped in T vMin, scoped in T vMax, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) where T : unmanaged, IBinaryNumber { - fixed (byte* labelPtr = label.NullTerminatedSpan) - fixed (byte* formatPtr = format.IsInitialized ? format.NullTerminatedSpan : null) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) fixed (T* vPtr = &v) fixed (T* vMinPtr = &vMin) fixed (T* vMaxPtr = &vMax) @@ -285,14 +284,14 @@ public static unsafe partial class ImGui } public static bool SliderScalar( - AutoUtf8Buffer label, ImGuiDataType dataType, Span v, scoped in T vMin, + Utf8Buffer label, ImGuiDataType dataType, Span v, scoped in T vMin, scoped in T vMax, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) where T : unmanaged, INumber, IBinaryNumber { - fixed (byte* labelPtr = label.NullTerminatedSpan) - fixed (byte* formatPtr = format.IsInitialized ? format.NullTerminatedSpan : null) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) fixed (T* vPtr = v) fixed (T* vMinPtr = &vMin) fixed (T* vMaxPtr = &vMax) @@ -313,13 +312,13 @@ public static unsafe partial class ImGui } public static bool SliderAngle( - AutoUtf8Buffer label, ref float vRad, float vDegreesMin = -360.0f, + Utf8Buffer label, ref float vRad, float vDegreesMin = -360.0f, float vDegreesMax = +360.0f, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) { - fixed (byte* labelPtr = label.NullTerminatedSpan) - fixed (byte* formatPtr = format.IsInitialized ? format.NullTerminatedSpan : "%.0f deg"u8) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference("%.0f deg"u8)) fixed (float* vRadPtr = &vRad) { var res = ImGuiNative.SliderAngle( @@ -336,76 +335,76 @@ public static unsafe partial class ImGui } public static bool VSliderSByte( - AutoUtf8Buffer label, Vector2 size, scoped ref sbyte v, sbyte vMin, - sbyte vMax, AutoUtf8Buffer format = default, + Utf8Buffer label, Vector2 size, scoped ref sbyte v, sbyte vMin, + sbyte vMax, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => VSliderScalar(label, size, ImGuiDataType.S8, ref v, vMin, vMax, format.MoveOrDefault("%hhd"), flags); public static bool VSliderByte( - AutoUtf8Buffer label, Vector2 size, scoped ref byte v, byte vMin, byte vMax, - AutoUtf8Buffer format = default, + Utf8Buffer label, Vector2 size, scoped ref byte v, byte vMin, byte vMax, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => VSliderScalar(label, size, ImGuiDataType.U8, ref v, vMin, vMax, format.MoveOrDefault("%hhu"), flags); public static bool VSliderShort( - AutoUtf8Buffer label, Vector2 size, scoped ref short v, short vMin, - short vMax, AutoUtf8Buffer format = default, + Utf8Buffer label, Vector2 size, scoped ref short v, short vMin, + short vMax, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => VSliderScalar(label, size, ImGuiDataType.S16, ref v, vMin, vMax, format.MoveOrDefault("%hd"), flags); public static bool VSliderUShort( - AutoUtf8Buffer label, Vector2 size, scoped ref ushort v, ushort vMin, + Utf8Buffer label, Vector2 size, scoped ref ushort v, ushort vMin, ushort vMax, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => VSliderScalar(label, size, ImGuiDataType.U16, ref v, vMin, vMax, format.MoveOrDefault("%hu"), flags); public static bool VSliderInt( - AutoUtf8Buffer label, Vector2 size, scoped ref int v, int vMin, int vMax, - AutoUtf8Buffer format = default, + Utf8Buffer label, Vector2 size, scoped ref int v, int vMin, int vMax, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => VSliderScalar(label, size, ImGuiDataType.S32, ref v, vMin, vMax, format.MoveOrDefault("%d"), flags); public static bool VSliderUInt( - AutoUtf8Buffer label, Vector2 size, scoped ref uint v, uint vMin, uint vMax, - AutoUtf8Buffer format = default, + Utf8Buffer label, Vector2 size, scoped ref uint v, uint vMin, uint vMax, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => VSliderScalar(label, size, ImGuiDataType.U32, ref v, vMin, vMax, format.MoveOrDefault("%u"), flags); public static bool VSliderLong( - AutoUtf8Buffer label, Vector2 size, scoped ref long v, long vMin, long vMax, - AutoUtf8Buffer format = default, + Utf8Buffer label, Vector2 size, scoped ref long v, long vMin, long vMax, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => VSliderScalar(label, size, ImGuiDataType.S32, ref v, vMin, vMax, format.MoveOrDefault("%I64d"), flags); public static bool VSliderULong( - AutoUtf8Buffer label, Vector2 size, scoped ref ulong v, ulong vMin, - ulong vMax, AutoUtf8Buffer format = default, + Utf8Buffer label, Vector2 size, scoped ref ulong v, ulong vMin, + ulong vMax, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => VSliderScalar(label, size, ImGuiDataType.U32, ref v, vMin, vMax, format.MoveOrDefault("%I64u"), flags); public static bool VSliderFloat( - AutoUtf8Buffer label, Vector2 size, scoped ref float v, float vMin, - float vMax, AutoUtf8Buffer format = default, + Utf8Buffer label, Vector2 size, scoped ref float v, float vMin, + float vMax, Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => VSliderScalar(label, size, ImGuiDataType.Float, ref v, vMin, vMax, format.MoveOrDefault("%.03f"), flags); public static bool VSliderDouble( - AutoUtf8Buffer label, Vector2 size, scoped ref double v, double vMin, + Utf8Buffer label, Vector2 size, scoped ref double v, double vMin, double vMax, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => VSliderScalar(label, size, ImGuiDataType.Double, ref v, vMin, vMax, format.MoveOrDefault("%.03f"), flags); public static bool VSliderScalar( - AutoUtf8Buffer label, Vector2 size, ImGuiDataType dataType, + Utf8Buffer label, Vector2 size, ImGuiDataType dataType, scoped ref T data, scoped in T min, scoped in T max, - AutoUtf8Buffer format = default, + Utf8Buffer format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) where T : unmanaged, IBinaryNumber { - fixed (byte* labelPtr = label.NullTerminatedSpan) - fixed (byte* formatPtr = format.IsInitialized ? format.NullTerminatedSpan : null) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) fixed (T* dataPtr = &data) fixed (T* minPtr = &min) fixed (T* maxPtr = &max) diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Text.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Text.cs index d75e36b5e..b6fcdb20c 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Text.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Text.cs @@ -6,20 +6,20 @@ namespace Dalamud.Bindings.ImGui; [SuppressMessage("ReSharper", "InconsistentNaming")] public static unsafe partial class ImGui { - public static void AddText(ImFontGlyphRangesBuilderPtr self, AutoUtf8Buffer text) + public static void AddText(ImFontGlyphRangesBuilderPtr self, Utf8Buffer text) { fixed (byte* textPtr = text.Span) ImGuiNative.AddText(self.Handle, textPtr, textPtr + text.Length); text.Dispose(); } - public static void AddText(ImDrawListPtr self, Vector2 pos, uint col, AutoUtf8Buffer text) + public static void AddText(ImDrawListPtr self, Vector2 pos, uint col, Utf8Buffer text) { fixed (byte* textPtr = text.Span) ImGuiNative.AddText(self.Handle, pos, col, textPtr, textPtr + text.Length); text.Dispose(); } public static void AddText( - ImDrawListPtr self, ImFontPtr font, float fontSize, Vector2 pos, uint col, AutoUtf8Buffer text, float wrapWidth, + ImDrawListPtr self, ImFontPtr font, float fontSize, Vector2 pos, uint col, Utf8Buffer text, float wrapWidth, scoped in Vector4 cpuFineClipRect) { fixed (byte* textPtr = text.Span) @@ -38,7 +38,7 @@ public static unsafe partial class ImGui } public static void AddText( - ImDrawListPtr self, ImFontPtr font, float fontSize, Vector2 pos, uint col, AutoUtf8Buffer text, + ImDrawListPtr self, ImFontPtr font, float fontSize, Vector2 pos, uint col, Utf8Buffer text, float wrapWidth = 0f) { fixed (byte* textPtr = text.Span) @@ -46,13 +46,13 @@ public static unsafe partial class ImGui text.Dispose(); } - public static void append(ImGuiTextBufferPtr self, AutoUtf8Buffer str) + public static void append(ImGuiTextBufferPtr self, Utf8Buffer str) { fixed (byte* strPtr = str.Span) ImGuiNative.append(self.Handle, strPtr, strPtr + str.Length); str.Dispose(); } - public static void BulletText(AutoUtf8Buffer text) + public static void BulletText(Utf8Buffer text) { ImGuiWindow* window = ImGuiP.GetCurrentWindow(); if (window->SkipItems != 0) return; @@ -79,7 +79,7 @@ public static unsafe partial class ImGui } public static Vector2 CalcTextSize( - AutoUtf8Buffer text, bool hideTextAfterDoubleHash = false, float wrapWidth = -1.0f) + Utf8Buffer text, bool hideTextAfterDoubleHash = false, float wrapWidth = -1.0f) { var @out = Vector2.Zero; fixed (byte* textPtr = text.Span) @@ -94,7 +94,7 @@ public static unsafe partial class ImGui } public static Vector2 CalcTextSizeA( - ImFontPtr self, float size, float maxWidth, float wrapWidth, AutoUtf8Buffer text, out int remaining) + ImFontPtr self, float size, float maxWidth, float wrapWidth, Utf8Buffer text, out int remaining) { var @out = Vector2.Zero; fixed (byte* textPtr = text.Span) @@ -117,7 +117,7 @@ public static unsafe partial class ImGui } public static int CalcWordWrapPositionA( - ImFontPtr font, float scale, AutoUtf8Buffer text, float wrapWidth) + ImFontPtr font, float scale, Utf8Buffer text, float wrapWidth) { fixed (byte* ptr = text.Span) { @@ -129,7 +129,7 @@ public static unsafe partial class ImGui } public static void InsertChars( - ImGuiInputTextCallbackDataPtr self, int pos, AutoUtf8Buffer text) + ImGuiInputTextCallbackDataPtr self, int pos, Utf8Buffer text) { fixed (byte* ptr = text.Span) ImGuiNative.InsertChars(self.Handle, pos, ptr, ptr + text.Length); @@ -137,8 +137,8 @@ public static unsafe partial class ImGui } public static void LabelText( - AutoUtf8Buffer label, - AutoUtf8Buffer text) + Utf8Buffer label, + Utf8Buffer text) { var window = ImGuiP.GetCurrentWindow().Handle; if (window->SkipItems != 0) @@ -183,7 +183,7 @@ public static unsafe partial class ImGui text.Dispose(); } - public static void LogText(AutoUtf8Buffer text) + public static void LogText(Utf8Buffer text) { var g = GetCurrentContext(); if (!g.LogFile.IsNull) @@ -201,7 +201,7 @@ public static unsafe partial class ImGui text.Dispose(); } - public static void PassFilter(ImGuiTextFilterPtr self, AutoUtf8Buffer text) + public static void PassFilter(ImGuiTextFilterPtr self, Utf8Buffer text) { fixed (byte* textPtr = text.Span) ImGuiNative.PassFilter(self.Handle, textPtr, textPtr + text.Length); @@ -210,7 +210,7 @@ public static unsafe partial class ImGui public static void RenderText( ImFontPtr self, ImDrawListPtr drawList, float size, Vector2 pos, uint col, Vector4 clipRect, - AutoUtf8Buffer text, float wrapWidth = 0.0f, bool cpuFineClip = false) + Utf8Buffer text, float wrapWidth = 0.0f, bool cpuFineClip = false) { fixed (byte* textPtr = text.Span) ImGuiNative.RenderText( @@ -227,7 +227,7 @@ public static unsafe partial class ImGui text.Dispose(); } - public static void SetTooltip(AutoUtf8Buffer text) + public static void SetTooltip(Utf8Buffer text) { ImGuiP.BeginTooltipEx(ImGuiTooltipFlags.OverridePreviousTooltip, ImGuiWindowFlags.None); Text(text.Span); @@ -235,14 +235,14 @@ public static unsafe partial class ImGui text.Dispose(); } - public static void Text(AutoUtf8Buffer text) + public static void Text(Utf8Buffer text) { fixed (byte* ptr = text.Span) ImGuiNative.TextUnformatted(ptr, ptr + text.Length); text.Dispose(); } - public static void TextColored(uint col, AutoUtf8Buffer text) + public static void TextColored(uint col, Utf8Buffer text) { PushStyleColor(ImGuiCol.Text, col); Text(text.Span); @@ -250,7 +250,7 @@ public static unsafe partial class ImGui text.Dispose(); } - public static void TextColored(scoped in Vector4 col, AutoUtf8Buffer text) + public static void TextColored(scoped in Vector4 col, Utf8Buffer text) { PushStyleColor(ImGuiCol.Text, col); Text(text.Span); @@ -258,19 +258,19 @@ public static unsafe partial class ImGui text.Dispose(); } - public static void TextDisabled(AutoUtf8Buffer text) + public static void TextDisabled(Utf8Buffer text) { TextColored(*GetStyleColorVec4(ImGuiCol.TextDisabled), text.Span); text.Dispose(); } - public static void TextUnformatted(AutoUtf8Buffer text) + public static void TextUnformatted(Utf8Buffer text) { Text(text.Span); text.Dispose(); } - public static void TextWrapped(AutoUtf8Buffer text) + public static void TextWrapped(Utf8Buffer text) { scoped ref var g = ref *GetCurrentContext().Handle; var needBackup = g.CurrentWindow->DC.TextWrapPos < 0.0f; // Keep existing wrap position if one is already set @@ -282,7 +282,7 @@ public static unsafe partial class ImGui text.Dispose(); } - public static bool TreeNode(AutoUtf8Buffer label) + public static bool TreeNode(Utf8Buffer label) { var window = ImGuiP.GetCurrentWindow(); if (window.SkipItems) @@ -291,21 +291,17 @@ public static unsafe partial class ImGui return false; } - fixed (byte* labelPtr = label.Span) - { - var res = ImGuiP.TreeNodeBehavior( - window.Handle->GetID(label.Span), - ImGuiTreeNodeFlags.None, - labelPtr, - labelPtr + ImGuiP.FindRenderedTextEnd(label.Span, out _, out _)); - label.Dispose(); - return res; - } + var res = ImGuiP.TreeNodeBehavior( + window.Handle->GetID(label.Span), + ImGuiTreeNodeFlags.None, + label.Span[..ImGuiP.FindRenderedTextEnd(label.Span, out _, out _)]); + label.Dispose(); + return res; } public static bool TreeNodeEx( - AutoUtf8Buffer id, ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags.None, - AutoUtf8Buffer label = default) + Utf8Buffer id, ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags.None, + Utf8Buffer label = default) { var window = ImGuiP.GetCurrentWindow(); bool res; @@ -313,21 +309,16 @@ public static unsafe partial class ImGui { res = false; } - else if (label.IsEmpty) + else if (label.IsNull) { - fixed (byte* ptr = id.Span) - { - res = ImGuiP.TreeNodeBehavior( - window.Handle->GetID(id.Span), - flags, - ptr, - ptr + ImGuiP.FindRenderedTextEnd(id.Span, out _, out _)); - } + res = ImGuiP.TreeNodeBehavior( + window.Handle->GetID(id.Span), + flags, + id.Span[..ImGuiP.FindRenderedTextEnd(id.Span, out _, out _)]); } else { - fixed (byte* ptr = label.Span) - res = ImGuiP.TreeNodeBehavior(window.Handle->GetID(id.Span), flags, ptr, ptr + label.Length); + res = ImGuiP.TreeNodeBehavior(window.Handle->GetID(id.Span), flags, label.Span[..label.Length]); } id.Dispose(); diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs new file mode 100644 index 000000000..79767cc98 --- /dev/null +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs @@ -0,0 +1,654 @@ +using System.Diagnostics.CodeAnalysis; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui; + +[SuppressMessage("ReSharper", "InconsistentNaming")] +public static unsafe partial class ImGui +{ + public static bool Begin(Utf8Buffer name, ref bool open, ImGuiWindowFlags flags = ImGuiWindowFlags.None) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + fixed (bool* openPtr = &open) + { + var r = ImGuiNative.Begin(namePtr, openPtr, flags) != 0; + name.Dispose(); + return r; + } + } + + public static bool Begin(Utf8Buffer name, ImGuiWindowFlags flags = ImGuiWindowFlags.None) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.Begin(namePtr, null, flags) != 0; + name.Dispose(); + return r; + } + } + + public static bool BeginChild(Utf8Buffer strId, Vector2 size = default, bool border = false, ImGuiWindowFlags flags = ImGuiWindowFlags.None) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.BeginChild(strIdPtr, size, border ? (byte)1 : (byte)0, flags) != 0; + strId.Dispose(); + return r; + } + } + + public static bool BeginChild(uint id, Vector2 size = default, bool border = false, ImGuiWindowFlags flags = ImGuiWindowFlags.None) => + ImGuiNative.BeginChild(id, size, border ? (byte)1 : (byte)0, flags) != 0; + + public static bool BeginCombo(Utf8Buffer label, Utf8Buffer previewValue, ImGuiComboFlags flags = ImGuiComboFlags.None) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* previewValuePtr = &previewValue.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.BeginCombo(labelPtr, previewValuePtr, flags) != 0; + label.Dispose(); + previewValue.Dispose(); + return r; + } + } + + public static bool BeginListBox(Utf8Buffer label, Vector2 size = default) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.BeginListBox(labelPtr, size) != 0; + label.Dispose(); + return r; + } + } + + public static bool BeginMenu(Utf8Buffer label, bool enabled = true) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.BeginMenu(labelPtr, enabled ? (byte)1 : (byte)0) != 0; + label.Dispose(); + return r; + } + } + + public static bool BeginPopup(Utf8Buffer strId, ImGuiWindowFlags flags = ImGuiWindowFlags.None) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.BeginPopup(strIdPtr, flags) != 0; + strId.Dispose(); + return r; + } + } + + public static bool BeginPopupContextItem(Utf8Buffer strId, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.MouseButtonDefault) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.BeginPopupContextItem(strIdPtr, popupFlags) != 0; + strId.Dispose(); + return r; + } + } + + public static bool BeginPopupContextWindow(Utf8Buffer strId, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.MouseButtonDefault) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.BeginPopupContextWindow(strIdPtr, popupFlags) != 0; + strId.Dispose(); + return r; + } + } + + public static bool BeginPopupContextVoid(Utf8Buffer strId, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.MouseButtonDefault) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.BeginPopupContextVoid(strIdPtr, popupFlags) != 0; + strId.Dispose(); + return r; + } + } + + public static bool BeginPopupModal( + Utf8Buffer name, ref bool open, ImGuiWindowFlags flags = ImGuiWindowFlags.None) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + fixed (bool* openPtr = &open) + { + var r = ImGuiNative.BeginPopupModal(namePtr, openPtr, flags) != 0; + name.Dispose(); + return r; + } + } + + public static bool BeginPopupModal(Utf8Buffer name, ImGuiWindowFlags flags = ImGuiWindowFlags.None) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.BeginPopupModal(namePtr, null, flags) != 0; + name.Dispose(); + return r; + } + } + + public static bool BeginTabBar(Utf8Buffer strId, ImGuiTabBarFlags flags = ImGuiTabBarFlags.None) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.BeginTabBar(strIdPtr, flags) != 0; + strId.Dispose(); + return r; + } + } + + public static bool BeginTabItem( + Utf8Buffer label, ref bool pOpen, ImGuiTabItemFlags flags = ImGuiTabItemFlags.None) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (bool* pOpenPtr = &pOpen) + { + var r = ImGuiNative.BeginTabItem(labelPtr, pOpenPtr, flags) != 0; + label.Dispose(); + return r; + } + } + + public static bool BeginTabItem(Utf8Buffer label, ImGuiTabItemFlags flags = ImGuiTabItemFlags.None) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.BeginTabItem(labelPtr, null, flags) != 0; + label.Dispose(); + return r; + } + } + + public static bool BeginTable( + Utf8Buffer strId, int column, ImGuiTableFlags flags = ImGuiTableFlags.None, Vector2 outerSize = default, + float innerWidth = 0.0f) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.BeginTable(strIdPtr, column, flags, outerSize, innerWidth) != 0; + strId.Dispose(); + return r; + } + } + + public static bool Button(Utf8Buffer label, Vector2 size = default) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.Button(labelPtr, size) != 0; + label.Dispose(); + return r; + } + } + + public static bool Checkbox(Utf8Buffer label, ref bool v) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (bool* vPtr = &v) + { + var r = ImGuiNative.Checkbox(labelPtr, vPtr) != 0; + label.Dispose(); + return r; + } + } + + public static bool CheckboxFlags(Utf8Buffer label, ref T flags, T flagsValue) + where T : IBinaryInteger + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var allOn = (flags & flagsValue) == flagsValue; + var anyOn = !T.IsZero(flags & flagsValue); + bool pressed; + if (!allOn && anyOn) + { + var g = GetCurrentContext(); + var backupItemFlags = g.CurrentItemFlags; + g.CurrentItemFlags |= ImGuiItemFlags.MixedValue; + pressed = ImGuiNative.Checkbox(labelPtr, &allOn) != 0; + g.CurrentItemFlags = backupItemFlags; + } + else + { + pressed = ImGuiNative.Checkbox(labelPtr, &allOn) != 0; + } + + if (pressed) + { + if (allOn) + flags |= flagsValue; + else + flags &= ~flagsValue; + } + + label.Dispose(); + return pressed; + } + } + + public static bool CollapsingHeader( + Utf8Buffer label, ref bool visible, ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags.None) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (bool* visiblePtr = &visible) + { + var r = ImGuiNative.CollapsingHeader(labelPtr, visiblePtr, flags) != 0; + label.Dispose(); + return r; + } + } + + public static bool CollapsingHeader(Utf8Buffer label, ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags.None) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.CollapsingHeader(labelPtr, null, flags) != 0; + label.Dispose(); + return r; + } + } + + public static bool ColorButton( + Utf8Buffer descId, in Vector4 col, ImGuiColorEditFlags flags = ImGuiColorEditFlags.None, + Vector2 size = default) + { + fixed (byte* descIdPtr = &descId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.ColorButton(descIdPtr, col, flags, size) != 0; + descId.Dispose(); + return r; + } + } + + public static void Columns(int count = 1, Utf8Buffer id = default, bool border = true) + { + fixed (byte* idPtr = &id.GetPinnableNullTerminatedReference()) + ImGuiNative.Columns(count, idPtr, border ? (byte)1 : (byte)0); + id.Dispose(); + } + + public static bool DebugCheckVersionAndDataLayout( + Utf8Buffer versionStr, nuint szIo, nuint szStyle, nuint szVec2, nuint szVec4, nuint szDrawVert, + nuint szDrawIdx) + { + fixed (byte* versionPtr = &versionStr.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.DebugCheckVersionAndDataLayout(versionPtr, szIo, szStyle, szVec2, szVec4, szDrawVert, szDrawIdx) != 0; + versionStr.Dispose(); + return r; + } + } + + public static void DebugTextEncoding(Utf8Buffer text) + { + fixed (byte* textPtr = &text.GetPinnableNullTerminatedReference()) + { + ImGuiNative.DebugTextEncoding(textPtr); + text.Dispose(); + } + } + + public static bool Draw(ImGuiTextFilterPtr self, Utf8Buffer label = default, float width = 0.0f) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference("Filter (inc,-exc)"u8)) + { + var r = ImGuiNative.Draw(self.Handle, labelPtr, width) != 0; + label.Dispose(); + return r; + } + } + + public static ImGuiTextFilterPtr ImGuiTextFilter(Utf8Buffer defaultFilter = default) + { + fixed (byte* defaultFilterPtr = &defaultFilter.GetPinnableNullTerminatedReference("\0"u8)) + { + var r = ImGuiNative.ImGuiTextFilter(defaultFilterPtr); + defaultFilter.Dispose(); + return r; + } + } + + public static ImGuiTextRangePtr ImGuiTextRange() => ImGuiNative.ImGuiTextRange(); + + public static ImGuiTextRangePtr ImGuiTextRange(ReadOnlySpan text) + { + fixed (byte* textPtr = text) + return ImGuiNative.ImGuiTextRange(textPtr, textPtr + text.Length); + } + + public static bool InvisibleButton( + Utf8Buffer strId, Vector2 size, ImGuiButtonFlags flags = ImGuiButtonFlags.None) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.InvisibleButton(strIdPtr, size, flags) != 0; + strId.Dispose(); + return r; + } + } + + public static bool IsDataType(ImGuiPayloadPtr self, Utf8Buffer type) + { + fixed (byte* typePtr = &type.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.IsDataType(self.Handle, typePtr) != 0; + type.Dispose(); + return r; + } + } + + public static bool IsPopupOpen(Utf8Buffer strId, ImGuiPopupFlags flags = ImGuiPopupFlags.None) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.IsPopupOpen(strIdPtr, flags) != 0; + strId.Dispose(); + return r; + } + } + + public static void LoadIniSettingsFromDisk(Utf8Buffer iniFilename) + { + fixed (byte* iniFilenamePtr = &iniFilename.GetPinnableNullTerminatedReference()) + ImGuiNative.LoadIniSettingsFromDisk(iniFilenamePtr); + iniFilename.Dispose(); + } + + public static void LoadIniSettingsFromMemory(Utf8Buffer iniData) + { + fixed (byte* iniDataPtr = iniData.Span) + ImGuiNative.LoadIniSettingsFromMemory(iniDataPtr, (nuint)iniData.Length); + iniData.Dispose(); + } + + public static void LogToFile(int autoOpenDepth = -1, Utf8Buffer filename = default) + { + fixed (byte* filenamePtr = &filename.GetPinnableNullTerminatedReference()) + ImGuiNative.LogToFile(autoOpenDepth, filenamePtr); + filename.Dispose(); + } + + public static bool MenuItem( + Utf8Buffer label, Utf8Buffer shortcut, bool selected = false, bool enabled = true) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* shortcutPtr = &shortcut.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.MenuItem(labelPtr, shortcutPtr, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0) != 0; + label.Dispose(); + shortcut.Dispose(); + return r; + } + } + + public static bool MenuItem(Utf8Buffer label, Utf8Buffer shortcut, ref bool selected, bool enabled = true) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* shortcutPtr = &shortcut.GetPinnableNullTerminatedReference()) + fixed (bool* selectedPtr = &selected) + { + var r = ImGuiNative.MenuItem(labelPtr, shortcutPtr, selectedPtr, enabled ? (byte)1 : (byte)0) != 0; + label.Dispose(); + shortcut.Dispose(); + return r; + } + } + + public static bool MenuItem(Utf8Buffer label, ref bool selected, bool enabled = true) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (bool* selectedPtr = &selected) + { + var r = ImGuiNative.MenuItem(labelPtr, null, selectedPtr, enabled ? (byte)1 : (byte)0) != 0; + label.Dispose(); + return r; + } + } + + public static bool MenuItem(Utf8Buffer label, bool enabled = true) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.MenuItem(labelPtr, null, null, enabled ? (byte)1 : (byte)0) != 0; + label.Dispose(); + return r; + } + } + + public static void OpenPopup(Utf8Buffer strId, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.None) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + ImGuiNative.OpenPopup(strIdPtr, popupFlags); + strId.Dispose(); + } + + public static void OpenPopup(uint id, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.None) => ImGuiNative.OpenPopup(id, popupFlags); + + public static void OpenPopupOnItemClick( + Utf8Buffer strId, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.MouseButtonDefault) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + ImGuiNative.OpenPopupOnItemClick(strIdPtr, popupFlags); + strId.Dispose(); + } + + public static void ProgressBar(float fraction, Vector2 sizeArg, Utf8Buffer overlay = default) + { + fixed (byte* overlayPtr = &overlay.GetPinnableNullTerminatedReference()) + ImGuiNative.ProgressBar(fraction, sizeArg, overlayPtr); + overlay.Dispose(); + } + + public static void ProgressBar(float fraction, Utf8Buffer overlay = default) + { + fixed (byte* overlayPtr = &overlay.GetPinnableNullTerminatedReference()) + ImGuiNative.ProgressBar(fraction, new(-float.MinValue, 0), overlayPtr); + overlay.Dispose(); + } + + public static bool RadioButton(Utf8Buffer label, bool active) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.RadioButton(labelPtr, active ? (byte)1:(byte)0) != 0; + label.Dispose(); + return r; + } + } + + public static bool RadioButton(Utf8Buffer label, ref T v, T vButton) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var pressed = ImGuiNative.RadioButton( + labelPtr, + EqualityComparer.Default.Equals(v, vButton) ? (byte)1 : (byte)0) != 0; + if (pressed) + v = vButton; + return pressed; + } + } + + public static void SaveIniSettingsToDisk(Utf8Buffer iniFilename) + { + fixed (byte* iniPtr = &iniFilename.GetPinnableNullTerminatedReference()) + ImGuiNative.SaveIniSettingsToDisk(iniPtr); + } + + public static bool Selectable( + Utf8Buffer label, bool selected = false, ImGuiSelectableFlags flags = ImGuiSelectableFlags.None, Vector2 size = default) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.Selectable(labelPtr, selected ?(byte)1:(byte)0, flags, size)!=0; + label.Dispose(); + return r; + } + } + + public static bool Selectable(Utf8Buffer label, ref bool selected, ImGuiSelectableFlags flags = ImGuiSelectableFlags.None, Vector2 size = default) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (bool* selectedPtr = &selected) + { + var r = ImGuiNative.Selectable(labelPtr, selectedPtr, flags, size)!=0; + label.Dispose(); + return r; + } + } + + public static void SetClipboardText(Utf8Buffer text) + { + fixed (byte* textPtr = &text.GetPinnableNullTerminatedReference()) + ImGuiNative.SetClipboardText(textPtr); + text.Dispose(); + } + + public static bool SetDragDropPayload(Utf8Buffer type, ReadOnlySpan data, ImGuiCond cond) + { + fixed (byte* typePtr = &type.GetPinnableNullTerminatedReference()) + fixed (byte* dataPtr = data) + { + var r = ImGuiNative.SetDragDropPayload(typePtr, dataPtr, (nuint)data.Length, cond)!=0; + type.Dispose(); + return r; + } + } + + public static void SetTabItemClosed(Utf8Buffer tabOrDockedWindowLabel) + { + fixed (byte* tabItemPtr = &tabOrDockedWindowLabel.GetPinnableNullTerminatedReference()) + ImGuiNative.SetTabItemClosed(tabItemPtr); + tabOrDockedWindowLabel.Dispose(); + } + + public static void SetWindowCollapsed(bool collapsed, ImGuiCond cond = ImGuiCond.None) => ImGuiNative.SetWindowCollapsed(collapsed ? (byte)1 : (byte)0, cond); + + public static void SetWindowCollapsed(Utf8Buffer name, bool collapsed, ImGuiCond cond = ImGuiCond.None) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + ImGuiNative.SetWindowCollapsed(namePtr, collapsed ? (byte)1 : (byte)0, cond); + name.Dispose(); + } + + public static void SetWindowFocus() => ImGuiNative.SetWindowFocus(); + + public static void SetWindowFocus(Utf8Buffer name) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + ImGuiNative.SetWindowFocus(namePtr); + name.Dispose(); + } + + public static void SetWindowPos(Vector2 pos, ImGuiCond cond = ImGuiCond.None) => ImGuiNative.SetWindowPos(pos, cond); + + public static void SetWindowPos(Utf8Buffer name, Vector2 pos, ImGuiCond cond = ImGuiCond.None) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + ImGuiNative.SetWindowPos(namePtr, pos, cond); + name.Dispose(); + } + + public static void SetWindowSize(Vector2 size, ImGuiCond cond = ImGuiCond.None) => ImGuiNative.SetWindowSize(size, cond); + + public static void SetWindowSize(Utf8Buffer name, Vector2 size, ImGuiCond cond = ImGuiCond.None) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + ImGuiNative.SetWindowSize(namePtr, size, cond); + name.Dispose(); + } + + public static void ShowFontSelector(Utf8Buffer label) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + ImGuiNative.ShowFontSelector(labelPtr); + label.Dispose(); + } + + public static bool ShowStyleSelector(Utf8Buffer label) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.ShowStyleSelector(labelPtr) != 0; + label.Dispose(); + return r; + } + } + + public static bool SmallButton(Utf8Buffer label) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.SmallButton(labelPtr) != 0; + label.Dispose(); + return r; + } + } + + public static bool TabItemButton(Utf8Buffer label, ImGuiTabItemFlags flags = ImGuiTabItemFlags.None) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.TabItemButton(labelPtr, flags) != 0; + label.Dispose(); + return r; + } + } + + public static void TableHeader(Utf8Buffer label) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + ImGuiNative.TableHeader(labelPtr); + label.Dispose(); + } + + public static void TableSetupColumn( + Utf8Buffer label, ImGuiTableColumnFlags flags = ImGuiTableColumnFlags.None, float initWidthOrWeight = 0.0f, + uint userId = 0) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + ImGuiNative.TableSetupColumn(labelPtr, flags, initWidthOrWeight, userId); + label.Dispose(); + } + + public static void TreePush(Utf8Buffer strId) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + ImGuiNative.TreePush(strIdPtr); + strId.Dispose(); + } + + public static void TreePush(nint ptrId) => ImGuiNative.TreePush((void*)ptrId); + public static void TreePush(void* ptrId) => ImGuiNative.TreePush(ptrId); + + public static void Value(Utf8Buffer prefix, in T value) + { + prefix.AppendLiteral(": "); + prefix.AppendFormatted(value); + fixed (byte* prefixPtr = prefix.Span) + { + ImGuiNative.TextUnformatted(prefixPtr, prefixPtr + prefix.Length); + prefix.Dispose(); + } + } + + // public static void Value(AutoUtf8Buffer prefix, float value) => Value(prefix, value, default); + + public static void Value(Utf8Buffer prefix, float value, Utf8Buffer floatFormat = default) + { + fixed (byte* prefixPtr = &prefix.GetPinnableNullTerminatedReference()) + fixed (byte* floatPtr = &floatFormat.GetPinnableNullTerminatedReference()) + { + ImGuiNative.Value(prefixPtr, value, floatPtr); + prefix.Dispose(); + floatFormat.Dispose(); + } + } +} diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiIO.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiIO.Custom.cs new file mode 100644 index 000000000..d3bdb65ca --- /dev/null +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiIO.Custom.cs @@ -0,0 +1,33 @@ +using System.Text; + +namespace Dalamud.Bindings.ImGui; + +public unsafe partial struct ImGuiIO +{ + public void AddInputCharacter(char c) + { + fixed (ImGuiIO* thisPtr = &this) + ImGui.AddInputCharacter(thisPtr, c); + } + + public void AddInputCharacter(Rune c) + { + fixed (ImGuiIO* thisPtr = &this) + ImGui.AddInputCharacter(thisPtr, c); + } + + public void AddInputCharacters(Utf8Buffer str) + { + fixed (ImGuiIO* thisPtr = &this) + ImGui.AddInputCharacters(thisPtr, str); + } +} + +public partial struct ImGuiIOPtr +{ + public void AddInputCharacter(char c) => ImGui.AddInputCharacter(this, c); + + public void AddInputCharacter(Rune c) => ImGui.AddInputCharacter(this, c); + + public void AddInputCharacters(Utf8Buffer str) => ImGui.AddInputCharacters(this, str); +} diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiInputTextCallbackData.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiInputTextCallbackData.Custom.cs index a776a3c9c..2607e2445 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiInputTextCallbackData.Custom.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiInputTextCallbackData.Custom.cs @@ -1,16 +1,15 @@ -using System.Runtime.CompilerServices; - namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiInputTextCallbackData { - public void InsertChars(int pos, AutoUtf8Buffer text) + public void InsertChars(int pos, Utf8Buffer text) { - fixed (ImGuiInputTextCallbackData* thisPtr = &this) ImGui.InsertChars(thisPtr, pos, text); + fixed (ImGuiInputTextCallbackData* thisPtr = &this) + ImGui.InsertChars(thisPtr, pos, text); } } public partial struct ImGuiInputTextCallbackDataPtr { - public void InsertChars(int pos, AutoUtf8Buffer text) => ImGui.InsertChars(this, pos, text); + public void InsertChars(int pos, Utf8Buffer text) => ImGui.InsertChars(this, pos, text); } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Misc.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Misc.cs new file mode 100644 index 000000000..644558d7f --- /dev/null +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Misc.cs @@ -0,0 +1,496 @@ +using System.Diagnostics.CodeAnalysis; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui; + +[SuppressMessage("ReSharper", "InconsistentNaming")] +public unsafe partial class ImGuiP +{ + public static bool ArrowButtonEx( + Utf8Buffer strId, ImGuiDir dir, Vector2 sizeArg, ImGuiButtonFlags flags = ImGuiButtonFlags.None) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.ArrowButtonEx(strIdPtr, dir, sizeArg, flags) != 0; + strId.Dispose(); + return r; + } + } + + public static bool BeginChildEx(Utf8Buffer name, uint id, Vector2 sizeArg, bool border, ImGuiWindowFlags flags) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.BeginChildEx(namePtr, id, sizeArg, border ? (byte)1 : (byte)0, flags) != 0; + name.Dispose(); + return r; + } + } + + public static void BeginColumns(Utf8Buffer strId, int count, ImGuiOldColumnFlags flags = ImGuiOldColumnFlags.None) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + ImGuiPNative.BeginColumns(strIdPtr, count, flags); + strId.Dispose(); + } + + public static bool BeginMenuEx(Utf8Buffer label, Utf8Buffer icon = default, bool enabled = true) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* iconPtr = &icon.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.BeginMenuEx(labelPtr, iconPtr, enabled ? (byte)1 : (byte)0) != 0; + label.Dispose(); + icon.Dispose(); + return r; + } + } + + public static bool BeginTableEx( + Utf8Buffer name, uint id, int columnsCount, ImGuiTableFlags flags = ImGuiTableFlags.None, + Vector2 outerSize = default, float innerWidth = 0.0f) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.BeginTableEx(namePtr, id, columnsCount, flags, outerSize, innerWidth) != 0; + name.Dispose(); + return r; + } + } + + public static bool BeginViewportSideBar( + Utf8Buffer name, ImGuiViewportPtr viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.BeginViewportSideBar(namePtr, viewport, dir, size, windowFlags) != 0; + name.Dispose(); + return r; + } + } + + public static bool ButtonEx( + Utf8Buffer label, Vector2 sizeArg = default, ImGuiButtonFlags flags = ImGuiButtonFlags.None) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.ButtonEx(labelPtr, sizeArg, flags) != 0; + label.Dispose(); + return r; + } + } + + public static void ColorEditOptionsPopup(ReadOnlySpan col, ImGuiColorEditFlags flags) + { + fixed (float* colPtr = col) + ImGuiPNative.ColorEditOptionsPopup(colPtr, flags); + } + + public static void ColorPickerOptionsPopup(ReadOnlySpan refCol, ImGuiColorEditFlags flags) + { + fixed (float* refColPtr = refCol) + ImGuiPNative.ColorPickerOptionsPopup(refColPtr, flags); + } + + public static void ColorTooltip(Utf8Buffer text, ReadOnlySpan col, ImGuiColorEditFlags flags) + { + fixed (byte* textPtr = &text.GetPinnableNullTerminatedReference()) + fixed (float* colPtr = col) + ImGuiPNative.ColorTooltip(textPtr, colPtr, flags); + text.Dispose(); + } + + public static ImGuiWindowSettingsPtr CreateNewWindowSettings(Utf8Buffer name) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.CreateNewWindowSettings(namePtr); + name.Dispose(); + return r; + } + } + + public static void Custom_StbTextMakeUndoReplace( + ImGuiInputTextStatePtr str, int where, int oldLength, int newLength) => + ImGuiPNative.Custom_StbTextMakeUndoReplace(str, where, oldLength, newLength); + + public static void Custom_StbTextUndo(ImGuiInputTextStatePtr str) => ImGuiPNative.Custom_StbTextUndo(str); + + public static bool DataTypeApplyFromText(Utf8Buffer buf, ImGuiDataType dataType, T data, Utf8Buffer format) + where T : unmanaged, IBinaryNumber + { + fixed (byte* bufPtr = &buf.GetPinnableNullTerminatedReference()) + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.DataTypeApplyFromText(bufPtr, dataType, &data, formatPtr) != 0; + format.Dispose(); + buf.Dispose(); + return r; + } + } + + public static void DebugNodeDockNode(ImGuiDockNodePtr node, Utf8Buffer label) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + ImGuiPNative.DebugNodeDockNode(node, labelPtr); + label.Dispose(); + } + + public static void DebugNodeDrawList( + ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, Utf8Buffer label) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + ImGuiPNative.DebugNodeDrawList(window, viewport, drawList, labelPtr); + label.Dispose(); + } + + public static void DebugNodeStorage(ImGuiStoragePtr storage, Utf8Buffer label) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + ImGuiPNative.DebugNodeStorage(storage, labelPtr); + label.Dispose(); + } + + public static void DebugNodeTabBar(ImGuiTabBarPtr tabBar, Utf8Buffer label) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + ImGuiPNative.DebugNodeTabBar(tabBar, labelPtr); + label.Dispose(); + } + + public static void DebugNodeWindow(ImGuiWindowPtr window, Utf8Buffer label) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + ImGuiPNative.DebugNodeWindow(window, labelPtr); + label.Dispose(); + } + + public static void DebugNodeWindowsList(scoped in ImVector windows, Utf8Buffer label) + { + fixed (ImVector* windowsPtr = &windows) + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + ImGuiPNative.DebugNodeWindowsList(windowsPtr, labelPtr); + label.Dispose(); + } + + public static void DockBuilderCopyWindowSettings(Utf8Buffer srcName, Utf8Buffer dstName) + { + fixed (byte* srcNamePtr = &srcName.GetPinnableNullTerminatedReference()) + fixed (byte* dstNamePtr = &dstName.GetPinnableNullTerminatedReference()) + ImGuiPNative.DockBuilderCopyWindowSettings(srcNamePtr, dstNamePtr); + srcName.Dispose(); + dstName.Dispose(); + } + + public static void DockBuilderDockWindow(Utf8Buffer windowName, uint nodeId) + { + fixed (byte* windowNamePtr = &windowName.GetPinnableNullTerminatedReference()) + ImGuiPNative.DockBuilderDockWindow(windowNamePtr, nodeId); + windowName.Dispose(); + } + + public static bool DragBehavior( + uint id, ImGuiDataType dataType, void* pV, float vSpeed, void* pMin, void* pMax, Utf8Buffer format, + ImGuiSliderFlags flags) + { + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.DragBehavior(id, dataType, pV, vSpeed, pMin, pMax, formatPtr, flags) != 0; + format.Dispose(); + return r; + } + } + + public static ImGuiWindowSettingsPtr FindOrCreateWindowSettings(Utf8Buffer name) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.FindOrCreateWindowSettings(namePtr); + name.Dispose(); + return r; + } + } + + public static ImGuiSettingsHandlerPtr FindSettingsHandler(Utf8Buffer typeName) + { + fixed (byte* typeNamePtr = &typeName.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.FindSettingsHandler(typeNamePtr); + typeName.Dispose(); + return r; + } + } + + public static ImGuiWindowPtr FindWindowByName(Utf8Buffer name) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.FindWindowByName(namePtr); + name.Dispose(); + return r; + } + } + + public static uint GetColumnsID(Utf8Buffer strId, int count) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.GetColumnsID(strIdPtr, count); + strId.Dispose(); + return r; + } + } + + public static uint GetIDWithSeed(Utf8Buffer strId, uint seed) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.GetIDWithSeed(strIdPtr, strIdPtr + strId.Length, seed); + strId.Dispose(); + return r; + } + } + + public static void* ImFileLoadToMemory( + Utf8Buffer filename, Utf8Buffer mode, out nuint outFileSize, int paddingBytes = 0) + { + fixed (byte* filenamePtr = &filename.GetPinnableNullTerminatedReference()) + fixed (byte* modePtr = &mode.GetPinnableNullTerminatedReference()) + fixed (nuint* outFileSizePtr = &outFileSize) + { + var r = ImGuiPNative.ImFileLoadToMemory(filenamePtr, modePtr, outFileSizePtr, paddingBytes); + filename.Dispose(); + mode.Dispose(); + return r; + } + } + + public static void* ImFileLoadToMemory(Utf8Buffer filename, Utf8Buffer mode, int paddingBytes = 0) + { + fixed (byte* filenamePtr = &filename.GetPinnableNullTerminatedReference()) + fixed (byte* modePtr = &mode.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.ImFileLoadToMemory(filenamePtr, modePtr, null, paddingBytes); + filename.Dispose(); + mode.Dispose(); + return r; + } + } + + public static ImFileHandle ImFileOpen(Utf8Buffer filename, Utf8Buffer mode) + { + fixed (byte* filenamePtr = &filename.GetPinnableNullTerminatedReference()) + fixed (byte* modePtr = &mode.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.ImFileOpen(filenamePtr, modePtr); + filename.Dispose(); + mode.Dispose(); + return r; + } + } + + public static void ImFontAtlasBuildMultiplyRectAlpha8( + ReadOnlySpan table, ReadOnlySpan pixels, int x, int y, int w, int h, int stride) + { + fixed (byte* tablePtr = table) + fixed (byte* pixelsPtr = pixels) + ImGuiPNative.ImFontAtlasBuildMultiplyRectAlpha8(tablePtr, pixelsPtr, x, y, w, h, stride); + } + + public static void ImFontAtlasBuildRender32bppRectFromString( + ImFontAtlasPtr atlas, int textureIndex, int x, int y, int w, int h, ReadOnlySpan inStr, byte inMarkerChar, + uint inMarkerPixelValue) + { + fixed (byte* inStrPtr = inStr) + { + ImGuiPNative.ImFontAtlasBuildRender32bppRectFromString( + atlas, + textureIndex, + x, + y, + w, + h, + inStrPtr, + inMarkerChar, + inMarkerPixelValue); + } + } + + public static void ImFontAtlasBuildRender8bppRectFromString( + ImFontAtlasPtr atlas, int textureIndex, int x, int y, int w, int h, ReadOnlySpan inStr, byte inMarkerChar, + byte inMarkerPixelValue) + { + fixed (byte* inStrPtr = inStr) + { + ImGuiPNative.ImFontAtlasBuildRender8bppRectFromString( + atlas, + textureIndex, + x, + y, + w, + h, + inStrPtr, + inMarkerChar, + inMarkerPixelValue); + } + } + + public static void ImFormatStringToTempBuffer(byte** outBuf, byte** outBufEnd, Utf8Buffer fmt) + { + fixed (byte* fmtPtr = &fmt.GetPinnableNullTerminatedReference()) + ImGuiPNative.ImFormatStringToTempBuffer(outBuf, outBufEnd, fmtPtr); + fmt.Dispose(); + } + + public static ImGuiWindowPtr ImGuiWindow(ImGuiContextPtr context, Utf8Buffer name) + { + fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.ImGuiWindow(context, namePtr); + name.Dispose(); + return r; + } + } + + // public static byte* ImParseFormatFindEnd(byte* format) + // public static byte* ImParseFormatFindStart(byte* format) + // public static int ImParseFormatPrecision(byte* format, int defaultValue) + // public static byte* ImStrchrRange(byte* strBegin, byte* strEnd, byte c) + // public static byte* ImStrdup(byte* str) + // public static byte* ImStrdupcpy(byte* dst, nuint* pDstSize, byte* str) + // public static int ImStricmp(byte* str1, byte* str2) + // public static byte* ImStristr(byte* haystack, byte* haystackEnd, byte* needle, byte* needleEnd) + // public static int ImStrlenW(ushort* str) + // public static void ImStrncpy(byte* dst, byte* src, nuint count) + // public static int ImStrnicmp(byte* str1, byte* str2, nuint count) + // public static byte* ImStrSkipBlank(byte* str) + // public static void ImStrTrimBlanks(byte* str) + // public static int ImTextCharFromUtf8(uint* outChar, byte* inText, byte* inTextEnd) + // public static int ImTextCountCharsFromUtf8(byte* inText, byte* inTextEnd) + // public static int ImTextCountUtf8BytesFromChar(byte* inText, byte* inTextEnd) + + public static void LogSetNextTextDecoration(byte* prefix, byte* suffix) => + ImGuiPNative.LogSetNextTextDecoration(prefix, suffix); + + public static bool MenuItemEx( + Utf8Buffer label, Utf8Buffer icon = default, Utf8Buffer shortcut = default, bool selected = false, + bool enabled = true) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* iconPtr = &icon.GetPinnableNullTerminatedReference()) + fixed (byte* shortcutPtr = &shortcut.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.MenuItemEx( + labelPtr, + iconPtr, + shortcutPtr, + selected ? (byte)1 : (byte)0, + enabled ? (byte)1 : (byte)0) != 0; + label.Dispose(); + icon.Dispose(); + shortcut.Dispose(); + return r; + } + } + + public static void RemoveSettingsHandler(Utf8Buffer typeName) + { + fixed (byte* typeNamePtr = &typeName.GetPinnableNullTerminatedReference()) + ImGuiPNative.RemoveSettingsHandler(typeNamePtr); + typeName.Dispose(); + } + + public static bool SliderBehavior( + ImRect bb, uint id, ImGuiDataType dataType, scoped ref T value, T min, T max, Utf8Buffer format, + ImGuiSliderFlags flags, ImRectPtr outGrabBb) + where T : unmanaged, IBinaryNumber + { + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) + fixed (T* valuePtr = &value) + { + var r = ImGuiPNative.SliderBehavior( + bb, + id, + dataType, + valuePtr, + &min, + &max, + formatPtr, + flags, + outGrabBb) != 0; + format.Dispose(); + return r; + } + } + + public static Vector2 TabItemCalcSize(Utf8Buffer label, bool hasCloseButton) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + Vector2 v; + ImGuiPNative.TabItemCalcSize(&v, labelPtr, hasCloseButton ? (byte)1 : (byte)0); + return v; + } + } + + public static bool TabItemEx( + ImGuiTabBarPtr tabBar, Utf8Buffer label, ref bool open, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (bool* openPtr = &open) + { + var r = ImGuiPNative.TabItemEx(tabBar, labelPtr, openPtr, flags, dockedWindow) != 0; + label.Dispose(); + return r; + } + } + + public static void TabItemLabelAndCloseButton( + ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, Utf8Buffer label, uint tabId, + uint closeButtonId, bool isContentsVisible, out bool justClosed, out bool textClipped) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (bool* justClosedPtr = &justClosed) + fixed (bool* textClippedPtr = &textClipped) + { + ImGuiPNative.TabItemLabelAndCloseButton( + drawList, + bb, + flags, + framePadding, + labelPtr, + tabId, + closeButtonId, + isContentsVisible ? (byte)1 : (byte)0, + justClosedPtr, + textClippedPtr); + } + + label.Dispose(); + } + + public static bool TempInputScalar( + ImRect bb, uint id, Utf8Buffer label, ImGuiDataType dataType, scoped ref T data, Utf8Buffer format, T min, + T max) + where T : unmanaged, IBinaryNumber + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) + fixed (T* dataPtr = &data) + { + var r = ImGuiPNative.TempInputScalar(bb, id, labelPtr, dataType, dataPtr, formatPtr, &min, &max) != 0; + label.Dispose(); + return r; + } + } + + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, Utf8Buffer label) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + { + var r = ImGuiPNative.TreeNodeBehavior(id, flags, labelPtr, labelPtr + label.Length) != 0; + label.Dispose(); + return r; + } + } +} diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Plot.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Plot.cs new file mode 100644 index 000000000..9fac88c3c --- /dev/null +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Plot.cs @@ -0,0 +1,85 @@ +using System.Diagnostics.CodeAnalysis; +using System.Numerics; +using System.Runtime.InteropServices; + +namespace Dalamud.Bindings.ImGui; + +[SuppressMessage("ReSharper", "InconsistentNaming")] +public static unsafe partial class ImGuiP +{ + public delegate float GetFloatDelegate(int index); + + public delegate float GetFloatDelegate(scoped in T context, int index); + + public static int PlotEx( + ImGuiPlotType plotType, Utf8Buffer label, GetFloatDelegate valuesGetter, + int valuesCount, int valuesOffset, Utf8Buffer overlayText, float scaleMin, float scaleMax, Vector2 frameSize) + { + var dataBuffer = stackalloc void*[1]; + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* overlayTextPtr = &overlayText.GetPinnableNullTerminatedReference()) +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + { + dataBuffer[0] = &valuesGetter; +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + var r = ImGuiPNative.PlotEx( + plotType, + labelPtr, + (delegate*, void*, int, int, byte*, float, float, + Vector2, float>) + (nint)(delegate* unmanaged)&GetFloatWithoutContext, + dataBuffer, + valuesCount, + valuesOffset, + overlayTextPtr, + scaleMin, + scaleMax, + frameSize); + label.Dispose(); + overlayText.Dispose(); + return r; + } + } + + public static int PlotEx( + ImGuiPlotType plotType, Utf8Buffer label, GetFloatDelegate valuesGetter, scoped in TContext context, + int valuesCount, int valuesOffset, Utf8Buffer overlayText, float scaleMin, float scaleMax, Vector2 frameSize) + { + var dataBuffer = stackalloc void*[2]; + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* overlayTextPtr = &overlayText.GetPinnableNullTerminatedReference()) +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + fixed (TContext* contextPtr = &context) + { + dataBuffer[0] = &valuesGetter; + dataBuffer[1] = contextPtr; +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + var r = ImGuiPNative.PlotEx( + plotType, + labelPtr, + (delegate*, void*, int, int, byte*, float, float, + Vector2, float>) + (nint)(delegate* unmanaged)&GetFloatWithContext, + dataBuffer, + valuesCount, + valuesOffset, + overlayTextPtr, + scaleMin, + scaleMax, + frameSize); + label.Dispose(); + overlayText.Dispose(); + return r; + } + } + +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + [UnmanagedCallersOnly] + private static float GetFloatWithContext(void* data, int index) => + ((GetFloatDelegate*)((void**)data)[0])->Invoke(*(object*)((void**)data)[1], index); + + [UnmanagedCallersOnly] + private static float GetFloatWithoutContext(void* data, int index) => + ((GetFloatDelegate*)((void**)data)[0])->Invoke(index); +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type +} diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Text.cs similarity index 91% rename from imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Custom.cs rename to imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Text.cs index 61025a923..039d1649a 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Custom.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Text.cs @@ -1,13 +1,12 @@ using System.Diagnostics; using System.Numerics; -using System.Runtime.CompilerServices; using System.Text; namespace Dalamud.Bindings.ImGui; public static unsafe partial class ImGuiP { - public static void DebugLog(AutoUtf8Buffer text) + public static void DebugLog(Utf8Buffer text) { var g = ImGui.GetCurrentContext().Handle; ImGui.append(&g->DebugLogBuf, $"[{g->FrameCount:00000}] "); @@ -32,7 +31,7 @@ public static unsafe partial class ImGuiP public static int FindRenderedTextEnd( ReadOnlySpan text, out ReadOnlySpan before, out ReadOnlySpan after) { - var textBuf = new AutoUtf8Buffer(text); + var textBuf = new Utf8Buffer(text); FindRenderedTextEnd(textBuf.Span, out var beforeBytes, out var afterBytes); before = text[..Encoding.UTF8.GetCharCount(beforeBytes)]; after = text[before.Length..]; @@ -40,7 +39,7 @@ public static unsafe partial class ImGuiP return before.Length; } - public static uint GetID(ImGuiWindowPtr self, AutoUtf8Buffer str) + public static uint GetID(ImGuiWindowPtr self, Utf8Buffer str) { fixed (byte* strPtr = str.Span) { @@ -62,7 +61,7 @@ public static unsafe partial class ImGuiP fixed (byte* ptr = data) return ImGuiPNative.ImHashData(ptr, (nuint)data.Length, seed); } - public static uint ImHashStr(AutoUtf8Buffer data, uint seed = 0) + public static uint ImHashStr(Utf8Buffer data, uint seed = 0) { fixed (byte* ptr = data.Span) { @@ -131,7 +130,7 @@ public static unsafe partial class ImGuiP return i; } - public static void LogRenderedText(scoped in Vector2 refPos, AutoUtf8Buffer text) + public static void LogRenderedText(scoped in Vector2 refPos, Utf8Buffer text) { fixed (Vector2* refPosPtr = &refPos) fixed (byte* textPtr = text.Span) @@ -139,7 +138,7 @@ public static unsafe partial class ImGuiP text.Dispose(); } - public static void RenderText(Vector2 pos, AutoUtf8Buffer text, bool hideTextAfterHash = true) + public static void RenderText(Vector2 pos, Utf8Buffer text, bool hideTextAfterHash = true) { fixed (byte* textPtr = text.Span) ImGuiPNative.RenderText(pos, textPtr, textPtr + text.Length, hideTextAfterHash ? (byte)1 : (byte)0); @@ -147,7 +146,7 @@ public static unsafe partial class ImGuiP } public static void RenderTextWrapped( - Vector2 pos, AutoUtf8Buffer text, float wrapWidth) + Vector2 pos, Utf8Buffer text, float wrapWidth) { fixed (byte* textPtr = text.Span) ImGuiPNative.RenderTextWrapped(pos, textPtr, textPtr + text.Length, wrapWidth); @@ -155,7 +154,7 @@ public static unsafe partial class ImGuiP } public static void RenderTextClipped( - scoped in Vector2 posMin, scoped in Vector2 posMax, AutoUtf8Buffer text, + scoped in Vector2 posMin, scoped in Vector2 posMax, Utf8Buffer text, scoped in Vector2? textSizeIfKnown = null, scoped in Vector2 align = default, scoped in ImRect? clipRect = null) { @@ -175,7 +174,7 @@ public static unsafe partial class ImGuiP public static void RenderTextClippedEx( ImDrawListPtr drawList, scoped in Vector2 posMin, scoped in Vector2 posMax, - AutoUtf8Buffer text, + Utf8Buffer text, scoped in Vector2? textSizeIfKnown = null, scoped in Vector2 align = default, scoped in ImRect? clipRect = null) { var textSizeIfKnownOrDefault = textSizeIfKnown ?? default; @@ -195,7 +194,7 @@ public static unsafe partial class ImGuiP public static void RenderTextEllipsis( ImDrawListPtr drawList, scoped in Vector2 posMin, scoped in Vector2 posMax, float clipMaxX, float ellipsisMaxX, - AutoUtf8Buffer text, scoped in Vector2? textSizeIfKnown = null) + Utf8Buffer text, scoped in Vector2? textSizeIfKnown = null) { var textSizeIfKnownOrDefault = textSizeIfKnown ?? default; fixed (byte* textPtr = text.Span) diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiPayload.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiPayload.Custom.cs new file mode 100644 index 000000000..0bb8c7a0d --- /dev/null +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiPayload.Custom.cs @@ -0,0 +1,17 @@ +namespace Dalamud.Bindings.ImGui; + +public unsafe partial struct ImGuiPayload +{ + public readonly Span DataSpan => new(this.Data, this.DataSize); + + public readonly bool IsDataType(Utf8Buffer type) + { + fixed (ImGuiPayload* ptr = &this) + return ImGui.IsDataType(ptr, type); + } +} + +public partial struct ImGuiPayloadPtr +{ + public readonly bool IsDataType(Utf8Buffer type) => ImGui.IsDataType(this, type); +} diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiStorage.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiStorage.Custom.cs new file mode 100644 index 000000000..aacd78d9f --- /dev/null +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiStorage.Custom.cs @@ -0,0 +1,60 @@ +namespace Dalamud.Bindings.ImGui; + +public unsafe partial struct ImGuiStorage +{ + public readonly ref bool GetBoolRef(uint key, bool defaultValue = false) + { + fixed (ImGuiStorage* thisPtr = &this) + return ref ImGui.GetBoolRef(thisPtr, key, defaultValue); + } + + public readonly ref float GetFloatRef(uint key, float defaultValue = 0.0f) + { + fixed (ImGuiStorage* thisPtr = &this) + return ref ImGui.GetFloatRef(thisPtr, key, defaultValue); + } + + public readonly ref int GetIntRef(uint key, int defaultValue = 0) + { + fixed (ImGuiStorage* thisPtr = &this) + return ref ImGui.GetIntRef(thisPtr, key, defaultValue); + } + + public readonly ref void* GetVoidPtrRef(uint key, void* defaultValue = null) + { + fixed (ImGuiStorage* thisPtr = &this) + return ref ImGui.GetVoidPtrRef(thisPtr, key, defaultValue); + } + + public readonly ref T* GetPtrRef(uint key, T* defaultValue = null) where T : unmanaged + { + fixed (ImGuiStorage* thisPtr = &this) + return ref ImGui.GetPtrRef(thisPtr, key, defaultValue); + } + + public readonly ref T GetRef(uint key, T defaultValue = default) where T : unmanaged + { + fixed (ImGuiStorage* thisPtr = &this) + return ref ImGui.GetRef(thisPtr, key, defaultValue); + } +} + +public unsafe partial struct ImGuiStoragePtr +{ + public readonly ref bool GetBoolRef(uint key, bool defaultValue = false) => + ref ImGui.GetBoolRef(this, key, defaultValue); + + public readonly ref float GetFloatRef(uint key, float defaultValue = 0.0f) => + ref ImGui.GetFloatRef(this, key, defaultValue); + + public readonly ref int GetIntRef(uint key, int defaultValue = 0) => ref ImGui.GetIntRef(this, key, defaultValue); + + public readonly ref void* GetVoidPtrRef(uint key, void* defaultValue = null) => + ref ImGui.GetVoidPtrRef(this, key, defaultValue); + + public readonly ref T* GetPtrRef(uint key, T* defaultValue = null) where T : unmanaged => + ref ImGui.GetPtrRef(this, key, defaultValue); + + public readonly ref T GetRef(uint key, T defaultValue = default) where T : unmanaged => + ref ImGui.GetRef(this, key, defaultValue); +} diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiTextBuffer.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiTextBuffer.Custom.cs new file mode 100644 index 000000000..cd7fe202c --- /dev/null +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiTextBuffer.Custom.cs @@ -0,0 +1,15 @@ +namespace Dalamud.Bindings.ImGui; + +public unsafe partial struct ImGuiTextBuffer +{ + public void append(Utf8Buffer str) + { + fixed (ImGuiTextBuffer* thisPtr = &this) + ImGui.append(thisPtr, str); + } +} + +public partial struct ImGuiTextBufferPtr +{ + public void append(Utf8Buffer str) => ImGui.append(this, str); +} diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiTextFilter.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiTextFilter.Custom.cs new file mode 100644 index 000000000..b01774cf9 --- /dev/null +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiTextFilter.Custom.cs @@ -0,0 +1,22 @@ +namespace Dalamud.Bindings.ImGui; + +public unsafe partial struct ImGuiTextFilter +{ + public void Draw(Utf8Buffer label = default, float width = 0.0f) + { + fixed (ImGuiTextFilter* thisPtr = &this) + ImGui.Draw(thisPtr, label, width); + } + + public void PassFilter(Utf8Buffer text) + { + fixed (ImGuiTextFilter* thisPtr = &this) + ImGui.PassFilter(thisPtr, text); + } +} + +public partial struct ImGuiTextFilterPtr +{ + public void Draw(Utf8Buffer label = default, float width = 0.0f) => ImGui.Draw(this, label, width); + public void PassFilter(Utf8Buffer text) => ImGui.PassFilter(this, text); +} diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiWindow.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiWindow.Custom.cs index 58059a78d..de1651b97 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiWindow.Custom.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiWindow.Custom.cs @@ -1,10 +1,8 @@ -using System.Runtime.CompilerServices; - namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiWindow { - public readonly uint GetID(AutoUtf8Buffer str) + public readonly uint GetID(Utf8Buffer str) { fixed (ImGuiWindow* thisPtr = &this) return ImGuiP.GetID(thisPtr, str); } @@ -22,7 +20,7 @@ public unsafe partial struct ImGuiWindow public unsafe partial struct ImGuiWindowPtr { - public readonly uint GetID(AutoUtf8Buffer str) => ImGuiP.GetID(this.Handle, str); + public readonly uint GetID(Utf8Buffer str) => ImGuiP.GetID(this.Handle, str); public readonly uint GetID(void* ptr) => ImGuiP.GetID(this.Handle, ptr); public readonly uint GetID(int n) => ImGuiP.GetID(this.Handle, n); } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/AutoUtf8Buffer.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Utf8Buffer.cs similarity index 55% rename from imgui/Dalamud.Bindings.ImGui/Custom/AutoUtf8Buffer.cs rename to imgui/Dalamud.Bindings.ImGui/Custom/Utf8Buffer.cs index 5c60cfa9d..aca0c5cf3 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/AutoUtf8Buffer.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Utf8Buffer.cs @@ -8,7 +8,7 @@ namespace Dalamud.Bindings.ImGui; [StructLayout(LayoutKind.Sequential, Size = TotalBufferSize)] [InterpolatedStringHandler] -public ref struct AutoUtf8Buffer : IDisposable +public ref struct Utf8Buffer : IDisposable { private const int TotalBufferSize = 1024; private const int FixedBufferSize = TotalBufferSize - 8 - 8 - 8 - 1; @@ -29,7 +29,7 @@ public ref struct AutoUtf8Buffer : IDisposable OwnedSpan = 1 << 3, } - public AutoUtf8Buffer(int literalLength, int formattedCount) : this(ReadOnlySpan.Empty) + public Utf8Buffer(int literalLength, int formattedCount) : this(ReadOnlySpan.Empty) { this.state |= State.Interpolation; literalLength += formattedCount * 4; @@ -37,14 +37,14 @@ public ref struct AutoUtf8Buffer : IDisposable IncreaseBuffer(out _, literalLength); } - public AutoUtf8Buffer(int literalLength, int formattedCount, IFormatProvider? formatProvider) : this( + public Utf8Buffer(int literalLength, int formattedCount, IFormatProvider? formatProvider) : this( literalLength, formattedCount) { this.formatProvider = formatProvider; } - public unsafe AutoUtf8Buffer(ReadOnlySpan text) + public unsafe Utf8Buffer(ReadOnlySpan text) { this.state = State.Initialized; if (text.IsEmpty) @@ -60,11 +60,11 @@ public ref struct AutoUtf8Buffer : IDisposable } } - public AutoUtf8Buffer(ReadOnlyMemory text) : this(text.Span) + public Utf8Buffer(ReadOnlyMemory text) : this(text.Span) { } - public unsafe AutoUtf8Buffer(ReadOnlySpan text) + public unsafe Utf8Buffer(ReadOnlySpan text) { this.state = State.Initialized | State.NullTerminated; var cb = Encoding.UTF8.GetByteCount(text); @@ -86,24 +86,24 @@ public ref struct AutoUtf8Buffer : IDisposable } } - public AutoUtf8Buffer(ReadOnlyMemory text) : this(text.Span) + public Utf8Buffer(ReadOnlyMemory text) : this(text.Span) { } - public AutoUtf8Buffer(string? text) : this(text.AsSpan()) + public Utf8Buffer(string? text) : this(text.AsSpan()) { } - public unsafe AutoUtf8Buffer(byte* text) : this(MemoryMarshal.CreateReadOnlySpanFromNullTerminated(text)) + public unsafe Utf8Buffer(byte* text) : this(MemoryMarshal.CreateReadOnlySpanFromNullTerminated(text)) { this.state |= State.NullTerminated; } - public unsafe AutoUtf8Buffer(char* text) : this(MemoryMarshal.CreateReadOnlySpanFromNullTerminated(text)) + public unsafe Utf8Buffer(char* text) : this(MemoryMarshal.CreateReadOnlySpanFromNullTerminated(text)) { } - public readonly bool IsInitialized => (this.state & State.Initialized) != 0; + public static Utf8Buffer Empty => default; public readonly unsafe ReadOnlySpan Span => (this.state & State.OwnedSpan) != 0 @@ -112,36 +112,45 @@ public ref struct AutoUtf8Buffer : IDisposable public readonly int Length => this.span.Length; + public readonly bool IsNull => (this.state & State.Initialized) == 0; + public readonly bool IsEmpty => this.span.IsEmpty; - public unsafe ReadOnlySpan NullTerminatedSpan + public unsafe ref readonly byte GetPinnableNullTerminatedReference(ReadOnlySpan defaultValue = default) { - get - { - if ((this.state & State.OwnedSpan) != 0) - this.span = MemoryMarshal.CreateSpan(ref this.fixedBuffer[0], this.span.Length); - if ((this.state & State.NullTerminated) == 0) - { - if (this.span.Length + 1 < FixedBufferSize) - { - var newSpan = MemoryMarshal.CreateSpan(ref this.fixedBuffer[0], this.span.Length); - this.span.CopyTo(newSpan); - this.fixedBuffer[newSpan.Length] = 0; - this.span = newSpan; - } - else - { - this.rentedBuffer = ArrayPool.Shared.Rent(this.span.Length + 1); - var newSpan = this.rentedBuffer.AsSpan(0, this.span.Length); - this.span.CopyTo(newSpan); - this.rentedBuffer[newSpan.Length] = 0; - } + if (this.IsNull) + return ref defaultValue.GetPinnableReference(); - this.state |= State.NullTerminated; + if (this.IsEmpty) + { + this.fixedBuffer[0] = 0; + return ref this.fixedBuffer[0]; + } + + if ((this.state & State.OwnedSpan) != 0) + this.span = MemoryMarshal.CreateSpan(ref this.fixedBuffer[0], this.span.Length); + + if ((this.state & State.NullTerminated) == 0) + { + if (this.span.Length + 1 < FixedBufferSize) + { + var newSpan = MemoryMarshal.CreateSpan(ref this.fixedBuffer[0], this.span.Length); + this.span.CopyTo(newSpan); + this.fixedBuffer[newSpan.Length] = 0; + this.span = newSpan; + } + else + { + this.rentedBuffer = ArrayPool.Shared.Rent(this.span.Length + 1); + var newSpan = this.rentedBuffer.AsSpan(0, this.span.Length); + this.span.CopyTo(newSpan); + this.rentedBuffer[newSpan.Length] = 0; } - return this.span; + this.state |= State.NullTerminated; } + + return ref this.span[0]; } private unsafe Span EffectiveBuffer => @@ -151,17 +160,19 @@ public ref struct AutoUtf8Buffer : IDisposable private Span RemainingBuffer => this.EffectiveBuffer[this.span.Length..]; - public static implicit operator AutoUtf8Buffer(ReadOnlySpan text) => new(text); - public static implicit operator AutoUtf8Buffer(ReadOnlyMemory text) => new(text); - public static implicit operator AutoUtf8Buffer(Span text) => new(text); - public static implicit operator AutoUtf8Buffer(Memory text) => new(text); - public static implicit operator AutoUtf8Buffer(ReadOnlySpan text) => new(text); - public static implicit operator AutoUtf8Buffer(ReadOnlyMemory text) => new(text); - public static implicit operator AutoUtf8Buffer(Span text) => new(text); - public static implicit operator AutoUtf8Buffer(Memory text) => new(text); - public static implicit operator AutoUtf8Buffer(string? text) => new(text); - public static unsafe implicit operator AutoUtf8Buffer(byte* text) => new(text); - public static unsafe implicit operator AutoUtf8Buffer(char* text) => new(text); + public static implicit operator Utf8Buffer(ReadOnlySpan text) => new(text); + public static implicit operator Utf8Buffer(ReadOnlyMemory text) => new(text); + public static implicit operator Utf8Buffer(Span text) => new(text); + public static implicit operator Utf8Buffer(Memory text) => new(text); + public static implicit operator Utf8Buffer(byte[]? text) => new(text.AsSpan()); + public static implicit operator Utf8Buffer(ReadOnlySpan text) => new(text); + public static implicit operator Utf8Buffer(ReadOnlyMemory text) => new(text); + public static implicit operator Utf8Buffer(Span text) => new(text); + public static implicit operator Utf8Buffer(Memory text) => new(text); + public static implicit operator Utf8Buffer(char[]? text) => new(text.AsSpan()); + public static implicit operator Utf8Buffer(string? text) => new(text); + public static unsafe implicit operator Utf8Buffer(byte* text) => new(text); + public static unsafe implicit operator Utf8Buffer(char* text) => new(text); public void Dispose() { @@ -175,9 +186,9 @@ public ref struct AutoUtf8Buffer : IDisposable this.state = State.None; } - public AutoUtf8Buffer MoveOrDefault(AutoUtf8Buffer other) + public Utf8Buffer MoveOrDefault(Utf8Buffer other) { - if (this.IsInitialized) + if (!this.IsNull) { other.Dispose(); var res = this; @@ -205,18 +216,62 @@ public ref struct AutoUtf8Buffer : IDisposable this.span = newSpan[..^1]; } + public void AppendFormatted(ReadOnlySpan value) => this.AppendFormatted(value, null); + + public void AppendFormatted(ReadOnlySpan value, string? format) + { + var remaining = this.RemainingBuffer; + if (remaining.Length < value.Length + 1) + this.IncreaseBuffer(out remaining, this.span.Length + value.Length + 1); + value.CopyTo(remaining); + var newSpan = this.EffectiveBuffer[..(this.span.Length + value.Length + 1)]; + newSpan[^1] = 0; + this.span = newSpan[..^1]; + } + + public void AppendFormatted(ReadOnlySpan value, int alignment) => this.AppendFormatted(value, alignment, null); + + public void AppendFormatted(ReadOnlySpan value, int alignment, string? format) + { + var startingPos = this.span.Length; + this.AppendFormatted(value, format); + FixAlignment(startingPos, alignment); + } + + public void AppendFormatted(ReadOnlySpan value) => this.AppendFormatted(value, null); + + public void AppendFormatted(ReadOnlySpan value, string? format) + { + var remaining = this.RemainingBuffer; + var len = Encoding.UTF8.GetByteCount(value); + if (remaining.Length < len + 1) + this.IncreaseBuffer(out remaining, this.span.Length + len + 1); + Encoding.UTF8.GetBytes(value, remaining); + + var newSpan = this.EffectiveBuffer[..(this.span.Length + len + 1)]; + newSpan[^1] = 0; + this.span = newSpan[..^1]; + } + + public void AppendFormatted(ReadOnlySpan value, int alignment) => this.AppendFormatted(value, alignment, null); + + public void AppendFormatted(ReadOnlySpan value, int alignment, string? format) + { + var startingPos = this.span.Length; + this.AppendFormatted(value, format); + FixAlignment(startingPos, alignment); + } + public void AppendFormatted(T value) => this.AppendFormatted(value, null); public void AppendFormatted(T value, string? format) { var remaining = this.RemainingBuffer; int written; - while (!Utf8.TryWrite(remaining, this.formatProvider, $"{value}", out written)) + while (!Utf8.TryWrite(remaining, this.formatProvider, $"{value}\0", out written)) this.IncreaseBuffer(out remaining); - var newSpan = this.EffectiveBuffer[..(this.span.Length + written + 1)]; - newSpan[^1] = 0; - this.span = newSpan[..^1]; + this.span = this.EffectiveBuffer[..(this.span.Length + written - 1)]; } public void AppendFormatted(T value, int alignment) => this.AppendFormatted(value, alignment, null); @@ -225,6 +280,11 @@ public ref struct AutoUtf8Buffer : IDisposable { var startingPos = this.span.Length; this.AppendFormatted(value, format); + FixAlignment(startingPos, alignment); + } + + private void FixAlignment(int startingPos, int alignment) + { var appendedLength = this.span.Length - startingPos; var leftAlign = alignment < 0; diff --git a/test.ps1 b/test.ps1 index d92eb38bc..b6c87705e 100644 --- a/test.ps1 +++ b/test.ps1 @@ -8,7 +8,7 @@ $lines = New-Object -TypeName "System.Collections.Generic.List[string]" $namespaceDefPattern = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?:^\s*)namespace\s+(?[\w.]+)\b', 'Compiled,Multiline,Singleline' $usingPattern = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?:^|;)\s*using\s+(?\w+)\s*;', 'Compiled,Multiline,Singleline' $classDefPattern = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?^\s*)(?public\s+|internal\s+|protected\s+|private\s+)?(?static\s+)?(?unsafe\s+)?(?partial\s+)?(?class\s+|struct\s+)(?\w+)\b', 'Compiled,Multiline,Singleline' -$methodPattern = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?:^\s+?\[.*?\](?:\r\n|\r|\n))?(?^\s*)(?public\s+|internal\s+|protected\s+|private\s+)?(?static\s+)?(?unsafe\s+)?(?(?!public|internal|protected|private|static|unsafe)\w+(?:\s*<\s*\w+?(?:<\s*\w+\s*>?)?\s*>)?(?:\s*\*)?\s+)(?\w+)(?\s*\([^)]*\))(?:\r\n|\r|\n)[\s\S]+?(?:^\k}(?:\r\n|\r|\n))', 'Compiled,Multiline,Singleline' +$methodPattern = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?:^\s+?\[.*?\](?:\r\n|\r|\n))?(?^\s*)(?(?public\s+|internal\s+|protected\s+|private\s+)?(?static\s+)?(?unsafe\s+)?(?(?!public|internal|protected|private|static|unsafe)\w+(?:\s*<\s*\w+?(?:<\s*\w+\s*>?)?\s*>)?(?:\s*\*)?\s+)(?\w+)(?\s*\([^)]*\)))(?:\r\n|\r|\n)[\s\S]+?(?:^\k}(?:\r\n|\r|\n))', 'Compiled,Multiline,Singleline' $emptyClassPattern = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?:^\s+?\[.*?\](?:\r\n|\r|\n))?(?^\s*)(?public\s+|internal\s+|protected\s+|private\s+)?(?static\s+)?(?unsafe\s+)?(?partial\s+)?(?class\s+|struct\s+)(?\w+)\s*\{\s*\}', 'Compiled,Multiline,Singleline' $emptyNamespacePattern = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?:^\s*)namespace\s+(?\w+)\b\s*\{\s*\}', 'Compiled,Multiline,Singleline' $referNativeFunction = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?