diff --git a/.gitignore b/.gitignore index 7023fb37f..593ad30ea 100644 --- a/.gitignore +++ b/.gitignore @@ -327,4 +327,7 @@ ASALocalRun/ *.nvuser # MFractors (Xamarin productivity tool) working folder -.mfractor/ \ No newline at end of file +.mfractor/ + +# HexaGen generated files +imgui/**/Generated/**/* \ No newline at end of file diff --git a/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj b/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj index f51622c7e..bf718b28e 100644 --- a/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj +++ b/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj @@ -38,9 +38,6 @@ false - - false - diff --git a/Dalamud.CorePlugin/PluginWindow.cs b/Dalamud.CorePlugin/PluginWindow.cs index 27be82f41..07c935f7d 100644 --- a/Dalamud.CorePlugin/PluginWindow.cs +++ b/Dalamud.CorePlugin/PluginWindow.cs @@ -2,7 +2,7 @@ using System; using System.Numerics; using Dalamud.Interface.Windowing; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.CorePlugin { diff --git a/Dalamud.Injector/GameStart.cs b/Dalamud.Injector/GameStart.cs index e34048978..8ce2c3ce3 100644 --- a/Dalamud.Injector/GameStart.cs +++ b/Dalamud.Injector/GameStart.cs @@ -440,7 +440,7 @@ namespace Dalamud.Injector #region Methods - [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Auto)] + [DllImport("advapi32.dll", CharSet = CharSet.Auto)] public static extern void BuildExplicitAccessWithName( ref EXPLICIT_ACCESS pExplicitAccess, string pTrusteeName, @@ -448,26 +448,26 @@ namespace Dalamud.Injector uint accessMode, uint inheritance); - [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Auto)] + [DllImport("advapi32.dll", CharSet = CharSet.Auto)] public static extern int SetEntriesInAcl( int cCountOfExplicitEntries, ref EXPLICIT_ACCESS pListOfExplicitEntries, IntPtr oldAcl, out IntPtr newAcl); - [DllImport("advapi32.dll", SetLastError = true)] + [DllImport("advapi32.dll")] public static extern bool InitializeSecurityDescriptor( out SECURITY_DESCRIPTOR pSecurityDescriptor, uint dwRevision); - [DllImport("advapi32.dll", SetLastError = true)] + [DllImport("advapi32.dll")] public static extern bool SetSecurityDescriptorDacl( ref SECURITY_DESCRIPTOR pSecurityDescriptor, bool bDaclPresent, IntPtr pDacl, bool bDaclDefaulted); - [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)] + [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern bool CreateProcess( string lpApplicationName, string lpCommandLine, @@ -480,39 +480,39 @@ namespace Dalamud.Injector [In] ref STARTUPINFO lpStartupInfo, out PROCESS_INFORMATION lpProcessInformation); - [DllImport("kernel32.dll", SetLastError = true)] + [DllImport("kernel32.dll")] public static extern bool CloseHandle(IntPtr hObject); - [DllImport("kernel32.dll", SetLastError = true)] + [DllImport("kernel32.dll")] public static extern uint ResumeThread(IntPtr hThread); - [DllImport("advapi32.dll", SetLastError = true)] + [DllImport("advapi32.dll")] public static extern bool ImpersonateSelf( SECURITY_IMPERSONATION_LEVEL impersonationLevel); - [DllImport("advapi32.dll", SetLastError = true)] + [DllImport("advapi32.dll")] public static extern bool OpenProcessToken( IntPtr processHandle, UInt32 desiredAccess, out IntPtr tokenHandle); - [DllImport("advapi32.dll", SetLastError = true)] + [DllImport("advapi32.dll")] public static extern bool OpenThreadToken( IntPtr threadHandle, uint desiredAccess, bool openAsSelf, out IntPtr tokenHandle); - [DllImport("advapi32.dll", SetLastError = true)] + [DllImport("advapi32.dll")] public static extern bool LookupPrivilegeValue(string lpSystemName, string lpName, ref LUID lpLuid); - [DllImport("advapi32.dll", SetLastError = true)] + [DllImport("advapi32.dll")] public static extern bool PrivilegeCheck( IntPtr clientToken, ref PRIVILEGE_SET requiredPrivileges, out bool pfResult); - [DllImport("advapi32.dll", SetLastError = true)] + [DllImport("advapi32.dll")] public static extern bool AdjustTokenPrivileges( IntPtr tokenHandle, bool disableAllPrivileges, @@ -521,7 +521,7 @@ namespace Dalamud.Injector IntPtr previousState, IntPtr cbOutPreviousState); - [DllImport("advapi32.dll", SetLastError = true)] + [DllImport("advapi32.dll")] public static extern uint GetSecurityInfo( IntPtr handle, SE_OBJECT_TYPE objectType, @@ -532,7 +532,7 @@ namespace Dalamud.Injector IntPtr pSacl, IntPtr pSecurityDescriptor); - [DllImport("advapi32.dll", SetLastError = true)] + [DllImport("advapi32.dll")] public static extern uint SetSecurityInfo( IntPtr handle, SE_OBJECT_TYPE objectType, @@ -542,16 +542,16 @@ namespace Dalamud.Injector IntPtr pDacl, IntPtr pSacl); - [DllImport("kernel32.dll", SetLastError = true)] + [DllImport("kernel32.dll")] public static extern IntPtr GetCurrentProcess(); - [DllImport("kernel32.dll", SetLastError = true)] + [DllImport("kernel32.dll")] public static extern IntPtr GetCurrentThread(); - [DllImport("user32.dll", SetLastError = true)] + [DllImport("user32.dll")] public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr hWndChildAfter, string className, IntPtr windowTitle); - [DllImport("user32.dll", SetLastError = true)] + [DllImport("user32.dll")] public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId); [DllImport("user32.dll")] diff --git a/Dalamud.sln b/Dalamud.sln index 65f43952f..4109bf8f6 100644 --- a/Dalamud.sln +++ b/Dalamud.sln @@ -62,7 +62,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cimplot", "external\cimplot EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cimguizmo", "external\cimguizmo\cimguizmo.vcxproj", "{F258347D-31BE-4605-98CE-40E43BDF6F9D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImGui.NET-472", "lib\ImGui.NET\src\ImGui.NET-472\ImGui.NET-472.csproj", "{A0A3C0AC-18D9-4C74-8CFC-14E53512846D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dalamud.ImGui", "imgui\Dalamud.ImGui\Dalamud.ImGui.csproj", "{B0AA8737-33A3-4766-8CBE-A48F2EF283BA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dalamud.ImGuizmo", "imgui\Dalamud.ImGuizmo\Dalamud.ImGuizmo.csproj", "{5E6EDD75-AE95-43A6-9D67-95B840EB4B71}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dalamud.ImPlot", "imgui\Dalamud.ImPlot\Dalamud.ImPlot.csproj", "{9C70BD06-D52C-425E-9C14-5D66BC6046EF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bindings", "Bindings", "{A217B3DF-607A-4EFB-B107-3C4809348043}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -138,10 +144,18 @@ Global {F258347D-31BE-4605-98CE-40E43BDF6F9D}.Debug|Any CPU.Build.0 = Debug|x64 {F258347D-31BE-4605-98CE-40E43BDF6F9D}.Release|Any CPU.ActiveCfg = Release|x64 {F258347D-31BE-4605-98CE-40E43BDF6F9D}.Release|Any CPU.Build.0 = Release|x64 - {A0A3C0AC-18D9-4C74-8CFC-14E53512846D}.Debug|Any CPU.ActiveCfg = Debug|x64 - {A0A3C0AC-18D9-4C74-8CFC-14E53512846D}.Debug|Any CPU.Build.0 = Debug|x64 - {A0A3C0AC-18D9-4C74-8CFC-14E53512846D}.Release|Any CPU.ActiveCfg = Release|x64 - {A0A3C0AC-18D9-4C74-8CFC-14E53512846D}.Release|Any CPU.Build.0 = Release|x64 + {B0AA8737-33A3-4766-8CBE-A48F2EF283BA}.Debug|Any CPU.ActiveCfg = Debug|x64 + {B0AA8737-33A3-4766-8CBE-A48F2EF283BA}.Debug|Any CPU.Build.0 = Debug|x64 + {B0AA8737-33A3-4766-8CBE-A48F2EF283BA}.Release|Any CPU.ActiveCfg = Release|x64 + {B0AA8737-33A3-4766-8CBE-A48F2EF283BA}.Release|Any CPU.Build.0 = Release|x64 + {5E6EDD75-AE95-43A6-9D67-95B840EB4B71}.Debug|Any CPU.ActiveCfg = Debug|x64 + {5E6EDD75-AE95-43A6-9D67-95B840EB4B71}.Debug|Any CPU.Build.0 = Debug|x64 + {5E6EDD75-AE95-43A6-9D67-95B840EB4B71}.Release|Any CPU.ActiveCfg = Release|x64 + {5E6EDD75-AE95-43A6-9D67-95B840EB4B71}.Release|Any CPU.Build.0 = Release|x64 + {9C70BD06-D52C-425E-9C14-5D66BC6046EF}.Debug|Any CPU.ActiveCfg = Debug|x64 + {9C70BD06-D52C-425E-9C14-5D66BC6046EF}.Debug|Any CPU.Build.0 = Debug|x64 + {9C70BD06-D52C-425E-9C14-5D66BC6046EF}.Release|Any CPU.ActiveCfg = Release|x64 + {9C70BD06-D52C-425E-9C14-5D66BC6046EF}.Release|Any CPU.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -160,7 +174,9 @@ Global {8BBACF2D-7AB8-4610-A115-0E363D35C291} = {E15BDA6D-E881-4482-94BA-BE5527E917FF} {76CAA246-C405-4A8C-B0AE-F4A0EF3D4E16} = {DBE5345E-6594-4A59-B183-1C3D5592269D} {F258347D-31BE-4605-98CE-40E43BDF6F9D} = {DBE5345E-6594-4A59-B183-1C3D5592269D} - {A0A3C0AC-18D9-4C74-8CFC-14E53512846D} = {DBE5345E-6594-4A59-B183-1C3D5592269D} + {B0AA8737-33A3-4766-8CBE-A48F2EF283BA} = {A217B3DF-607A-4EFB-B107-3C4809348043} + {5E6EDD75-AE95-43A6-9D67-95B840EB4B71} = {A217B3DF-607A-4EFB-B107-3C4809348043} + {9C70BD06-D52C-425E-9C14-5D66BC6046EF} = {A217B3DF-607A-4EFB-B107-3C4809348043} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {79B65AC9-C940-410E-AB61-7EA7E12C7599} diff --git a/Dalamud/AssemblyInfo.cs b/Dalamud/AssemblyInfo.cs new file mode 100644 index 000000000..a22fbd183 --- /dev/null +++ b/Dalamud/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +//[assembly: DisableRuntimeMarshalling] diff --git a/Dalamud/Dalamud.csproj b/Dalamud/Dalamud.csproj index 210ada844..f6566d2c3 100644 --- a/Dalamud/Dalamud.csproj +++ b/Dalamud/Dalamud.csproj @@ -66,7 +66,7 @@ - + all @@ -103,8 +103,10 @@ + + + - diff --git a/Dalamud/EntryPoint.cs b/Dalamud/EntryPoint.cs index f6ba990e6..c870b23a8 100644 --- a/Dalamud/EntryPoint.cs +++ b/Dalamud/EntryPoint.cs @@ -1,10 +1,14 @@ using System.Diagnostics; using System.IO; using System.Net; +using System.Reflection; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; +using Windows.Win32.Foundation; +using Windows.Win32.UI.WindowsAndMessaging; + using Dalamud.Common; using Dalamud.Configuration.Internal; using Dalamud.Interface.Internal.Windows; @@ -58,7 +62,7 @@ public sealed class EntryPoint var info = JsonConvert.DeserializeObject(infoStr)!; if ((info.BootWaitMessageBox & 4) != 0) - MessageBoxW(IntPtr.Zero, "Press OK to continue (BeforeDalamudConstruct)", "Dalamud Boot", MessageBoxType.Ok); + Windows.Win32.PInvoke.MessageBox(HWND.Null, "Press OK to continue (BeforeDalamudConstruct)", "Dalamud Boot", MESSAGEBOX_STYLE.MB_OK); new Thread(() => RunThread(info, mainThreadContinueEvent)).Start(); } @@ -135,6 +139,8 @@ public sealed class EntryPoint /// Event used to signal the main thread to continue. private static void RunThread(DalamudStartInfo info, IntPtr mainThreadContinueEvent) { + NativeLibrary.Load(Path.Combine(info.WorkingDirectory!, "cimgui.dll")); + // Setup logger InitLogging(info.LogPath!, info.BootShowConsole, true, info.LogName); SerilogEventSink.Instance.LogLine += SerilogOnLogLine; @@ -304,14 +310,14 @@ public sealed class EntryPoint // ignored } - const MessageBoxType flags = NativeFunctions.MessageBoxType.YesNo | NativeFunctions.MessageBoxType.IconError | NativeFunctions.MessageBoxType.SystemModal; - var result = MessageBoxW( - Process.GetCurrentProcess().MainWindowHandle, + const MESSAGEBOX_STYLE flags = MESSAGEBOX_STYLE.MB_YESNO | MESSAGEBOX_STYLE.MB_ICONERROR | MESSAGEBOX_STYLE.MB_SYSTEMMODAL; + var result = Windows.Win32.PInvoke.MessageBox( + new HWND(Process.GetCurrentProcess().MainWindowHandle), $"An internal error in a Dalamud plugin occurred.\nThe game must close.\n\n{ex.GetType().Name}\n{info}\n\n{pluginInfo}More information has been recorded separately{supportText}.\n\nDo you want to disable all plugins the next time you start the game?", "Dalamud", flags); - if (result == (int)User32.MessageBoxResult.IDYES) + if (result == MESSAGEBOX_RESULT.IDYES) { Log.Information("User chose to disable plugins on next launch..."); var config = Service.Get(); diff --git a/Dalamud/Game/ClientState/GamePad/GamepadState.cs b/Dalamud/Game/ClientState/GamePad/GamepadState.cs index 5237c6f0c..90484f0f1 100644 --- a/Dalamud/Game/ClientState/GamePad/GamepadState.cs +++ b/Dalamud/Game/ClientState/GamePad/GamepadState.cs @@ -7,7 +7,7 @@ using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Client.System.Input; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; namespace Dalamud.Game.ClientState.GamePad; diff --git a/Dalamud/Game/Gui/GameGui.cs b/Dalamud/Game/Gui/GameGui.cs index d3fe444ea..9e161bcd3 100644 --- a/Dalamud/Game/Gui/GameGui.cs +++ b/Dalamud/Game/Gui/GameGui.cs @@ -18,7 +18,7 @@ using FFXIVClientStructs.FFXIV.Client.UI.Agent; using FFXIVClientStructs.FFXIV.Common.Component.BGCollision; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Vector2 = System.Numerics.Vector2; using Vector3 = System.Numerics.Vector3; @@ -75,7 +75,7 @@ internal sealed unsafe class GameGui : IInternalDisposableService, IGameGui } // Hooked delegates - + [UnmanagedFunctionPointer(CallingConvention.ThisCall)] private delegate char HandleImmDelegate(IntPtr framework, char a2, byte a3); diff --git a/Dalamud/Hooking/Internal/FunctionPointerVariableHook.cs b/Dalamud/Hooking/Internal/FunctionPointerVariableHook.cs index 40a33fc1b..399643592 100644 --- a/Dalamud/Hooking/Internal/FunctionPointerVariableHook.cs +++ b/Dalamud/Hooking/Internal/FunctionPointerVariableHook.cs @@ -1,18 +1,23 @@ using System.Collections.Generic; -using System.ComponentModel; using System.Reflection; using System.Runtime.InteropServices; +using Windows.Win32.System.Memory; + using Dalamud.Memory; using JetBrains.Annotations; +using PInvoke; + +using Win32Exception = System.ComponentModel.Win32Exception; + namespace Dalamud.Hooking.Internal; /// /// Manages a hook with MinHook. /// /// Delegate type to represents a function prototype. This must be the same prototype as original function do. -internal class FunctionPointerVariableHook : Hook +internal unsafe class FunctionPointerVariableHook : Hook where T : Delegate { private readonly nint pfnDetour; @@ -55,11 +60,11 @@ internal class FunctionPointerVariableHook : Hook // Note: WINE seemingly tries to clean up all heap allocations on process exit. // We want our allocation to be kept there forever, until no running thread remains. // Therefore we're using VirtualAlloc instead of HeapCreate/HeapAlloc. - var pfnThunkBytes = (byte*)NativeFunctions.VirtualAlloc( - 0, + var pfnThunkBytes = (byte*)Windows.Win32.PInvoke.VirtualAlloc( + null, 12, - NativeFunctions.AllocationType.Reserve | NativeFunctions.AllocationType.Commit, - MemoryProtection.ExecuteReadWrite); + VIRTUAL_ALLOCATION_TYPE.MEM_RESERVE | VIRTUAL_ALLOCATION_TYPE.MEM_COMMIT, + PAGE_PROTECTION_FLAGS.PAGE_EXECUTE_READWRITE); if (pfnThunkBytes == null) { throw new OutOfMemoryException("Failed to allocate memory for import hooks."); @@ -78,10 +83,10 @@ internal class FunctionPointerVariableHook : Hook this.ppfnThunkJumpTarget = this.pfnThunk + 2; - if (!NativeFunctions.VirtualProtect( - this.Address, + if (!Windows.Win32.PInvoke.VirtualProtect( + this.Address.ToPointer(), (UIntPtr)Marshal.SizeOf(), - MemoryProtection.ExecuteReadWrite, + PAGE_PROTECTION_FLAGS.PAGE_EXECUTE_READWRITE, out var oldProtect)) { throw new Win32Exception(Marshal.GetLastWin32Error()); @@ -93,7 +98,7 @@ internal class FunctionPointerVariableHook : Hook Marshal.WriteIntPtr(this.Address, this.pfnThunk); // This really should not fail, but then even if it does, whatever. - NativeFunctions.VirtualProtect(this.Address, (UIntPtr)Marshal.SizeOf(), oldProtect, out _); + Windows.Win32.PInvoke.VirtualProtect(this.Address.ToPointer(), (UIntPtr)Marshal.SizeOf(), oldProtect, out _); // Add afterwards, so the hookIdent starts at 0. indexList.Add(this); diff --git a/Dalamud/Interface/Components/ImGuiComponents.ColorPickerWithPalette.cs b/Dalamud/Interface/Components/ImGuiComponents.ColorPickerWithPalette.cs index e2f68eab2..106938a9c 100644 --- a/Dalamud/Interface/Components/ImGuiComponents.ColorPickerWithPalette.cs +++ b/Dalamud/Interface/Components/ImGuiComponents.ColorPickerWithPalette.cs @@ -3,7 +3,7 @@ using System.Numerics; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Components; diff --git a/Dalamud/Interface/Components/ImGuiComponents.DisabledButton.cs b/Dalamud/Interface/Components/ImGuiComponents.DisabledButton.cs index ab2ed4724..e864d13d4 100644 --- a/Dalamud/Interface/Components/ImGuiComponents.DisabledButton.cs +++ b/Dalamud/Interface/Components/ImGuiComponents.DisabledButton.cs @@ -2,7 +2,7 @@ using System.Numerics; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Components; diff --git a/Dalamud/Interface/Components/ImGuiComponents.HelpMarker.cs b/Dalamud/Interface/Components/ImGuiComponents.HelpMarker.cs index 3392136d1..4312aed83 100644 --- a/Dalamud/Interface/Components/ImGuiComponents.HelpMarker.cs +++ b/Dalamud/Interface/Components/ImGuiComponents.HelpMarker.cs @@ -2,7 +2,7 @@ using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Common.Math; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Components; diff --git a/Dalamud/Interface/Components/ImGuiComponents.IconButton.cs b/Dalamud/Interface/Components/ImGuiComponents.IconButton.cs index 3e61e16bb..20eda4ce8 100644 --- a/Dalamud/Interface/Components/ImGuiComponents.IconButton.cs +++ b/Dalamud/Interface/Components/ImGuiComponents.IconButton.cs @@ -3,7 +3,7 @@ using System.Numerics; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Components; diff --git a/Dalamud/Interface/Components/ImGuiComponents.IconButtonSelect.cs b/Dalamud/Interface/Components/ImGuiComponents.IconButtonSelect.cs index 99050473f..89442ca73 100644 --- a/Dalamud/Interface/Components/ImGuiComponents.IconButtonSelect.cs +++ b/Dalamud/Interface/Components/ImGuiComponents.IconButtonSelect.cs @@ -4,7 +4,7 @@ using System.Numerics; using Dalamud.Interface.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Components; diff --git a/Dalamud/Interface/Components/ImGuiComponents.Test.cs b/Dalamud/Interface/Components/ImGuiComponents.Test.cs index ddc083cd8..ee2496513 100644 --- a/Dalamud/Interface/Components/ImGuiComponents.Test.cs +++ b/Dalamud/Interface/Components/ImGuiComponents.Test.cs @@ -1,4 +1,4 @@ -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Components; diff --git a/Dalamud/Interface/Components/ImGuiComponents.TextWithLabel.cs b/Dalamud/Interface/Components/ImGuiComponents.TextWithLabel.cs index 43b54fc93..42c3a6e4b 100644 --- a/Dalamud/Interface/Components/ImGuiComponents.TextWithLabel.cs +++ b/Dalamud/Interface/Components/ImGuiComponents.TextWithLabel.cs @@ -1,6 +1,6 @@ using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Components; diff --git a/Dalamud/Interface/Components/ImGuiComponents.ToggleSwitch.cs b/Dalamud/Interface/Components/ImGuiComponents.ToggleSwitch.cs index 6d6e0f6c3..b114eafd7 100644 --- a/Dalamud/Interface/Components/ImGuiComponents.ToggleSwitch.cs +++ b/Dalamud/Interface/Components/ImGuiComponents.ToggleSwitch.cs @@ -1,6 +1,6 @@ using System.Numerics; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Components; diff --git a/Dalamud/Interface/DragDrop/DragDropManager.cs b/Dalamud/Interface/DragDrop/DragDropManager.cs index f3acd704d..0f75d90af 100644 --- a/Dalamud/Interface/DragDrop/DragDropManager.cs +++ b/Dalamud/Interface/DragDrop/DragDropManager.cs @@ -5,7 +5,7 @@ using Dalamud.Interface.Internal; using Dalamud.IoC; using Dalamud.IoC.Internal; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; namespace Dalamud.Interface.DragDrop; @@ -103,7 +103,7 @@ internal partial class DragDropManager : IInternalDisposableService, IDragDropMa } /// - public void CreateImGuiSource(string label, Func validityCheck, Func tooltipBuilder) + public unsafe void CreateImGuiSource(string label, Func validityCheck, Func tooltipBuilder) { if (!this.IsDragging && !this.IsDropping()) { @@ -115,7 +115,7 @@ internal partial class DragDropManager : IInternalDisposableService, IDragDropMa return; } - ImGui.SetDragDropPayload(label, nint.Zero, 0); + ImGui.SetDragDropPayload(label, null, 0); if (this.CheckTooltipFrame(out var frame) && tooltipBuilder(this)) { this.lastTooltipFrame = frame; @@ -136,7 +136,7 @@ internal partial class DragDropManager : IInternalDisposableService, IDragDropMa unsafe { - if (ImGui.AcceptDragDropPayload(label, ImGuiDragDropFlags.AcceptBeforeDelivery).NativePtr != null && this.IsDropping()) + if (ImGui.AcceptDragDropPayload(label, ImGuiDragDropFlags.AcceptBeforeDelivery).Handle != null && this.IsDropping()) { this.lastDropFrame = -2; files = this.Files; diff --git a/Dalamud/Interface/DragDrop/DragDropTarget.cs b/Dalamud/Interface/DragDrop/DragDropTarget.cs index 8115e7353..344b7fbb8 100644 --- a/Dalamud/Interface/DragDrop/DragDropTarget.cs +++ b/Dalamud/Interface/DragDrop/DragDropTarget.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices.ComTypes; using System.Text; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; namespace Dalamud.Interface.DragDrop; diff --git a/Dalamud/Interface/FontIdentifier/DalamudAssetFontAndFamilyId.cs b/Dalamud/Interface/FontIdentifier/DalamudAssetFontAndFamilyId.cs index a6d40e4b7..eaf867924 100644 --- a/Dalamud/Interface/FontIdentifier/DalamudAssetFontAndFamilyId.cs +++ b/Dalamud/Interface/FontIdentifier/DalamudAssetFontAndFamilyId.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using Dalamud.Interface.ManagedFontAtlas; using Dalamud.Storage.Assets; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; diff --git a/Dalamud/Interface/FontIdentifier/DalamudDefaultFontAndFamilyId.cs b/Dalamud/Interface/FontIdentifier/DalamudDefaultFontAndFamilyId.cs index 7c6a69622..7bad13f11 100644 --- a/Dalamud/Interface/FontIdentifier/DalamudDefaultFontAndFamilyId.cs +++ b/Dalamud/Interface/FontIdentifier/DalamudDefaultFontAndFamilyId.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Dalamud.Interface.ManagedFontAtlas; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; diff --git a/Dalamud/Interface/FontIdentifier/GameFontAndFamilyId.cs b/Dalamud/Interface/FontIdentifier/GameFontAndFamilyId.cs index dd4ba0d66..065b71e33 100644 --- a/Dalamud/Interface/FontIdentifier/GameFontAndFamilyId.cs +++ b/Dalamud/Interface/FontIdentifier/GameFontAndFamilyId.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using Dalamud.Interface.GameFonts; using Dalamud.Interface.ManagedFontAtlas; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; diff --git a/Dalamud/Interface/FontIdentifier/IFontId.cs b/Dalamud/Interface/FontIdentifier/IFontId.cs index 4c611edf8..21b06f25b 100644 --- a/Dalamud/Interface/FontIdentifier/IFontId.cs +++ b/Dalamud/Interface/FontIdentifier/IFontId.cs @@ -1,6 +1,6 @@ using Dalamud.Interface.ManagedFontAtlas; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.FontIdentifier; diff --git a/Dalamud/Interface/FontIdentifier/IFontSpec.cs b/Dalamud/Interface/FontIdentifier/IFontSpec.cs index 4d0719d4e..7ae1e5914 100644 --- a/Dalamud/Interface/FontIdentifier/IFontSpec.cs +++ b/Dalamud/Interface/FontIdentifier/IFontSpec.cs @@ -1,6 +1,6 @@ using Dalamud.Interface.ManagedFontAtlas; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.FontIdentifier; diff --git a/Dalamud/Interface/FontIdentifier/SingleFontSpec.cs b/Dalamud/Interface/FontIdentifier/SingleFontSpec.cs index 946215b85..e362f1308 100644 --- a/Dalamud/Interface/FontIdentifier/SingleFontSpec.cs +++ b/Dalamud/Interface/FontIdentifier/SingleFontSpec.cs @@ -6,7 +6,7 @@ using System.Text; using Dalamud.Interface.ManagedFontAtlas; using Dalamud.Interface.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; diff --git a/Dalamud/Interface/FontIdentifier/SystemFontId.cs b/Dalamud/Interface/FontIdentifier/SystemFontId.cs index 0a350fc3a..21ccccd3e 100644 --- a/Dalamud/Interface/FontIdentifier/SystemFontId.cs +++ b/Dalamud/Interface/FontIdentifier/SystemFontId.cs @@ -5,7 +5,7 @@ using System.Linq; using Dalamud.Interface.ManagedFontAtlas; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; @@ -38,7 +38,7 @@ public sealed class SystemFontId : IFontId this.EnglishName = name; else if (this.LocaleNames.TryGetValue("en", out name)) this.EnglishName = name; - else + else this.EnglishName = this.LocaleNames.Values.First(); } diff --git a/Dalamud/Interface/GameFonts/GameFontLayoutPlan.cs b/Dalamud/Interface/GameFonts/GameFontLayoutPlan.cs index 6b602d911..5b0fe100b 100644 --- a/Dalamud/Interface/GameFonts/GameFontLayoutPlan.cs +++ b/Dalamud/Interface/GameFonts/GameFontLayoutPlan.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Numerics; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.GameFonts; diff --git a/Dalamud/Interface/ImGuiBackend/Dx11Win32Backend.cs b/Dalamud/Interface/ImGuiBackend/Dx11Win32Backend.cs index 1346de439..1331b6cfe 100644 --- a/Dalamud/Interface/ImGuiBackend/Dx11Win32Backend.cs +++ b/Dalamud/Interface/ImGuiBackend/Dx11Win32Backend.cs @@ -1,15 +1,19 @@ +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Dalamud.Bindings.ImGui; +using Dalamud.Bindings.ImGuizmo; +using Dalamud.Bindings.ImPlot; using Dalamud.Interface.ImGuiBackend.Helpers; using Dalamud.Interface.ImGuiBackend.InputHandler; using Dalamud.Interface.ImGuiBackend.Renderers; using Dalamud.Utility; -using ImGuiNET; - -using ImGuizmoNET; - -using ImPlotNET; +using Serilog; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; @@ -67,6 +71,58 @@ internal sealed unsafe class Dx11Win32Backend : IWin32Backend this.WindowHandle = desc.OutputWindow; var ctx = ImGui.CreateContext(); + + Debug.Assert(!ctx.IsNull); + var windowOff = Marshal.OffsetOf("CurrentWindow"); + //Debug.Assert(windowOff == 16368); + + /* + void ShowOffset(string name) + { + // var off = Marshal.OffsetOf(name); + var fieldInfo = typeof(T).GetField(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + var off = fieldInfo?.GetFieldOffset(); + + Log.Information($"{name} {typeof(T).Name} {off}"); + } + + //Util.Fatal($"{Marshal.SizeOf()} - {sizeof(Test)}", "", false); + + ShowOffset("ClipboardUserData"); + ShowOffset("MouseDrawCursor"); + + ShowOffset("MouseDelta"); + ShowOffset("KeysDown_0"); + ShowOffset("MousePos"); + + ShowOffset("KeyMods"); + */ + + void ShowAllFields() + { + var fields = typeof(T).GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + foreach (var field in fields) + { + var off = field.GetFieldOffset(); + Log.Information($"{field.Name} {typeof(T).Name} {off}"); + } + } + + ShowAllFields(); + + var contextSize = Unsafe.SizeOf(); + var ioSize = Unsafe.SizeOf(); + var platformIoSize = Unsafe.SizeOf(); + + //Debug.Assert(contextSize == 22688); + //Debug.Assert(ioSize == 14352); + //Debug.Assert(platformIoSize == 216); + + //var platformIoOff = Unsafe.OffsetOf("PlatformIO"); + //Debug.Assert(platformIoOff == 14360); + + Util.Fatal("bleh", "bleh", false); + ImGuizmo.SetImGuiContext(ctx); ImPlot.SetImGuiContext(ctx); ImPlot.CreateContext(); @@ -234,8 +290,8 @@ internal sealed unsafe class Dx11Win32Backend : IWin32Backend if (this.device.IsEmpty()) return; - this.imguiRenderer.Dispose(); - this.imguiInput.Dispose(); + this.imguiRenderer?.Dispose(); + this.imguiInput?.Dispose(); ImGui.DestroyContext(); @@ -245,3 +301,4 @@ internal sealed unsafe class Dx11Win32Backend : IWin32Backend this.swapChainPossiblyWrapped.Dispose(); } } + diff --git a/Dalamud/Interface/ImGuiBackend/Helpers/ImGuiViewportHelpers.cs b/Dalamud/Interface/ImGuiBackend/Helpers/ImGuiViewportHelpers.cs index c951eab1b..bbcaa618e 100644 --- a/Dalamud/Interface/ImGuiBackend/Helpers/ImGuiViewportHelpers.cs +++ b/Dalamud/Interface/ImGuiBackend/Helpers/ImGuiViewportHelpers.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Numerics; using System.Runtime.InteropServices; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using TerraFX.Interop.Windows; @@ -68,7 +68,7 @@ internal static class ImGuiViewportHelpers /// An instance of . /// Same value with . public unsafe delegate Vector2* GetWindowPosDelegate(Vector2* returnStorage, ImGuiViewportPtr viewport); - + /// /// Delegate to be called when the window should be moved. /// @@ -83,7 +83,7 @@ internal static class ImGuiViewportHelpers /// An instance of . /// Same value with . public unsafe delegate Vector2* GetWindowSizeDelegate(Vector2* returnStorage, ImGuiViewportPtr viewport); - + /// /// Delegate to be called when the window should be given focus. /// diff --git a/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.StaticLookupFunctions.cs b/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.StaticLookupFunctions.cs index 7732f0867..5710a5991 100644 --- a/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.StaticLookupFunctions.cs +++ b/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.StaticLookupFunctions.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using TerraFX.Interop.Windows; @@ -75,16 +75,16 @@ internal sealed partial class Win32InputHandler VK.VK_RMENU => ImGuiKey.RightAlt, VK.VK_RWIN => ImGuiKey.RightSuper, VK.VK_APPS => ImGuiKey.Menu, - '0' => ImGuiKey._0, - '1' => ImGuiKey._1, - '2' => ImGuiKey._2, - '3' => ImGuiKey._3, - '4' => ImGuiKey._4, - '5' => ImGuiKey._5, - '6' => ImGuiKey._6, - '7' => ImGuiKey._7, - '8' => ImGuiKey._8, - '9' => ImGuiKey._9, + '0' => ImGuiKey.Key0, + '1' => ImGuiKey.Key1, + '2' => ImGuiKey.Key2, + '3' => ImGuiKey.Key3, + '4' => ImGuiKey.Key4, + '5' => ImGuiKey.Key5, + '6' => ImGuiKey.Key6, + '7' => ImGuiKey.Key7, + '8' => ImGuiKey.Key8, + '9' => ImGuiKey.Key9, 'A' => ImGuiKey.A, 'B' => ImGuiKey.B, 'C' => ImGuiKey.C, @@ -190,16 +190,16 @@ internal sealed partial class Win32InputHandler ImGuiKey.RightAlt => VK.VK_RMENU, ImGuiKey.RightSuper => VK.VK_RWIN, ImGuiKey.Menu => VK.VK_APPS, - ImGuiKey._0 => '0', - ImGuiKey._1 => '1', - ImGuiKey._2 => '2', - ImGuiKey._3 => '3', - ImGuiKey._4 => '4', - ImGuiKey._5 => '5', - ImGuiKey._6 => '6', - ImGuiKey._7 => '7', - ImGuiKey._8 => '8', - ImGuiKey._9 => '9', + ImGuiKey.Key0 => '0', + ImGuiKey.Key1 => '1', + ImGuiKey.Key2 => '2', + ImGuiKey.Key3 => '3', + ImGuiKey.Key4 => '4', + ImGuiKey.Key5 => '5', + ImGuiKey.Key6 => '6', + ImGuiKey.Key7 => '7', + ImGuiKey.Key8 => '8', + ImGuiKey.Key9 => '9', ImGuiKey.A => 'A', ImGuiKey.B => 'B', ImGuiKey.C => 'C', @@ -274,14 +274,14 @@ internal sealed partial class Win32InputHandler private static void UpAllKeys() { var io = ImGui.GetIO(); - for (var i = (int)ImGuiKey.NamedKey_BEGIN; i < (int)ImGuiKey.NamedKey_END; i++) + for (var i = (int)ImGuiKey.NamedKeyBegin; i < (int)ImGuiKey.NamedKeyEnd; i++) io.AddKeyEvent((ImGuiKey)i, false); } private static void UpAllMouseButton() { var io = ImGui.GetIO(); - for (var i = 0; i < io.MouseDown.Count; i++) + for (var i = 0; i < io.MouseDown.Length; i++) io.MouseDown[i] = false; } diff --git a/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs b/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs index 18fd82651..ff71ecdf7 100644 --- a/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs +++ b/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs @@ -6,7 +6,9 @@ using System.Numerics; using System.Runtime.InteropServices; using System.Text; -using ImGuiNET; +using Dalamud.Bindings.ImGui; + +using Serilog; using TerraFX.Interop.Windows; @@ -51,7 +53,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler public Win32InputHandler(HWND hWnd) { var io = ImGui.GetIO(); - if (ImGui.GetIO().NativePtr->BackendPlatformName is not null) + if (ImGui.GetIO().Handle->BackendPlatformName is not null) throw new InvalidOperationException("ImGui backend platform seems to be have been already attached."); this.hWnd = hWnd; @@ -66,7 +68,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler ImGuiBackendFlags.PlatformHasViewports; this.platformNamePtr = Marshal.StringToHGlobalAnsi("imgui_impl_win32_c#"); - io.NativePtr->BackendPlatformName = (byte*)this.platformNamePtr; + io.Handle->BackendPlatformName = (byte*)this.platformNamePtr; var mainViewport = ImGui.GetMainViewport(); mainViewport.PlatformHandle = mainViewport.PlatformHandleRaw = hWnd; @@ -79,10 +81,10 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler this.cursors[(int)ImGuiMouseCursor.Arrow] = LoadCursorW(default, IDC.IDC_ARROW); this.cursors[(int)ImGuiMouseCursor.TextInput] = LoadCursorW(default, IDC.IDC_IBEAM); this.cursors[(int)ImGuiMouseCursor.ResizeAll] = LoadCursorW(default, IDC.IDC_SIZEALL); - this.cursors[(int)ImGuiMouseCursor.ResizeEW] = LoadCursorW(default, IDC.IDC_SIZEWE); - this.cursors[(int)ImGuiMouseCursor.ResizeNS] = LoadCursorW(default, IDC.IDC_SIZENS); - this.cursors[(int)ImGuiMouseCursor.ResizeNESW] = LoadCursorW(default, IDC.IDC_SIZENESW); - this.cursors[(int)ImGuiMouseCursor.ResizeNWSE] = LoadCursorW(default, IDC.IDC_SIZENWSE); + this.cursors[(int)ImGuiMouseCursor.ResizeEw] = LoadCursorW(default, IDC.IDC_SIZEWE); + this.cursors[(int)ImGuiMouseCursor.ResizeNs] = LoadCursorW(default, IDC.IDC_SIZENS); + this.cursors[(int)ImGuiMouseCursor.ResizeNesw] = LoadCursorW(default, IDC.IDC_SIZENESW); + this.cursors[(int)ImGuiMouseCursor.ResizeNwse] = LoadCursorW(default, IDC.IDC_SIZENWSE); this.cursors[(int)ImGuiMouseCursor.Hand] = LoadCursorW(default, IDC.IDC_HAND); this.cursors[(int)ImGuiMouseCursor.NotAllowed] = LoadCursorW(default, IDC.IDC_NO); } @@ -136,7 +138,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler this.iniPathPtr = newAlloc; } - ImGui.GetIO().NativePtr->IniFilename = (byte*)this.iniPathPtr; + ImGui.GetIO().Handle->IniFilename = (byte*)this.iniPathPtr; } } @@ -199,7 +201,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler // would become unresponsive if (!io.WantCaptureMouse) { - for (var i = 0; i < io.MouseDown.Count; i++) + for (var i = 0; i < io.MouseDown.Length; i++) { io.MouseDown[i] = false; } @@ -216,7 +218,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler /// Return value, if not doing further processing. public LRESULT? ProcessWndProcW(HWND hWndCurrent, uint msg, WPARAM wParam, LPARAM lParam) { - if (ImGui.GetCurrentContext() == nint.Zero) + if (ImGui.GetCurrentContext().IsNull) return null; var io = ImGui.GetIO(); @@ -469,7 +471,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler // See: https://github.com/goatcorp/ImGuiScene/pull/13 // > GetForegroundWindow from winuser.h is a surprisingly expensive function. var isForeground = GetForegroundWindow() == this.hWnd; - for (var i = (int)ImGuiKey.NamedKey_BEGIN; i < (int)ImGuiKey.NamedKey_END; i++) + for (var i = (int)ImGuiKey.NamedKeyBegin; i < (int)ImGuiKey.NamedKeyEnd; i++) { // Skip raising modifier keys if the game is focused. // This allows us to raise the keys when one is held and the window becomes unfocused, @@ -495,11 +497,11 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler // The message wasn't handled, but it's a platform window // So we have to handle some messages ourselves // BUT we might have disposed the context, so check that - if (ImGui.GetCurrentContext() == nint.Zero) + if (ImGui.GetCurrentContext().IsNull) return DefWindowProcW(hWndCurrent, msg, wParam, lParam); var viewport = ImGui.FindViewportByPlatformHandle(hWndCurrent); - if (viewport.NativePtr == null) + if (viewport.Handle == null) return DefWindowProcW(hWndCurrent, msg, wParam, lParam); switch (msg) @@ -556,14 +558,14 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler this.cursors.AsSpan().Clear(); - if (ImGui.GetIO().NativePtr->BackendPlatformName == (void*)this.platformNamePtr) - ImGui.GetIO().NativePtr->BackendPlatformName = null; + if (ImGui.GetIO().Handle->BackendPlatformName == (void*)this.platformNamePtr) + ImGui.GetIO().Handle->BackendPlatformName = null; if (this.platformNamePtr != nint.Zero) Marshal.FreeHGlobal(this.platformNamePtr); if (this.iniPathPtr != nint.Zero) { - ImGui.GetIO().NativePtr->IniFilename = null; + ImGui.GetIO().Handle->IniFilename = null; Marshal.FreeHGlobal(this.iniPathPtr); this.iniPathPtr = nint.Zero; } @@ -587,20 +589,20 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler this.classNamePtr = Marshal.StringToHGlobalUni("ImGui Platform"); var pio = ImGui.GetPlatformIO(); - pio.Platform_CreateWindow = this.RegisterFunctionPointer(this.OnCreateWindow); - pio.Platform_DestroyWindow = this.RegisterFunctionPointer(this.OnDestroyWindow); - pio.Platform_ShowWindow = this.RegisterFunctionPointer(this.OnShowWindow); - pio.Platform_SetWindowPos = this.RegisterFunctionPointer(this.OnSetWindowPos); - pio.Platform_GetWindowPos = this.RegisterFunctionPointer(this.OnGetWindowPos); - pio.Platform_SetWindowSize = this.RegisterFunctionPointer(this.OnSetWindowSize); - pio.Platform_GetWindowSize = this.RegisterFunctionPointer(this.OnGetWindowSize); - pio.Platform_SetWindowFocus = this.RegisterFunctionPointer(this.OnSetWindowFocus); - pio.Platform_GetWindowFocus = this.RegisterFunctionPointer(this.OnGetWindowFocus); - pio.Platform_GetWindowMinimized = + pio.PlatformCreateWindow = this.RegisterFunctionPointer(this.OnCreateWindow); + pio.PlatformDestroyWindow = this.RegisterFunctionPointer(this.OnDestroyWindow); + pio.PlatformShowWindow = this.RegisterFunctionPointer(this.OnShowWindow); + pio.PlatformSetWindowPos = this.RegisterFunctionPointer(this.OnSetWindowPos); + pio.PlatformGetWindowPos = this.RegisterFunctionPointer(this.OnGetWindowPos); + pio.PlatformSetWindowSize = this.RegisterFunctionPointer(this.OnSetWindowSize); + pio.PlatformGetWindowSize = this.RegisterFunctionPointer(this.OnGetWindowSize); + pio.PlatformSetWindowFocus = this.RegisterFunctionPointer(this.OnSetWindowFocus); + pio.PlatformGetWindowFocus = this.RegisterFunctionPointer(this.OnGetWindowFocus); + pio.PlatformGetWindowMinimized = this.RegisterFunctionPointer(this.OnGetWindowMinimized); - pio.Platform_SetWindowTitle = this.RegisterFunctionPointer(this.OnSetWindowTitle); - pio.Platform_SetWindowAlpha = this.RegisterFunctionPointer(this.OnSetWindowAlpha); - pio.Platform_UpdateWindow = this.RegisterFunctionPointer(this.OnUpdateWindow); + pio.PlatformSetWindowTitle = this.RegisterFunctionPointer(this.OnSetWindowTitle); + pio.PlatformSetWindowAlpha = this.RegisterFunctionPointer(this.OnSetWindowAlpha); + pio.PlatformUpdateWindow = this.RegisterFunctionPointer(this.OnUpdateWindow); // pio.Platform_SetImeInputPos = this.RegisterFunctionPointer(this.OnSetImeInputPos); // pio.Platform_GetWindowDpiScale = this.RegisterFunctionPointer(this.OnGetWindowDpiScale); // pio.Platform_ChangedViewport = this.RegisterFunctionPointer(this.OnChangedViewport); @@ -624,7 +626,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler var mainViewport = ImGui.GetMainViewport(); var data = (ImGuiViewportDataWin32*)Marshal.AllocHGlobal(Marshal.SizeOf()); - mainViewport.PlatformUserData = (nint)data; + mainViewport.PlatformUserData = data; data->Hwnd = this.input.hWnd; data->HwndOwned = false; mainViewport.PlatformHandle = this.input.hWnd; @@ -637,12 +639,12 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler var pio = ImGui.GetPlatformIO(); - if (ImGui.GetPlatformIO().NativePtr->Monitors.Data != 0) + if (ImGui.GetPlatformIO().Handle->Monitors.Data != null) { // We allocated the platform monitor data in OnUpdateMonitors ourselves, // so we have to free it ourselves to ImGui doesn't try to, or else it will crash - Marshal.FreeHGlobal(ImGui.GetPlatformIO().NativePtr->Monitors.Data); - ImGui.GetPlatformIO().NativePtr->Monitors = default; + Marshal.FreeHGlobal(new IntPtr(ImGui.GetPlatformIO().Handle->Monitors.Data)); + ImGui.GetPlatformIO().Handle->Monitors = default; } if (this.classNamePtr != 0) @@ -652,19 +654,19 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler this.classNamePtr = 0; } - pio.Platform_CreateWindow = nint.Zero; - pio.Platform_DestroyWindow = nint.Zero; - pio.Platform_ShowWindow = nint.Zero; - pio.Platform_SetWindowPos = nint.Zero; - pio.Platform_GetWindowPos = nint.Zero; - pio.Platform_SetWindowSize = nint.Zero; - pio.Platform_GetWindowSize = nint.Zero; - pio.Platform_SetWindowFocus = nint.Zero; - pio.Platform_GetWindowFocus = nint.Zero; - pio.Platform_GetWindowMinimized = nint.Zero; - pio.Platform_SetWindowTitle = nint.Zero; - pio.Platform_SetWindowAlpha = nint.Zero; - pio.Platform_UpdateWindow = nint.Zero; + pio.PlatformCreateWindow = null; + pio.PlatformDestroyWindow = null; + pio.PlatformShowWindow = null; + pio.PlatformSetWindowPos = null; + pio.PlatformGetWindowPos = null; + pio.PlatformSetWindowSize = null; + pio.PlatformGetWindowSize = null; + pio.PlatformSetWindowFocus = null; + pio.PlatformGetWindowFocus = null; + pio.PlatformGetWindowMinimized = null; + pio.PlatformSetWindowTitle = null; + pio.PlatformSetWindowAlpha = null; + pio.PlatformUpdateWindow = null; // pio.Platform_SetImeInputPos = nint.Zero; // pio.Platform_GetWindowDpiScale = nint.Zero; // pio.Platform_ChangedViewport = nint.Zero; @@ -685,15 +687,15 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler var pio = ImGui.GetPlatformIO(); var numMonitors = GetSystemMetrics(SM.SM_CMONITORS); var data = Marshal.AllocHGlobal(Marshal.SizeOf() * numMonitors); - if (pio.NativePtr->Monitors.Data != 0) - Marshal.FreeHGlobal(pio.NativePtr->Monitors.Data); - pio.NativePtr->Monitors = new(numMonitors, numMonitors, data); + if (pio.Handle->Monitors.Data != null) + Marshal.FreeHGlobal(new IntPtr(pio.Handle->Monitors.Data)); + pio.Handle->Monitors = new(numMonitors, numMonitors, (ImGuiPlatformMonitor*)data.ToPointer()); // ImGuiPlatformIOPtr platformIO = ImGui.GetPlatformIO(); - // Marshal.FreeHGlobal(platformIO.NativePtr->Monitors.Data); + // Marshal.FreeHGlobal(platformIO.Handle->Monitors.Data); // int numMonitors = GetSystemMetrics(SystemMetric.SM_CMONITORS); // nint data = Marshal.AllocHGlobal(Marshal.SizeOf() * numMonitors); - // platformIO.NativePtr->Monitors = new ImVector(numMonitors, numMonitors, data); + // platformIO.Handle->Monitors = new ImVector(numMonitors, numMonitors, data); var monitorIndex = -1; var enumfn = new MonitorEnumProcDelegate( @@ -710,7 +712,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler var workRb = new Vector2(info.rcWork.right, info.rcWork.bottom); // Give ImGui the info for this display - var imMonitor = ImGui.GetPlatformIO().Monitors[monitorIndex]; + ref var imMonitor = ref ImGui.GetPlatformIO().Monitors.Ref(monitorIndex); imMonitor.MainPos = monitorLt; imMonitor.MainSize = monitorRb - monitorLt; imMonitor.WorkPos = workLt; @@ -723,18 +725,31 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler null, (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(enumfn), default); + + Log.Information("Monitors set up!"); + for (var i = 0; i < numMonitors; i++) + { + var monitor = pio.Handle->Monitors[i]; + Log.Information( + "Monitor {Index}: {MainPos} {MainSize} {WorkPos} {WorkSize}", + i, + monitor.MainPos, + monitor.MainSize, + monitor.WorkPos, + monitor.WorkSize); + } } - private nint RegisterFunctionPointer(T obj) + private void* RegisterFunctionPointer(T obj) { this.delegateReferences.Add(obj); - return Marshal.GetFunctionPointerForDelegate(obj); + return Marshal.GetFunctionPointerForDelegate(obj).ToPointer(); } private void OnCreateWindow(ImGuiViewportPtr viewport) { var data = (ImGuiViewportDataWin32*)Marshal.AllocHGlobal(Marshal.SizeOf()); - viewport.PlatformUserData = (nint)data; + viewport.PlatformUserData = data; viewport.Flags = ImGuiViewportFlags.NoTaskBarIcon | ImGuiViewportFlags.NoFocusOnClick | @@ -784,7 +799,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler private void OnDestroyWindow(ImGuiViewportPtr viewport) { // This is also called on the main viewport for some reason, and we never set that viewport's PlatformUserData - if (viewport.PlatformUserData == nint.Zero) return; + if (viewport.PlatformUserData == null) return; var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; @@ -807,8 +822,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler } data->Hwnd = default; - Marshal.FreeHGlobal(viewport.PlatformUserData); - viewport.PlatformUserData = viewport.PlatformHandle = nint.Zero; + Marshal.FreeHGlobal(new IntPtr(viewport.PlatformUserData)); + viewport.PlatformUserData = viewport.PlatformHandle = null; } private void OnShowWindow(ImGuiViewportPtr viewport) diff --git a/Dalamud/Interface/ImGuiBackend/Renderers/Dx11Renderer.ViewportHandler.cs b/Dalamud/Interface/ImGuiBackend/Renderers/Dx11Renderer.ViewportHandler.cs index 7fcbe432c..ffe792964 100644 --- a/Dalamud/Interface/ImGuiBackend/Renderers/Dx11Renderer.ViewportHandler.cs +++ b/Dalamud/Interface/ImGuiBackend/Renderers/Dx11Renderer.ViewportHandler.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using Dalamud.Interface.ImGuiBackend.Helpers; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; @@ -36,11 +36,11 @@ internal unsafe partial class Dx11Renderer this.renderer = renderer; var pio = ImGui.GetPlatformIO(); - pio.Renderer_CreateWindow = Marshal.GetFunctionPointerForDelegate(this.cwd = this.OnCreateWindow); - pio.Renderer_DestroyWindow = (nint)(delegate* unmanaged)&OnDestroyWindow; - pio.Renderer_SetWindowSize = (nint)(delegate* unmanaged)&OnSetWindowSize; - pio.Renderer_RenderWindow = (nint)(delegate* unmanaged)&OnRenderWindow; - pio.Renderer_SwapBuffers = (nint)(delegate* unmanaged)&OnSwapBuffers; + pio.RendererCreateWindow = Marshal.GetFunctionPointerForDelegate(this.cwd = this.OnCreateWindow).ToPointer(); + pio.RendererDestroyWindow = (delegate* unmanaged)&OnDestroyWindow; + pio.RendererSetWindowSize = (delegate* unmanaged)&OnSetWindowSize; + pio.RendererRenderWindow = (delegate* unmanaged)&OnRenderWindow; + pio.RendererSwapBuffers = (delegate* unmanaged)&OnSwapBuffers; } ~ViewportHandler() => ReleaseUnmanagedResources(); @@ -54,20 +54,20 @@ internal unsafe partial class Dx11Renderer private static void ReleaseUnmanagedResources() { var pio = ImGui.GetPlatformIO(); - pio.Renderer_CreateWindow = nint.Zero; - pio.Renderer_DestroyWindow = nint.Zero; - pio.Renderer_SetWindowSize = nint.Zero; - pio.Renderer_RenderWindow = nint.Zero; - pio.Renderer_SwapBuffers = nint.Zero; + pio.RendererCreateWindow = null; + pio.RendererDestroyWindow = null; + pio.RendererSetWindowSize = null; + pio.RendererRenderWindow = null; + pio.RendererSwapBuffers = null; } [UnmanagedCallersOnly] private static void OnDestroyWindow(ImGuiViewportPtr viewport) { - if (viewport.RendererUserData == nint.Zero) + if (viewport.RendererUserData == null) return; ViewportData.Attach(viewport.RendererUserData).Dispose(); - viewport.RendererUserData = nint.Zero; + viewport.RendererUserData = null; } [UnmanagedCallersOnly] @@ -87,7 +87,7 @@ internal unsafe partial class Dx11Renderer // PlatformHandleRaw should always be a HWND, whereas PlatformHandle might be a higher-level handle (e.g. GLFWWindow*, SDL_Window*). // Some backend will leave PlatformHandleRaw NULL, in which case we assume PlatformHandle will contain the HWND. var hWnd = viewport.PlatformHandleRaw; - if (hWnd == 0) + if (hWnd == null) hWnd = viewport.PlatformHandle; try { @@ -135,12 +135,12 @@ internal unsafe partial class Dx11Renderer public IDXGISwapChain* SwapChain => this.swapChain; - public nint Handle => GCHandle.ToIntPtr(this.selfGcHandle); + public void* Handle => GCHandle.ToIntPtr(this.selfGcHandle).ToPointer(); private DXGI_FORMAT RtvFormat => this.parent.rtvFormat; - public static ViewportData Attach(nint handle) => - (ViewportData)GCHandle.FromIntPtr(handle).Target ?? throw new InvalidOperationException(); + public static ViewportData Attach(void* handle) => + (ViewportData)GCHandle.FromIntPtr(new IntPtr(handle)).Target ?? throw new InvalidOperationException(); public static ViewportData Create( Dx11Renderer renderer, @@ -220,7 +220,7 @@ internal unsafe partial class Dx11Renderer dcVisual.Get()->SetContent((IUnknown*)swapChain1.Get()).ThrowOnError(); dcTarget.Get()->SetRoot(dcVisual).ThrowOnError(); renderer.dcompDevice.Get()->Commit().ThrowOnError(); - + using var swapChain = default(ComPtr); swapChain1.As(&swapChain).ThrowOnError(); return Create(renderer, swapChain, dcVisual, dcTarget); @@ -272,7 +272,7 @@ internal unsafe partial class Dx11Renderer return Create(renderer, swapChain, null, null); } - + public void Dispose() { if (!this.selfGcHandle.IsAllocated) diff --git a/Dalamud/Interface/ImGuiBackend/Renderers/Dx11Renderer.cs b/Dalamud/Interface/ImGuiBackend/Renderers/Dx11Renderer.cs index 685389058..34bda8b12 100644 --- a/Dalamud/Interface/ImGuiBackend/Renderers/Dx11Renderer.cs +++ b/Dalamud/Interface/ImGuiBackend/Renderers/Dx11Renderer.cs @@ -15,7 +15,7 @@ using Dalamud.Interface.Textures.TextureWraps.Internal; using Dalamud.Interface.Utility; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; @@ -67,7 +67,7 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer public Dx11Renderer(IDXGISwapChain* swapChain, ID3D11Device* device, ID3D11DeviceContext* context) { var io = ImGui.GetIO(); - if (ImGui.GetIO().NativePtr->BackendRendererName is not null) + if (ImGui.GetIO().Handle->BackendRendererName is not null) throw new InvalidOperationException("ImGui backend renderer seems to be have been already attached."); try { @@ -81,7 +81,7 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer io.BackendFlags |= ImGuiBackendFlags.RendererHasVtxOffset | ImGuiBackendFlags.RendererHasViewports; this.renderNamePtr = Marshal.StringToHGlobalAnsi("imgui_impl_dx11_c#"); - io.NativePtr->BackendRendererName = (byte*)this.renderNamePtr; + io.Handle->BackendRendererName = (byte*)this.renderNamePtr; if (io.ConfigFlags.HasFlag(ImGuiConfigFlags.ViewportsEnable)) { @@ -102,7 +102,8 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer } this.mainViewport = ViewportData.Create(this, swapChain, null, null); - ImGui.GetPlatformIO().Viewports[0].RendererUserData = this.mainViewport.Handle; + var vp = ImGui.GetPlatformIO().Viewports[0]; + vp.RendererUserData = this.mainViewport.Handle; } catch { @@ -205,7 +206,7 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer this.device.Get()->CreateTexture2D(&texDesc, &subrdata, texture.GetAddressOf())); } } - + texture.Get()->SetDebugName($"Texture:{debugName}:SRV"); using var srvTemp = default(ComPtr); @@ -243,7 +244,7 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer if (!drawData.Valid || drawData.CmdListsCount == 0) return; - var cmdLists = new Span(drawData.NativePtr->CmdLists, drawData.NativePtr->CmdListsCount); + var cmdLists = new Span(drawData.Handle->CmdLists, drawData.Handle->CmdListsCount); // Create and grow vertex/index buffers if needed if (this.vertexBufferSize < drawData.TotalVtxCount) @@ -298,8 +299,8 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer var targetIndices = new Span(indexData.pData, this.indexBufferSize); foreach (ref var cmdList in cmdLists) { - var vertices = new ImVectorWrapper(&cmdList.NativePtr->VtxBuffer); - var indices = new ImVectorWrapper(&cmdList.NativePtr->IdxBuffer); + var vertices = new ImVectorWrapper(cmdList.Handle->VtxBuffer.ToUntyped()); + var indices = new ImVectorWrapper(cmdList.Handle->IdxBuffer.ToUntyped()); vertices.DataSpan.CopyTo(targetVertices); indices.DataSpan.CopyTo(targetIndices); @@ -346,7 +347,7 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer var clipOff = new Vector4(drawData.DisplayPos, drawData.DisplayPos.X, drawData.DisplayPos.Y); foreach (ref var cmdList in cmdLists) { - var cmds = new ImVectorWrapper(&cmdList.NativePtr->CmdBuffer); + var cmds = new ImVectorWrapper(cmdList.Handle->CmdBuffer.ToUntyped()); foreach (ref var cmd in cmds.DataSpan) { var clipV4 = cmd.ClipRect - clipOff; @@ -358,10 +359,10 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer this.context.Get()->RSSetScissorRects(1, &clipRect); - if (cmd.UserCallback == nint.Zero) + if (cmd.UserCallback != null) { // Bind texture and draw - var srv = (ID3D11ShaderResourceView*)cmd.TextureId; + var srv = (ID3D11ShaderResourceView*)cmd.TextureId.Handle; this.context.Get()->PSSetShader(this.pixelShader, null, 0); this.context.Get()->PSSetSamplers(0, 1, this.sampler.GetAddressOf()); this.context.Get()->PSSetShaderResources(0, 1, &srv); @@ -397,13 +398,16 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer textureIndex < textureCount; textureIndex++) { + int width = 0, height = 0, bytespp = 0; + byte* fontPixels = null; + // Build texture atlas io.Fonts.GetTexDataAsRGBA32( textureIndex, - out byte* fontPixels, - out var width, - out var height, - out var bytespp); + &fontPixels, + ref width, + ref height, + ref bytespp); var tex = this.CreateTexture2D( new(fontPixels, width * height * bytespp), @@ -539,7 +543,7 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer fixed (ID3D11SamplerState** ppSampler = &this.sampler.GetPinnableReference()) this.device.Get()->CreateSamplerState(&samplerDesc, ppSampler).ThrowOnError(); } - + // Create the constant buffer if (this.vertexConstantBuffer.IsEmpty()) { @@ -630,14 +634,15 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer this.releaseUnmanagedResourceCalled = true; this.mainViewport.Dispose(); - ImGui.GetPlatformIO().Viewports[0].RendererUserData = nint.Zero; + var vp = ImGui.GetPlatformIO().Viewports[0]; + vp.RendererUserData = null; ImGui.DestroyPlatformWindows(); this.viewportHandler.Dispose(); var io = ImGui.GetIO(); - if (io.NativePtr->BackendRendererName == (void*)this.renderNamePtr) - io.NativePtr->BackendRendererName = null; + if (io.Handle->BackendRendererName == (void*)this.renderNamePtr) + io.Handle->BackendRendererName = null; if (this.renderNamePtr != 0) Marshal.FreeHGlobal(this.renderNamePtr); @@ -645,7 +650,7 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer fontResourceView.Dispose(); foreach (var i in Enumerable.Range(0, io.Fonts.Textures.Size)) - io.Fonts.SetTexID(i, nint.Zero); + io.Fonts.SetTexID(i, ImTextureID.Null); this.device.Reset(); this.context.Reset(); diff --git a/Dalamud/Interface/ImGuiBackend/Renderers/IImGuiRenderer.cs b/Dalamud/Interface/ImGuiBackend/Renderers/IImGuiRenderer.cs index dc9229dc6..83149c960 100644 --- a/Dalamud/Interface/ImGuiBackend/Renderers/IImGuiRenderer.cs +++ b/Dalamud/Interface/ImGuiBackend/Renderers/IImGuiRenderer.cs @@ -3,7 +3,7 @@ using Dalamud.Interface.Textures; using Dalamud.Interface.Textures.TextureWraps; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.ImGuiBackend.Renderers; diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialog.UI.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialog.UI.cs index e4747b1e6..d9b681f3b 100644 --- a/Dalamud/Interface/ImGuiFileDialog/FileDialog.UI.cs +++ b/Dalamud/Interface/ImGuiFileDialog/FileDialog.UI.cs @@ -5,7 +5,7 @@ using System.Numerics; using Dalamud.Interface.Utility; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.ImGuiFileDialog; @@ -397,7 +397,7 @@ public partial class FileDialog ImGuiListClipperPtr clipper; unsafe { - clipper = new ImGuiListClipperPtr(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); + clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper()); } lock (this.filesLock) diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialog.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialog.cs index 1d31642d3..3d8246ffd 100644 --- a/Dalamud/Interface/ImGuiFileDialog/FileDialog.cs +++ b/Dalamud/Interface/ImGuiFileDialog/FileDialog.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.ImGuiFileDialog; diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialogManager.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialogManager.cs index ae9c8ef38..cd4bbb4ef 100644 --- a/Dalamud/Interface/ImGuiFileDialog/FileDialogManager.cs +++ b/Dalamud/Interface/ImGuiFileDialog/FileDialogManager.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.ImGuiFileDialog; diff --git a/Dalamud/Interface/ImGuiFontChooserDialog/SingleFontChooserDialog.cs b/Dalamud/Interface/ImGuiFontChooserDialog/SingleFontChooserDialog.cs index f03518ada..4aa57eceb 100644 --- a/Dalamud/Interface/ImGuiFontChooserDialog/SingleFontChooserDialog.cs +++ b/Dalamud/Interface/ImGuiFontChooserDialog/SingleFontChooserDialog.cs @@ -5,6 +5,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; +using Dalamud.Bindings.ImGui; using Dalamud.Configuration.Internal; using Dalamud.Interface.Colors; using Dalamud.Interface.FontIdentifier; @@ -12,9 +13,6 @@ using Dalamud.Interface.ManagedFontAtlas; using Dalamud.Interface.ManagedFontAtlas.Internals; using Dalamud.Interface.Utility; using Dalamud.Utility; - -using ImGuiNET; - using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; @@ -89,7 +87,7 @@ public sealed class SingleFontChooserDialog : IDisposable private bool popupSizeChanged; private Vector2 popupPosition = new(float.NaN); private Vector2 popupSize = new(float.NaN); - + /// Initializes a new instance of the class. /// The relevant instance of UiBuilder. /// Whether the fonts in the atlas is global scaled. @@ -274,7 +272,7 @@ public sealed class SingleFontChooserDialog : IDisposable return new Vector2(40, 30) * ImGui.GetTextLineHeight(); } - /// + /// public void Dispose() { this.fontHandle?.Dispose(); @@ -432,7 +430,7 @@ public sealed class SingleFontChooserDialog : IDisposable this.firstDrawAfterRefresh = false; } - private static float GetDistanceFromMonitor(Vector2 point, ImGuiPlatformMonitorPtr monitor) + private static float GetDistanceFromMonitor(Vector2 point, ImGuiPlatformMonitor monitor) { var lt = monitor.MainPos; var rb = monitor.MainPos + monitor.MainSize; @@ -565,7 +563,7 @@ public sealed class SingleFontChooserDialog : IDisposable fixed (byte* buf = this.fontPreviewText) fixed (byte* label = "##fontPreviewText"u8) { - ImGuiNative.igInputTextMultiline( + ImGui.InputTextMultiline( label, buf, (uint)this.fontPreviewText.Length, @@ -691,7 +689,7 @@ public sealed class SingleFontChooserDialog : IDisposable if (ImGui.BeginChild("##familyList", ImGui.GetContentRegionAvail())) { - var clipper = new ImGuiListClipperPtr(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); + var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper()); var lineHeight = ImGui.GetTextLineHeightWithSpacing(); if ((changed || this.firstDrawAfterRefresh) && this.selectedFamilyIndex != -1) @@ -858,7 +856,7 @@ public sealed class SingleFontChooserDialog : IDisposable if (ImGui.BeginChild("##fontList")) { - var clipper = new ImGuiListClipperPtr(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); + var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper()); var lineHeight = ImGui.GetTextLineHeightWithSpacing(); if ((changed || this.firstDrawAfterRefresh) && this.selectedFontIndex != -1) @@ -962,7 +960,7 @@ public sealed class SingleFontChooserDialog : IDisposable if (ImGui.BeginChild("##fontSizeList")) { - var clipper = new ImGuiListClipperPtr(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); + var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper()); var lineHeight = ImGui.GetTextLineHeightWithSpacing(); if (changed && this.selectedFontIndex != -1) @@ -1149,7 +1147,7 @@ public sealed class SingleFontChooserDialog : IDisposable return 0; }); - + if (stylePushed) ImGui.PopStyleColor(); diff --git a/Dalamud/Interface/ImGuiNotification/Internal/ActiveNotification.ImGui.cs b/Dalamud/Interface/ImGuiNotification/Internal/ActiveNotification.ImGui.cs index c672dd3b3..97750bb5e 100644 --- a/Dalamud/Interface/ImGuiNotification/Internal/ActiveNotification.ImGui.cs +++ b/Dalamud/Interface/ImGuiNotification/Internal/ActiveNotification.ImGui.cs @@ -5,7 +5,7 @@ using Dalamud.Interface.Internal; using Dalamud.Interface.Utility; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.ImGuiNotification.Internal; @@ -88,7 +88,11 @@ internal sealed partial class ActiveNotification if (!isTakingKeyboardInput && !isHovered && isFocused) { - ImGui.SetWindowFocus(null); + unsafe + { + ImGui.SetWindowFocus((byte*)null); + } + isFocused = false; } @@ -529,9 +533,9 @@ internal sealed partial class ActiveNotification verts[vertPtr++] = lastOff; unsafe { - var dlist = ImGui.GetWindowDrawList().NativePtr; + var dlist = ImGui.GetWindowDrawList().Handle; fixed (Vector2* pvert = verts) - ImGuiNative.ImDrawList_AddConvexPolyFilled(dlist, pvert, vertPtr, color); + dlist->AddConvexPolyFilled(pvert, vertPtr, color); } } diff --git a/Dalamud/Interface/ImGuiNotification/Internal/NotificationManager.cs b/Dalamud/Interface/ImGuiNotification/Internal/NotificationManager.cs index 4157d1356..dd88d92f6 100644 --- a/Dalamud/Interface/ImGuiNotification/Internal/NotificationManager.cs +++ b/Dalamud/Interface/ImGuiNotification/Internal/NotificationManager.cs @@ -11,7 +11,7 @@ using Dalamud.IoC.Internal; using Dalamud.Plugin.Internal.Types; using Dalamud.Plugin.Services; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.ImGuiNotification.Internal; diff --git a/Dalamud/Interface/ImGuiNotification/NotificationUtilities.cs b/Dalamud/Interface/ImGuiNotification/NotificationUtilities.cs index b31321d8b..8b0b2e25c 100644 --- a/Dalamud/Interface/ImGuiNotification/NotificationUtilities.cs +++ b/Dalamud/Interface/ImGuiNotification/NotificationUtilities.cs @@ -13,7 +13,7 @@ using Dalamud.Interface.Utility; using Dalamud.Plugin.Internal.Types; using Dalamud.Storage.Assets; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.ImGuiNotification; @@ -56,7 +56,7 @@ public static class NotificationUtilities using (fontHandle.Push()) { var font = ImGui.GetFont(); - var glyphPtr = (ImGuiHelpers.ImFontGlyphReal*)font.FindGlyphNoFallback(c).NativePtr; + var glyphPtr = (ImGuiHelpers.ImFontGlyphReal*)font.FindGlyphNoFallback(c); if (glyphPtr is null) return false; diff --git a/Dalamud/Interface/ImGuiSeStringRenderer/Internal/SeStringRenderer.cs b/Dalamud/Interface/ImGuiSeStringRenderer/Internal/SeStringRenderer.cs index 9221c2dc5..7c18e59d1 100644 --- a/Dalamud/Interface/ImGuiSeStringRenderer/Internal/SeStringRenderer.cs +++ b/Dalamud/Interface/ImGuiSeStringRenderer/Internal/SeStringRenderer.cs @@ -15,7 +15,7 @@ using Dalamud.Utility; using FFXIVClientStructs.FFXIV.Client.System.String; using FFXIVClientStructs.FFXIV.Client.UI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Excel.Sheets; using Lumina.Text; @@ -58,7 +58,7 @@ internal unsafe class SeStringRenderer : IInternalDisposableService private readonly SeStringColorStackSet colorStackSet; /// Splits a draw list so that different layers of a single glyph can be drawn out of order. - private ImDrawListSplitter* splitter = ImGuiNative.ImDrawListSplitter_ImDrawListSplitter(); + private ImDrawListSplitter* splitter = ImGui.ImDrawListSplitter(); [ServiceManager.ServiceConstructor] private SeStringRenderer(DataManager dm, TargetSigScanner sigScanner) @@ -146,15 +146,25 @@ internal unsafe class SeStringRenderer : IInternalDisposableService size = Vector2.Max(size, fragment.Offset + new Vector2(fragment.VisibleWidth, state.LineHeight)); // If we're not drawing at all, stop further processing. - if (state.DrawList.NativePtr is null) + if (state.DrawList.Handle is null) return new() { Size = size }; state.SplitDrawList(); // Handle cases where ImGui.AlignTextToFramePadding has been called. - var pCurrentWindow = *(nint*)(ImGui.GetCurrentContext() + ImGuiContextCurrentWindowOffset); - var pWindowDc = pCurrentWindow + ImGuiWindowDcOffset; - var currLineTextBaseOffset = *(float*)(pWindowDc + ImGuiWindowTempDataCurrLineTextBaseOffset); + var context = ImGui.GetCurrentContext(); + var currLineTextBaseOffset = 0f; + /* + if (!context.IsNull) + { + var currentWindow = context.CurrentWindow; + if (!currentWindow.IsNull) + { + currLineTextBaseOffset = currentWindow.DC.CurrLineTextBaseOffset; + } + } + */ + var itemSize = size; if (currLineTextBaseOffset != 0f) { @@ -280,7 +290,7 @@ internal unsafe class SeStringRenderer : IInternalDisposableService { if (this.splitter is not null) { - ImGuiNative.ImDrawListSplitter_destroy(this.splitter); + this.splitter->Destroy(); this.splitter = null; } } @@ -295,7 +305,7 @@ internal unsafe class SeStringRenderer : IInternalDisposableService var link = -1; foreach (var (breakAt, mandatory) in new LineBreakEnumerator(state.Span, UtfEnumeratorFlags.Utf8SeString)) { - // Might have happened if custom entity was longer than the previous break unit. + // Might have happened if custom entity was longer than the previous break unit. if (prev > breakAt) continue; @@ -487,7 +497,7 @@ internal unsafe class SeStringRenderer : IInternalDisposableService if (gfdTextureSrv != 0) { state.Draw( - gfdTextureSrv, + new ImTextureID(gfdTextureSrv), offset + new Vector2(x, MathF.Round((state.LineHeight - size.Y) / 2)), size, useHq ? gfdEntry.HqUv0 : gfdEntry.Uv0, diff --git a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawParams.cs b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawParams.cs index e03f60a32..62842b1ba 100644 --- a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawParams.cs +++ b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawParams.cs @@ -1,6 +1,6 @@ using System.Numerics; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Text.Payloads; @@ -105,8 +105,8 @@ public record struct SeStringDrawParams /// Gets the effective font. internal readonly unsafe ImFont* EffectiveFont => - (this.Font ?? ImGui.GetFont()) is var f && f.NativePtr is not null - ? f.NativePtr + (this.Font ?? ImGui.GetFont()) is var f && f.Handle is not null + ? f.Handle : throw new ArgumentException("Specified font is empty."); /// Gets the effective line height in pixels. diff --git a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs index 5f95ac1b9..421837c4d 100644 --- a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs +++ b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs @@ -8,7 +8,7 @@ using Dalamud.Interface.Utility; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Text.Payloads; using Lumina.Text.ReadOnly; @@ -150,7 +150,7 @@ public unsafe ref struct SeStringDrawState /// Channel to switch to. [MethodImpl(MethodImplOptions.AggressiveInlining)] public readonly void SetCurrentChannel(SeStringDrawChannel channelIndex) => - ImGuiNative.ImDrawListSplitter_SetCurrentChannel(this.splitter, this.drawList, (int)channelIndex); + this.splitter->SetCurrentChannel(this.drawList, (int)channelIndex); /// Draws a single texture. /// ImGui texture ID to draw from. @@ -160,7 +160,7 @@ public unsafe ref struct SeStringDrawState /// Right bottom corner of the glyph w.r.t. its glyph origin in the source texture. /// Color of the glyph in RGBA. public readonly void Draw( - nint igTextureId, + ImTextureID igTextureId, Vector2 offset, Vector2 size, Vector2 uv0, @@ -193,7 +193,7 @@ public unsafe ref struct SeStringDrawState /// top and bottom pixels to apply faux italicization by and /// respectively. public readonly void Draw( - nint igTextureId, + ImTextureID igTextureId, Vector2 offset, Vector2 xy0, Vector2 xy1, @@ -305,7 +305,7 @@ public unsafe ref struct SeStringDrawState internal readonly ref ImGuiHelpers.ImFontGlyphReal FindGlyph(Rune rune) { var p = rune.Value is >= ushort.MinValue and < ushort.MaxValue - ? ImGuiNative.ImFont_FindGlyph(this.Font, (ushort)rune.Value) + ? this.Font->FindGlyph((ushort)rune.Value) : this.Font->FallbackGlyph; return ref *(ImGuiHelpers.ImFontGlyphReal*)p; } @@ -340,8 +340,7 @@ public unsafe ref struct SeStringDrawState return 0; return MathF.Round( - ImGuiNative.ImFont_GetDistanceAdjustmentForPair( - this.Font, + this.Font->GetDistanceAdjustmentForPair( (ushort)left.Value, (ushort)right.Value) * this.FontSizeScale); } @@ -398,9 +397,9 @@ public unsafe ref struct SeStringDrawState /// Splits the draw list. [MethodImpl(MethodImplOptions.AggressiveInlining)] internal readonly void SplitDrawList() => - ImGuiNative.ImDrawListSplitter_Split(this.splitter, this.drawList, ChannelCount); + this.splitter->Split(this.drawList, ChannelCount); /// Merges the draw list. [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal readonly void MergeDrawList() => ImGuiNative.ImDrawListSplitter_Merge(this.splitter, this.drawList); + internal readonly void MergeDrawList() => this.splitter->Merge(this.drawList); } diff --git a/Dalamud/Interface/Internal/DalamudCommands.cs b/Dalamud/Interface/Internal/DalamudCommands.cs index 636f71bfa..d32b842e1 100644 --- a/Dalamud/Interface/Internal/DalamudCommands.cs +++ b/Dalamud/Interface/Internal/DalamudCommands.cs @@ -140,12 +140,6 @@ internal class DalamudCommands : IServiceType "Open Dalamud's startup timing profiler."), }); - commandManager.AddHandler("/imdebug", new CommandInfo(this.OnDebugImInfoCommand) - { - HelpMessage = "ImGui DEBUG", - ShowInHelp = false, - }); - commandManager.AddHandler("/xlcopylog", new CommandInfo(this.OnCopyLogCommand) { HelpMessage = Loc.Localize( @@ -300,29 +294,6 @@ internal class DalamudCommands : IServiceType Service.Get().ToggleLogWindow(); } - private void OnDebugImInfoCommand(string command, string arguments) - { - var io = Service.Get().LastImGuiIoPtr; - var info = $"WantCaptureKeyboard: {io.WantCaptureKeyboard}\n"; - info += $"WantCaptureMouse: {io.WantCaptureMouse}\n"; - info += $"WantSetMousePos: {io.WantSetMousePos}\n"; - info += $"WantTextInput: {io.WantTextInput}\n"; - info += $"WantSaveIniSettings: {io.WantSaveIniSettings}\n"; - info += $"BackendFlags: {(int)io.BackendFlags}\n"; - info += $"DeltaTime: {io.DeltaTime}\n"; - info += $"DisplaySize: {io.DisplaySize.X} {io.DisplaySize.Y}\n"; - info += $"Framerate: {io.Framerate}\n"; - info += $"MetricsActiveWindows: {io.MetricsActiveWindows}\n"; - info += $"MetricsRenderWindows: {io.MetricsRenderWindows}\n"; - info += $"MousePos: {io.MousePos.X} {io.MousePos.Y}\n"; - info += $"MouseClicked: {io.MouseClicked}\n"; - info += $"MouseDown: {io.MouseDown}\n"; - info += $"NavActive: {io.NavActive}\n"; - info += $"NavVisible: {io.NavVisible}\n"; - - Log.Information(info); - } - private void OnVersionInfoCommand(string command, string arguments) { var chatGui = Service.Get(); diff --git a/Dalamud/Interface/Internal/DalamudIme.cs b/Dalamud/Interface/Internal/DalamudIme.cs index a1c4a0a95..1fe8988b5 100644 --- a/Dalamud/Interface/Internal/DalamudIme.cs +++ b/Dalamud/Interface/Internal/DalamudIme.cs @@ -19,7 +19,7 @@ using Dalamud.Interface.GameFonts; using Dalamud.Interface.ManagedFontAtlas.Internals; using Dalamud.Interface.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; #if IMEDEBUG using Serilog; @@ -136,7 +136,8 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService this.interfaceManager = imws.Manager; this.setPlatformImeDataDelegate = this.ImGuiSetPlatformImeData; - ImGui.GetIO().SetPlatformImeDataFn = Marshal.GetFunctionPointerForDelegate(this.setPlatformImeDataDelegate); + var io = ImGui.GetIO(); + io.SetPlatformImeDataFn = Marshal.GetFunctionPointerForDelegate(this.setPlatformImeDataDelegate).ToPointer(); this.interfaceManager.Draw += this.Draw; this.wndProcHookManager.PreWndProc += this.WndProcHookManagerOnPreWndProc; } @@ -278,7 +279,10 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService private void ReleaseUnmanagedResources() { if (ImGuiHelpers.IsImGuiInitialized) - ImGui.GetIO().SetPlatformImeDataFn = nint.Zero; + { + var io = ImGui.GetIO(); + io.SetPlatformImeDataFn = null; + } } private void WndProcHookManagerOnPreWndProc(WndProcEventArgs args) @@ -477,7 +481,7 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService if (!string.IsNullOrEmpty(ImmGetCompositionString(hImc, GCS.GCS_COMPSTR))) { ImmNotifyIME(hImc, NI.NI_COMPOSITIONSTR, CPS_COMPLETE, 0); - + // Disable further handling of mouse button down event, or something would lock up the cursor. args.SuppressWithValue(1); } @@ -670,7 +674,7 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService return; var viewport = ime.associatedViewport; - if (viewport.NativePtr is null) + if (viewport.Handle is null) return; var drawCand = ime.candidateStrings.Count != 0; diff --git a/Dalamud/Interface/Internal/DalamudInterface.cs b/Dalamud/Interface/Internal/DalamudInterface.cs index 5d21e954a..6fff5e851 100644 --- a/Dalamud/Interface/Internal/DalamudInterface.cs +++ b/Dalamud/Interface/Internal/DalamudInterface.cs @@ -40,9 +40,9 @@ using FFXIVClientStructs.FFXIV.Client.System.Framework; using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; +using Dalamud.Bindings.ImPlot; -using ImPlotNET; using PInvoke; using Serilog.Events; @@ -580,7 +580,10 @@ internal class DalamudInterface : IInternalDisposableService var io = ImGui.GetIO(); if (!io.WantCaptureMouse && (User32.GetKeyState((int)User32.VirtualKey.VK_LBUTTON) & 0x8000) != 0) { - ImGui.SetWindowFocus(null); + unsafe + { + ImGui.SetWindowFocus((byte*)null); + } } } catch (Exception ex) @@ -661,7 +664,7 @@ internal class DalamudInterface : IInternalDisposableService } } - private void DrawDevMenu() + private unsafe void DrawDevMenu() { if (this.isImGuiDrawDevMenu) { @@ -702,7 +705,7 @@ internal class DalamudInterface : IInternalDisposableService } var logSynchronously = this.configuration.LogSynchronously; - if (ImGui.MenuItem("Log Synchronously", null, ref logSynchronously)) + if (ImGui.MenuItem("Log Synchronously", (byte*)null, ref logSynchronously)) { this.configuration.LogSynchronously = logSynchronously; this.configuration.QueueSave(); @@ -715,7 +718,7 @@ internal class DalamudInterface : IInternalDisposableService } var antiDebug = Service.Get(); - if (ImGui.MenuItem("Disable Debugging Protections", null, antiDebug.IsEnabled)) + if (ImGui.MenuItem("Disable Debugging Protections", (byte*)null, antiDebug.IsEnabled)) { var newEnabled = !antiDebug.IsEnabled; if (newEnabled) @@ -854,7 +857,7 @@ internal class DalamudInterface : IInternalDisposableService ImGui.EndMenu(); } - if (ImGui.MenuItem("Report crashes at shutdown", null, this.configuration.ReportShutdownCrashes)) + if (ImGui.MenuItem("Report crashes at shutdown", (byte*)null, this.configuration.ReportShutdownCrashes)) { this.configuration.ReportShutdownCrashes = !this.configuration.ReportShutdownCrashes; this.configuration.QueueSave(); @@ -896,7 +899,7 @@ internal class DalamudInterface : IInternalDisposableService } var assertsEnabled = this.configuration.ImGuiAssertsEnabledAtStartup ?? false; - if (ImGui.MenuItem("Enable asserts at startup", null, assertsEnabled)) + if (ImGui.MenuItem("Enable asserts at startup", (byte*)null, assertsEnabled)) { this.configuration.ImGuiAssertsEnabledAtStartup = !assertsEnabled; this.configuration.QueueSave(); @@ -906,7 +909,7 @@ internal class DalamudInterface : IInternalDisposableService if (ImGui.MenuItem("Clear focus")) { - ImGui.SetWindowFocus(null); + ImGui.SetWindowFocus((byte*)null); } if (ImGui.MenuItem("Clear stacks")) @@ -947,7 +950,7 @@ internal class DalamudInterface : IInternalDisposableService Log.Information(info); } - if (ImGui.MenuItem("Show dev bar info", null, this.configuration.ShowDevBarInfo)) + if (ImGui.MenuItem("Show dev bar info", (byte*)null, this.configuration.ShowDevBarInfo)) { this.configuration.ShowDevBarInfo = !this.configuration.ShowDevBarInfo; } @@ -1018,12 +1021,12 @@ internal class DalamudInterface : IInternalDisposableService ImGui.Separator(); - if (ImGui.MenuItem("Load all API levels (ONLY FOR DEVELOPERS!!!)", null, pluginManager.LoadAllApiLevels)) + if (ImGui.MenuItem("Load all API levels", (byte*)null, pluginManager.LoadAllApiLevels)) { pluginManager.LoadAllApiLevels = !pluginManager.LoadAllApiLevels; } - if (ImGui.MenuItem("Load blacklisted plugins", null, pluginManager.LoadBannedPlugins)) + if (ImGui.MenuItem("Load blacklisted plugins", (byte*)null, pluginManager.LoadBannedPlugins)) { pluginManager.LoadBannedPlugins = !pluginManager.LoadBannedPlugins; } diff --git a/Dalamud/Interface/Internal/DesignSystem/DalamudComponents.Buttons.cs b/Dalamud/Interface/Internal/DesignSystem/DalamudComponents.Buttons.cs index d525af484..1eb18e428 100644 --- a/Dalamud/Interface/Internal/DesignSystem/DalamudComponents.Buttons.cs +++ b/Dalamud/Interface/Internal/DesignSystem/DalamudComponents.Buttons.cs @@ -4,7 +4,7 @@ using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.DesignSystem; @@ -45,7 +45,7 @@ internal static partial class DalamudComponents return Button(text); } } - + private static bool Button(string text) { using (ImRaii.PushStyle(ImGuiStyleVar.FramePadding, ButtonPadding)) diff --git a/Dalamud/Interface/Internal/DesignSystem/DalamudComponents.PluginPicker.cs b/Dalamud/Interface/Internal/DesignSystem/DalamudComponents.PluginPicker.cs index 3d31bbda6..0ff7b525c 100644 --- a/Dalamud/Interface/Internal/DesignSystem/DalamudComponents.PluginPicker.cs +++ b/Dalamud/Interface/Internal/DesignSystem/DalamudComponents.PluginPicker.cs @@ -9,7 +9,7 @@ using Dalamud.Plugin.Internal; using Dalamud.Plugin.Internal.Types; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.DesignSystem; diff --git a/Dalamud/Interface/Internal/ImGuiClipboardFunctionProvider.cs b/Dalamud/Interface/Internal/ImGuiClipboardFunctionProvider.cs index 9fa21a31b..651b8dcca 100644 --- a/Dalamud/Interface/Internal/ImGuiClipboardFunctionProvider.cs +++ b/Dalamud/Interface/Internal/ImGuiClipboardFunctionProvider.cs @@ -8,7 +8,7 @@ using Dalamud.Game.Gui.Toast; using Dalamud.Interface.Utility; using Dalamud.Logging.Internal; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using TerraFX.Interop.Windows; @@ -38,13 +38,13 @@ namespace Dalamud.Interface.Internal; internal sealed unsafe class ImGuiClipboardFunctionProvider : IInternalDisposableService { private static readonly ModuleLog Log = new(nameof(ImGuiClipboardFunctionProvider)); - private readonly nint clipboardUserDataOriginal; - private readonly nint setTextOriginal; - private readonly nint getTextOriginal; + private readonly void* clipboardUserDataOriginal; + private readonly void* setTextOriginal; + private readonly void* getTextOriginal; [ServiceManager.ServiceDependency] private readonly ToastGui toastGui = Service.Get(); - + private ImVectorWrapper clipboardData; private GCHandle clipboardUserData; @@ -58,9 +58,9 @@ internal sealed unsafe class ImGuiClipboardFunctionProvider : IInternalDisposabl this.clipboardUserDataOriginal = io.ClipboardUserData; this.setTextOriginal = io.SetClipboardTextFn; this.getTextOriginal = io.GetClipboardTextFn; - io.ClipboardUserData = GCHandle.ToIntPtr(this.clipboardUserData = GCHandle.Alloc(this)); - io.SetClipboardTextFn = (nint)(delegate* unmanaged)&StaticSetClipboardTextImpl; - io.GetClipboardTextFn = (nint)(delegate* unmanaged)&StaticGetClipboardTextImpl; + io.ClipboardUserData = GCHandle.ToIntPtr(this.clipboardUserData = GCHandle.Alloc(this)).ToPointer(); + io.SetClipboardTextFn = (delegate* unmanaged)&StaticSetClipboardTextImpl; + io.GetClipboardTextFn = (delegate* unmanaged)&StaticGetClipboardTextImpl; this.clipboardData = new(0); return; @@ -118,7 +118,7 @@ internal sealed unsafe class ImGuiClipboardFunctionProvider : IInternalDisposabl var hMem = GlobalAlloc(GMEM.GMEM_MOVEABLE, (nuint)((str.Length + 1) * 2)); if (hMem == 0) throw new OutOfMemoryException(); - + var ptr = (char*)GlobalLock(hMem); if (ptr == null) { @@ -150,7 +150,7 @@ internal sealed unsafe class ImGuiClipboardFunctionProvider : IInternalDisposabl private byte* GetClipboardTextImpl() { this.clipboardData.Clear(); - + var formats = stackalloc uint[] { CF.CF_UNICODETEXT, CF.CF_TEXT }; if (GetPriorityClipboardFormat(formats, 2) < 1 || !this.OpenClipboardOrShowError()) { diff --git a/Dalamud/Interface/Internal/InterfaceManager.cs b/Dalamud/Interface/Internal/InterfaceManager.cs index 5aeaf925f..140189c6a 100644 --- a/Dalamud/Interface/Internal/InterfaceManager.cs +++ b/Dalamud/Interface/Internal/InterfaceManager.cs @@ -37,7 +37,7 @@ using Dalamud.Utility.Timing; using FFXIVClientStructs.FFXIV.Client.Graphics.Environment; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using JetBrains.Annotations; @@ -826,7 +826,7 @@ internal partial class InterfaceManager : IInternalDisposableService () => { // Update the ImGui default font. - ImGui.GetIO().NativePtr->FontDefault = fontLocked.ImFont; + ImGui.GetIO().Handle->FontDefault = fontLocked.ImFont; // Update the reference to the resources of the default font. this.defaultFontResourceLock?.Dispose(); diff --git a/Dalamud/Interface/Internal/UiDebug.cs b/Dalamud/Interface/Internal/UiDebug.cs index 9dfff75ec..fa45c505e 100644 --- a/Dalamud/Interface/Internal/UiDebug.cs +++ b/Dalamud/Interface/Internal/UiDebug.cs @@ -10,7 +10,7 @@ using Dalamud.Utility; using FFXIVClientStructs.FFXIV.Client.System.String; using FFXIVClientStructs.FFXIV.Client.UI.Misc; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Text.ReadOnly; @@ -213,7 +213,7 @@ internal unsafe class UiDebug ImGui.SameLine(); Service.Get().Draw(textNode->NodeText); - ImGui.InputText($"Replace Text##{(ulong)textNode:X}", new IntPtr(textNode->NodeText.StringPtr), (uint)textNode->NodeText.BufSize); + ImGui.InputText($"Replace Text##{(ulong)textNode:X}", textNode->NodeText.StringPtr, (uint)textNode->NodeText.BufSize); ImGui.SameLine(); if (ImGui.Button($"Encode##{(ulong)textNode:X}")) @@ -301,7 +301,7 @@ internal unsafe class UiDebug if (ImGui.TreeNode($"Texture##{(ulong)kernelTexture->D3D11ShaderResourceView:X}")) { ImGui.Image( - new IntPtr(kernelTexture->D3D11ShaderResourceView), + new ImTextureID(kernelTexture->D3D11ShaderResourceView), new Vector2(kernelTexture->ActualWidth, kernelTexture->ActualHeight)); ImGui.TreePop(); } @@ -312,7 +312,7 @@ internal unsafe class UiDebug $"Texture##{(ulong)textureInfo->AtkTexture.KernelTexture->D3D11ShaderResourceView:X}")) { ImGui.Image( - new IntPtr(textureInfo->AtkTexture.KernelTexture->D3D11ShaderResourceView), + new ImTextureID(textureInfo->AtkTexture.KernelTexture->D3D11ShaderResourceView), new Vector2( textureInfo->AtkTexture.KernelTexture->ActualWidth, textureInfo->AtkTexture.KernelTexture->ActualHeight)); diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.AtkValues.cs b/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.AtkValues.cs index c3f6133dd..d19633227 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.AtkValues.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.AtkValues.cs @@ -5,7 +5,7 @@ using Dalamud.Utility; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.ValueType; diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.cs b/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.cs index 9d6575a55..2d753611d 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.cs @@ -5,7 +5,7 @@ using System.Numerics; using Dalamud.Interface.Components; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using static Dalamud.Interface.FontAwesomeIcon; using static Dalamud.Interface.Internal.UiDebug2.ElementSelector; diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/Events.cs b/Dalamud/Interface/Internal/UiDebug2/Browsing/Events.cs index c98cc933f..0dd7a9a57 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/Events.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Browsing/Events.cs @@ -4,10 +4,10 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; -using static ImGuiNET.ImGuiTableColumnFlags; -using static ImGuiNET.ImGuiTableFlags; +using static Dalamud.Bindings.ImGui.ImGuiTableColumnFlags; +using static Dalamud.Bindings.ImGui.ImGuiTableFlags; namespace Dalamud.Interface.Internal.UiDebug2.Browsing; diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Component.cs b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Component.cs index 4a1989441..003071baa 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Component.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Component.cs @@ -1,7 +1,7 @@ using System.Runtime.InteropServices; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; using static Dalamud.Utility.Util; diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Editor.cs b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Editor.cs index 1f5abd0bf..188045de7 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Editor.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Editor.cs @@ -6,16 +6,16 @@ using Dalamud.Interface.Internal.UiDebug2.Utility; using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using static Dalamud.Interface.ColorHelpers; using static Dalamud.Interface.FontAwesomeIcon; using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; using static Dalamud.Interface.Utility.ImGuiHelpers; -using static ImGuiNET.ImGuiColorEditFlags; -using static ImGuiNET.ImGuiInputTextFlags; -using static ImGuiNET.ImGuiTableColumnFlags; -using static ImGuiNET.ImGuiTableFlags; +using static Dalamud.Bindings.ImGui.ImGuiColorEditFlags; +using static Dalamud.Bindings.ImGui.ImGuiInputTextFlags; +using static Dalamud.Bindings.ImGui.ImGuiTableColumnFlags; +using static Dalamud.Bindings.ImGui.ImGuiTableFlags; namespace Dalamud.Interface.Internal.UiDebug2.Browsing; @@ -266,7 +266,7 @@ internal unsafe partial class NineGridNodeTree ImGui.Text("Ninegrid Offsets:"); ImGui.TableNextColumn(); ImGui.SetNextItemWidth(150); - if (ImGui.DragFloat2($"##{(nint)this.Node:X}ngOffsetLR", ref lr, 1, 0)) + if (ImGui.DragFloat2($"##{(nint)this.Node:X}ngOffsetLR", ref lr, 1f, 0f)) { this.NgNode->LeftOffset = (short)Math.Max(0, lr.X); this.NgNode->RightOffset = (short)Math.Max(0, lr.Y); @@ -278,7 +278,7 @@ internal unsafe partial class NineGridNodeTree ImGui.TableNextColumn(); ImGui.TableNextColumn(); ImGui.SetNextItemWidth(150); - if (ImGui.DragFloat2($"##{(nint)this.Node:X}ngOffsetTB", ref tb, 1, 0)) + if (ImGui.DragFloat2($"##{(nint)this.Node:X}ngOffsetTB", ref tb, 1f, 0f)) { this.NgNode->TopOffset = (short)Math.Max(0, tb.X); this.NgNode->BottomOffset = (short)Math.Max(0, tb.Y); diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Image.cs b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Image.cs index 8d93b3e76..77768a6f5 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Image.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Image.cs @@ -5,15 +5,15 @@ using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Client.Graphics.Kernel; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using static Dalamud.Interface.ColorHelpers; using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; using static Dalamud.Utility.Util; using static FFXIVClientStructs.FFXIV.Component.GUI.TextureType; -using static ImGuiNET.ImGuiTableColumnFlags; -using static ImGuiNET.ImGuiTableFlags; -using static ImGuiNET.ImGuiTreeNodeFlags; +using static Dalamud.Bindings.ImGui.ImGuiTableColumnFlags; +using static Dalamud.Bindings.ImGui.ImGuiTableFlags; +using static Dalamud.Bindings.ImGui.ImGuiTreeNodeFlags; namespace Dalamud.Interface.Internal.UiDebug2.Browsing; diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.NineGrid.cs b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.NineGrid.cs index 48825becb..cca1c08a6 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.NineGrid.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.NineGrid.cs @@ -1,7 +1,7 @@ using Dalamud.Interface.Internal.UiDebug2.Utility; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using static Dalamud.Interface.ColorHelpers; using static Dalamud.Utility.Util; diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Res.cs b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Res.cs index 6c12d3b4c..cfd06d726 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Res.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Res.cs @@ -2,13 +2,14 @@ using System.Linq; using System.Numerics; using System.Runtime.InteropServices; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Components; using Dalamud.Interface.Internal.UiDebug2.Utility; using Dalamud.Interface.Utility.Raii; - using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using static Dalamud.Bindings.ImGui.ImGuiCol; +using static Dalamud.Bindings.ImGui.ImGuiTreeNodeFlags; using static Dalamud.Interface.ColorHelpers; using static Dalamud.Interface.FontAwesomeIcon; using static Dalamud.Interface.Internal.UiDebug2.Browsing.Events; @@ -18,9 +19,6 @@ using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; using static Dalamud.Utility.Util; using static FFXIVClientStructs.FFXIV.Component.GUI.NodeFlags; -using static ImGuiNET.ImGuiCol; -using static ImGuiNET.ImGuiTreeNodeFlags; - namespace Dalamud.Interface.Internal.UiDebug2.Browsing; /// diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Text.cs b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Text.cs index 02bd5feca..36bc78eed 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Text.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Text.cs @@ -9,7 +9,7 @@ using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Client.System.String; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using static Dalamud.Interface.ColorHelpers; using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.KeyGroupColumn.cs b/Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.KeyGroupColumn.cs index 2ba416b4f..ab256baaa 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.KeyGroupColumn.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.KeyGroupColumn.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.UiDebug2.Browsing; diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.cs b/Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.cs index 57e5eff99..196b7571e 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.cs @@ -7,15 +7,15 @@ using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Client.Graphics; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using static Dalamud.Interface.ColorHelpers; using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; using static Dalamud.Utility.Util; using static FFXIVClientStructs.FFXIV.Component.GUI.NodeType; -using static ImGuiNET.ImGuiTableColumnFlags; -using static ImGuiNET.ImGuiTableFlags; -using static ImGuiNET.ImGuiTreeNodeFlags; +using static Dalamud.Bindings.ImGui.ImGuiTableColumnFlags; +using static Dalamud.Bindings.ImGui.ImGuiTableFlags; +using static Dalamud.Bindings.ImGui.ImGuiTreeNodeFlags; // ReSharper disable SuggestBaseTypeForParameter namespace Dalamud.Interface.Internal.UiDebug2.Browsing; diff --git a/Dalamud/Interface/Internal/UiDebug2/ElementSelector.cs b/Dalamud/Interface/Internal/UiDebug2/ElementSelector.cs index 65537e210..ac03ffe8e 100644 --- a/Dalamud/Interface/Internal/UiDebug2/ElementSelector.cs +++ b/Dalamud/Interface/Internal/UiDebug2/ElementSelector.cs @@ -9,7 +9,7 @@ using Dalamud.Interface.Internal.UiDebug2.Utility; using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using static System.Globalization.NumberFormatInfo; @@ -18,8 +18,8 @@ using static Dalamud.Interface.Internal.UiDebug2.UiDebug2; using static Dalamud.Interface.UiBuilder; using static Dalamud.Interface.Utility.ImGuiHelpers; using static FFXIVClientStructs.FFXIV.Component.GUI.NodeFlags; -using static ImGuiNET.ImGuiCol; -using static ImGuiNET.ImGuiWindowFlags; +using static Dalamud.Bindings.ImGui.ImGuiCol; +using static Dalamud.Bindings.ImGui.ImGuiWindowFlags; // ReSharper disable StructLacksIEquatable.Global #pragma warning disable CS0659 diff --git a/Dalamud/Interface/Internal/UiDebug2/Popout.Addon.cs b/Dalamud/Interface/Internal/UiDebug2/Popout.Addon.cs index 76112945e..31fb26f7c 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Popout.Addon.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Popout.Addon.cs @@ -3,7 +3,7 @@ using System.Numerics; using Dalamud.Interface.Internal.UiDebug2.Browsing; using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Windowing; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.UiDebug2; diff --git a/Dalamud/Interface/Internal/UiDebug2/Popout.Node.cs b/Dalamud/Interface/Internal/UiDebug2/Popout.Node.cs index fe8bc87ea..57217ea1f 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Popout.Node.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Popout.Node.cs @@ -4,7 +4,7 @@ using Dalamud.Interface.Internal.UiDebug2.Browsing; using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Windowing; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using static Dalamud.Interface.Internal.UiDebug2.UiDebug2; diff --git a/Dalamud/Interface/Internal/UiDebug2/UiDebug2.Sidebar.cs b/Dalamud/Interface/Internal/UiDebug2/UiDebug2.Sidebar.cs index 50967453d..f7a392bb4 100644 --- a/Dalamud/Interface/Internal/UiDebug2/UiDebug2.Sidebar.cs +++ b/Dalamud/Interface/Internal/UiDebug2/UiDebug2.Sidebar.cs @@ -6,7 +6,7 @@ using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using static System.StringComparison; using static Dalamud.Interface.FontAwesomeIcon; diff --git a/Dalamud/Interface/Internal/UiDebug2/UiDebug2.cs b/Dalamud/Interface/Internal/UiDebug2/UiDebug2.cs index 74727f2a5..cd92a7f59 100644 --- a/Dalamud/Interface/Internal/UiDebug2/UiDebug2.cs +++ b/Dalamud/Interface/Internal/UiDebug2/UiDebug2.cs @@ -9,9 +9,9 @@ using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; -using static ImGuiNET.ImGuiWindowFlags; +using static Dalamud.Bindings.ImGui.ImGuiWindowFlags; namespace Dalamud.Interface.Internal.UiDebug2; diff --git a/Dalamud/Interface/Internal/UiDebug2/Utility/Gui.cs b/Dalamud/Interface/Internal/UiDebug2/Utility/Gui.cs index cc4f1b698..7987d9a40 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Utility/Gui.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Utility/Gui.cs @@ -4,10 +4,10 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Client.Graphics; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using static Dalamud.Interface.ColorHelpers; -using static ImGuiNET.ImGuiCol; +using static Dalamud.Bindings.ImGui.ImGuiCol; namespace Dalamud.Interface.Internal.UiDebug2.Utility; diff --git a/Dalamud/Interface/Internal/UiDebug2/Utility/NodeBounds.cs b/Dalamud/Interface/Internal/UiDebug2/Utility/NodeBounds.cs index 3d28cb836..55dabf539 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Utility/NodeBounds.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Utility/NodeBounds.cs @@ -4,7 +4,7 @@ using System.Numerics; using Dalamud.Interface.Utility; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using static System.MathF; using static Dalamud.Interface.ColorHelpers; diff --git a/Dalamud/Interface/Internal/Windows/BranchSwitcherWindow.cs b/Dalamud/Interface/Internal/Windows/BranchSwitcherWindow.cs index 055cb9f49..a8dd6bd37 100644 --- a/Dalamud/Interface/Internal/Windows/BranchSwitcherWindow.cs +++ b/Dalamud/Interface/Internal/Windows/BranchSwitcherWindow.cs @@ -11,7 +11,7 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Windowing; using Dalamud.Networking.Http; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; namespace Dalamud.Interface.Internal.Windows; diff --git a/Dalamud/Interface/Internal/Windows/ChangelogWindow.cs b/Dalamud/Interface/Internal/Windows/ChangelogWindow.cs index d42dc3669..9e5f37884 100644 --- a/Dalamud/Interface/Internal/Windows/ChangelogWindow.cs +++ b/Dalamud/Interface/Internal/Windows/ChangelogWindow.cs @@ -25,7 +25,7 @@ using Dalamud.Utility; using FFXIVClientStructs.FFXIV.Client.UI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows; @@ -35,7 +35,7 @@ namespace Dalamud.Interface.Internal.Windows; internal sealed class ChangelogWindow : Window, IDisposable { private const string WarrantsChangelogForMajorMinor = "10.0."; - + private const string ChangeLog = @"• Updated Dalamud for compatibility with Patch 7.0 • Made a lot of behind-the-scenes changes to make Dalamud and plugins more stable and reliable @@ -43,7 +43,7 @@ internal sealed class ChangelogWindow : Window, IDisposable • Refreshed the Dalamud/plugin installer UI "; - private static readonly TimeSpan TitleScreenWaitTime = TimeSpan.FromSeconds(0.5f); + private static readonly TimeSpan TitleScreenWaitTime = TimeSpan.FromSeconds(0.5f); private readonly TitleScreenMenuWindow tsmWindow; @@ -54,40 +54,40 @@ internal sealed class ChangelogWindow : Window, IDisposable private readonly Lazy bannerFont; private readonly Lazy apiBumpExplainerTexture; private readonly Lazy logoTexture; - + private readonly InOutCubic windowFade = new(TimeSpan.FromSeconds(2.5f)) { Point1 = Vector2.Zero, Point2 = new Vector2(2f), }; - + private readonly InOutCubic bodyFade = new(TimeSpan.FromSeconds(0.8f)) { Point1 = Vector2.Zero, Point2 = Vector2.One, }; - + private readonly InOutCubic titleFade = new(TimeSpan.FromSeconds(0.5f)) { Point1 = Vector2.Zero, Point2 = Vector2.One, }; - + private readonly InOutCubic fadeOut = new(TimeSpan.FromSeconds(0.5f)) { Point1 = Vector2.One, Point2 = Vector2.Zero, }; - + private State state = State.WindowFadeIn; - + private bool needFadeRestart = false; - + private bool isFadingOutForStateChange = false; private State? stateAfterFadeOut; - + private AutoUpdateBehavior? chosenAutoUpdateBehavior; - + private Dictionary currentFtueLevels = new(); private DateTime? isEligibleSince; @@ -110,7 +110,7 @@ internal sealed class ChangelogWindow : Window, IDisposable : base("What's new in Dalamud?##ChangelogWindow", ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse, true) { this.gameGui = gameGui; - + this.tsmWindow = tsmWindow; this.Namespace = "DalamudChangelogWindow"; this.privateAtlas = this.scopedFinalizer.Add( @@ -125,7 +125,7 @@ internal sealed class ChangelogWindow : Window, IDisposable // If we are going to show a changelog, make sure we have the font ready, otherwise it will hitch if (WarrantsChangelog()) _ = this.bannerFont.Value; - + framework.Update += this.FrameworkOnUpdate; this.scopedFinalizer.Add(() => framework.Update -= this.FrameworkOnUpdate); } @@ -138,7 +138,7 @@ internal sealed class ChangelogWindow : Window, IDisposable AskAutoUpdate, Links, } - + /// /// Check if a changelog should be shown. /// @@ -163,7 +163,7 @@ internal sealed class ChangelogWindow : Window, IDisposable this.isFadingOutForStateChange = false; this.stateAfterFadeOut = null; - + this.state = State.WindowFadeIn; this.windowFade.Reset(); this.bodyFade.Reset(); @@ -172,9 +172,9 @@ internal sealed class ChangelogWindow : Window, IDisposable this.needFadeRestart = true; this.chosenAutoUpdateBehavior = null; - + this.currentFtueLevels = Service.Get().SeenFtueLevels; - + base.OnOpen(); } @@ -182,17 +182,17 @@ internal sealed class ChangelogWindow : Window, IDisposable public override void OnClose() { base.OnClose(); - + this.tsmWindow.AllowDrawing = true; Service.Get().SetCreditsDarkeningAnimation(false); var configuration = Service.Get(); - + if (this.chosenAutoUpdateBehavior.HasValue) { configuration.AutoUpdateBehavior = this.chosenAutoUpdateBehavior.Value; } - + configuration.SeenFtueLevels = this.currentFtueLevels; configuration.QueueSave(); } @@ -203,7 +203,7 @@ internal sealed class ChangelogWindow : Window, IDisposable ImGui.PushStyleVar(ImGuiStyleVar.WindowBorderSize, 0); ImGui.PushStyleVar(ImGuiStyleVar.WindowPadding, Vector2.Zero); ImGui.PushStyleVar(ImGuiStyleVar.WindowRounding, 10f); - + base.PreDraw(); if (this.needFadeRestart) @@ -212,15 +212,15 @@ internal sealed class ChangelogWindow : Window, IDisposable this.titleFade.Restart(); this.needFadeRestart = false; } - + this.windowFade.Update(); this.titleFade.Update(); this.fadeOut.Update(); ImGui.SetNextWindowBgAlpha(Math.Clamp(this.windowFade.EasedPoint.X, 0, 0.9f)); - + this.Size = new Vector2(900, 400); this.SizeCondition = ImGuiCond.Always; - + // Center the window on the main viewport var viewportPos = ImGuiHelpers.MainViewport.Pos; var viewportSize = ImGuiHelpers.MainViewport.Size; @@ -233,9 +233,9 @@ internal sealed class ChangelogWindow : Window, IDisposable public override void PostDraw() { ImGui.PopStyleVar(3); - + this.ResetMovieTimer(); - + base.PostDraw(); } @@ -248,13 +248,13 @@ internal sealed class ChangelogWindow : Window, IDisposable configuration.LastChangelogMajorMinor = WarrantsChangelogForMajorMinor; configuration.QueueSave(); } - + var windowSize = ImGui.GetWindowSize(); - + var dummySize = 10 * ImGuiHelpers.GlobalScale; ImGui.Dummy(new Vector2(dummySize)); ImGui.SameLine(); - + var logoContainerSize = new Vector2(windowSize.X * 0.2f - dummySize, windowSize.Y); using (var child = ImRaii.Child("###logoContainer", logoContainerSize, false)) { @@ -262,23 +262,23 @@ internal sealed class ChangelogWindow : Window, IDisposable return; var logoSize = new Vector2(logoContainerSize.X); - + // Center the logo in the container ImGui.SetCursorPos(new Vector2(logoContainerSize.X / 2 - logoSize.X / 2, logoContainerSize.Y / 2 - logoSize.Y / 2)); - + using (ImRaii.PushStyle(ImGuiStyleVar.Alpha, Math.Clamp(this.windowFade.EasedPoint.X - 0.5f, 0f, 1f))) ImGui.Image(this.logoTexture.Value.ImGuiHandle, logoSize); } - + ImGui.SameLine(); ImGui.Dummy(new Vector2(dummySize)); ImGui.SameLine(); - + using (var child = ImRaii.Child("###textContainer", new Vector2((windowSize.X * 0.8f) - dummySize * 4, windowSize.Y), false)) { if (!child) return; - + ImGuiHelpers.ScaledDummy(20); var titleFadeVal = this.isFadingOutForStateChange ? this.fadeOut.EasedPoint.X : this.titleFade.EasedPoint.X; @@ -292,21 +292,21 @@ internal sealed class ChangelogWindow : Window, IDisposable case State.ExplainerIntro: ImGuiHelpers.CenteredText("New And Improved"); break; - + case State.ExplainerApiBump: ImGuiHelpers.CenteredText("Plugin Updates"); break; - + case State.AskAutoUpdate: ImGuiHelpers.CenteredText("Auto-Updates"); break; - + case State.Links: ImGuiHelpers.CenteredText("Enjoy!"); break; } } - + ImGuiHelpers.ScaledDummy(8); if (this.state == State.WindowFadeIn && this.windowFade.EasedPoint.X > 1.5f) @@ -321,11 +321,11 @@ internal sealed class ChangelogWindow : Window, IDisposable this.bodyFade.Restart(); this.titleFade.Restart(); - + this.isFadingOutForStateChange = false; this.stateAfterFadeOut = null; } - + this.bodyFade.Update(); var bodyFadeVal = this.isFadingOutForStateChange ? this.fadeOut.EasedPoint.X : this.bodyFade.EasedPoint.X; using (ImRaii.PushStyle(ImGuiStyleVar.Alpha, Math.Clamp(bodyFadeVal, 0, 1f))) @@ -334,10 +334,10 @@ internal sealed class ChangelogWindow : Window, IDisposable { this.isFadingOutForStateChange = true; this.stateAfterFadeOut = nextState; - + this.fadeOut.Restart(); } - + bool DrawNextButton(State nextState) { // Draw big, centered next button at the bottom of the window @@ -346,7 +346,7 @@ internal sealed class ChangelogWindow : Window, IDisposable var buttonWidth = ImGui.CalcTextSize(buttonText).X + 40 * ImGuiHelpers.GlobalScale; ImGui.SetCursorPosY(windowSize.Y - buttonHeight - (20 * ImGuiHelpers.GlobalScale)); ImGuiHelpers.CenterCursorFor((int)buttonWidth); - + if (ImGui.Button(buttonText, new Vector2(buttonWidth, buttonHeight)) && !this.isFadingOutForStateChange) { GoToNextState(nextState); @@ -355,7 +355,7 @@ internal sealed class ChangelogWindow : Window, IDisposable return false; } - + switch (this.state) { case State.WindowFadeIn: @@ -366,10 +366,10 @@ internal sealed class ChangelogWindow : Window, IDisposable ImGuiHelpers.ScaledDummy(5); ImGui.TextWrapped("This changelog is a quick overview of the most important changes in this version."); ImGui.TextWrapped("Please click next to see a quick guide to updating your plugins."); - + DrawNextButton(State.ExplainerApiBump); break; - + case State.ExplainerApiBump: ImGui.TextWrapped("Take care! Due to changes in this patch, all of your plugins need to be updated and were disabled automatically."); ImGui.TextWrapped("This is normal and required for major game updates."); @@ -378,14 +378,14 @@ internal sealed class ChangelogWindow : Window, IDisposable ImGuiHelpers.ScaledDummy(5); ImGui.TextWrapped("Please keep in mind that not all of your plugins may already be updated for the new version."); ImGui.TextWrapped("If some plugins are displayed with a red cross in the 'Installed Plugins' tab, they may not yet be available."); - + ImGuiHelpers.ScaledDummy(15); ImGuiHelpers.CenterCursorFor(this.apiBumpExplainerTexture.Value.Width); ImGui.Image( this.apiBumpExplainerTexture.Value.ImGuiHandle, this.apiBumpExplainerTexture.Value.Size); - + if (!this.currentFtueLevels.TryGetValue(FtueLevels.AutoUpdate.Name, out var autoUpdateLevel) || autoUpdateLevel < FtueLevels.AutoUpdate.AutoUpdateInitial) { if (DrawNextButton(State.AskAutoUpdate)) @@ -397,23 +397,23 @@ internal sealed class ChangelogWindow : Window, IDisposable { DrawNextButton(State.Links); } - + break; - + case State.AskAutoUpdate: ImGuiHelpers.SafeTextColoredWrapped(ImGuiColors.DalamudWhite, Loc.Localize("DalamudSettingsAutoUpdateHint", "Dalamud can update your plugins automatically, making sure that you always " + "have the newest features and bug fixes. You can choose when and how auto-updates are run here.")); ImGuiHelpers.ScaledDummy(2); - + ImGuiHelpers.SafeTextColoredWrapped(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingsAutoUpdateDisclaimer1", "You can always update your plugins manually by clicking the update button in the plugin list. " + "You can also opt into updates for specific plugins by right-clicking them and selecting \"Always auto-update\".")); ImGuiHelpers.SafeTextColoredWrapped(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingsAutoUpdateDisclaimer2", "Dalamud will only notify you about updates while you are idle.")); - + ImGuiHelpers.ScaledDummy(15); - + bool DrawCenteredButton(string text, float height) { var buttonHeight = height * ImGuiHelpers.GlobalScale; @@ -427,97 +427,97 @@ internal sealed class ChangelogWindow : Window, IDisposable using (ImRaii.PushColor(ImGuiCol.Button, ImGuiColors.DPSRed)) { if (DrawCenteredButton("Enable auto-updates", 30)) - { + { this.chosenAutoUpdateBehavior = AutoUpdateBehavior.UpdateMainRepo; GoToNextState(State.Links); } } - + ImGuiHelpers.ScaledDummy(2); - + using (ImRaii.PushStyle(ImGuiStyleVar.FrameBorderSize, 1)) using (var buttonColor = ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero)) { buttonColor.Push(ImGuiCol.Border, ImGuiColors.DalamudGrey3); if (DrawCenteredButton("Disable auto-updates", 25)) - { + { this.chosenAutoUpdateBehavior = AutoUpdateBehavior.OnlyNotify; GoToNextState(State.Links); } } - + break; - + case State.Links: ImGui.TextWrapped("If you note any issues or need help, please check the FAQ, and reach out on our Discord if you need help."); ImGui.TextWrapped("Enjoy your time with the game and Dalamud!"); - + ImGuiHelpers.ScaledDummy(45); - + bool CenteredIconButton(FontAwesomeIcon icon, string text) { var buttonWidth = ImGuiComponents.GetIconButtonWithTextWidth(icon, text); ImGuiHelpers.CenterCursorFor((int)buttonWidth); return ImGuiComponents.IconButtonWithText(icon, text); } - + if (CenteredIconButton(FontAwesomeIcon.Download, "Open Plugin Installer")) { Service.Get().OpenPluginInstaller(); this.IsOpen = false; Dismiss(); } - + ImGuiHelpers.ScaledDummy(5); - + ImGuiHelpers.CenterCursorFor( (int)(ImGuiComponents.GetIconButtonWithTextWidth(FontAwesomeIcon.Globe, "See the FAQ") + ImGuiComponents.GetIconButtonWithTextWidth(FontAwesomeIcon.LaughBeam, "Join our Discord server") + - (5 * ImGuiHelpers.GlobalScale) + + (5 * ImGuiHelpers.GlobalScale) + (ImGui.GetStyle().ItemSpacing.X * 4))); if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Globe, "See the FAQ")) { Util.OpenLink("https://goatcorp.github.io/faq/"); } - + ImGui.SameLine(); ImGuiHelpers.ScaledDummy(5); ImGui.SameLine(); - + if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.LaughBeam, "Join our Discord server")) { Util.OpenLink("https://discord.gg/3NMcUV5"); } - + ImGuiHelpers.ScaledDummy(5); - + if (CenteredIconButton(FontAwesomeIcon.Heart, "Support what we care about")) { Util.OpenLink("https://goatcorp.github.io/faq/support"); } - + var buttonHeight = 30 * ImGuiHelpers.GlobalScale; var buttonText = "Close"; var buttonWidth = ImGui.CalcTextSize(buttonText).X + 40 * ImGuiHelpers.GlobalScale; ImGui.SetCursorPosY(windowSize.Y - buttonHeight - (20 * ImGuiHelpers.GlobalScale)); ImGuiHelpers.CenterCursorFor((int)buttonWidth); - + if (ImGui.Button(buttonText, new Vector2(buttonWidth, buttonHeight))) { this.IsOpen = false; Dismiss(); } - + break; } } - + // Draw close button in the top right corner ImGui.PushStyleVar(ImGuiStyleVar.FrameRounding, 100f); var btnAlpha = Math.Clamp(this.windowFade.EasedPoint.X - 0.5f, 0f, 1f); ImGui.PushStyleColor(ImGuiCol.Button, ImGuiColors.DPSRed.WithAlpha(btnAlpha).Desaturate(0.3f)); ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudWhite.WithAlpha(btnAlpha)); - + var childSize = ImGui.GetWindowSize(); var closeButtonSize = 15 * ImGuiHelpers.GlobalScale; ImGui.SetCursorPos(new Vector2(childSize.X - closeButtonSize - (10 * ImGuiHelpers.GlobalScale), 10 * ImGuiHelpers.GlobalScale)); @@ -544,7 +544,7 @@ internal sealed class ChangelogWindow : Window, IDisposable { this.scopedFinalizer.Dispose(); } - + private void FrameworkOnUpdate(IFramework unused) { if (!WarrantsChangelog()) @@ -555,7 +555,7 @@ internal sealed class ChangelogWindow : Window, IDisposable if (this.openedThroughEligibility) return; - + var isEligible = this.gameGui.GetAddonByName("_TitleMenu", 1) != IntPtr.Zero; var charaSelect = this.gameGui.GetAddonByName("CharaSelect", 1); @@ -572,14 +572,14 @@ internal sealed class ChangelogWindow : Window, IDisposable { this.isEligibleSince = null; } - + if (this.isEligibleSince != null && DateTime.Now - this.isEligibleSince > TitleScreenWaitTime) { this.IsOpen = true; this.openedThroughEligibility = true; } } - + private unsafe void ResetMovieTimer() { var uiModule = UIModule.Instance(); diff --git a/Dalamud/Interface/Internal/Windows/ColorDemoWindow.cs b/Dalamud/Interface/Internal/Windows/ColorDemoWindow.cs index 3d2b585ac..93e62d15d 100644 --- a/Dalamud/Interface/Internal/Windows/ColorDemoWindow.cs +++ b/Dalamud/Interface/Internal/Windows/ColorDemoWindow.cs @@ -5,7 +5,7 @@ using System.Reflection; using Dalamud.Interface.Colors; using Dalamud.Interface.Windowing; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows; diff --git a/Dalamud/Interface/Internal/Windows/ComponentDemoWindow.cs b/Dalamud/Interface/Internal/Windows/ComponentDemoWindow.cs index c0d2e4c61..1d9cb863a 100644 --- a/Dalamud/Interface/Internal/Windows/ComponentDemoWindow.cs +++ b/Dalamud/Interface/Internal/Windows/ComponentDemoWindow.cs @@ -7,7 +7,7 @@ using Dalamud.Interface.Colors; using Dalamud.Interface.Components; using Dalamud.Interface.Utility; using Dalamud.Interface.Windowing; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows; diff --git a/Dalamud/Interface/Internal/Windows/ConsoleWindow.cs b/Dalamud/Interface/Internal/Windows/ConsoleWindow.cs index f7ce5d145..1baa6f7fc 100644 --- a/Dalamud/Interface/Internal/Windows/ConsoleWindow.cs +++ b/Dalamud/Interface/Internal/Windows/ConsoleWindow.cs @@ -22,7 +22,7 @@ using Dalamud.Plugin.Internal; using Dalamud.Plugin.Services; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; using Serilog.Events; @@ -41,9 +41,9 @@ internal class ConsoleWindow : Window, IDisposable // Fields below should be touched only from the main thread. private readonly RollingList logText; private readonly RollingList filteredLogEntries; - + private readonly List pluginFilters = new(); - + private readonly DalamudConfiguration configuration; private int newRolledLines; @@ -87,14 +87,14 @@ internal class ConsoleWindow : Window, IDisposable : base("Dalamud Console", ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse) { this.configuration = configuration; - + this.autoScroll = configuration.LogAutoScroll; this.autoOpen = configuration.LogOpenAtStartup; Service.GetAsync().ContinueWith(r => r.Result.Update += this.FrameworkOnUpdate); - + var cm = Service.Get(); - cm.AddCommand("clear", "Clear the console log", () => + cm.AddCommand("clear", "Clear the console log", () => { this.QueueClear(); return true; @@ -116,7 +116,7 @@ internal class ConsoleWindow : Window, IDisposable unsafe { - this.clipperPtr = new(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); + this.clipperPtr = new(ImGui.ImGuiListClipper()); } } @@ -578,7 +578,7 @@ internal class ConsoleWindow : Window, IDisposable inputWidth = ImGui.GetWindowWidth() - (ImGui.GetStyle().WindowPadding.X * 2); if (!breakInputLines) - inputWidth = (inputWidth - ImGui.GetStyle().ItemSpacing.X) / 2; + inputWidth = (inputWidth - ImGui.GetStyle().ItemSpacing.X) / 2; } else { @@ -799,15 +799,15 @@ internal class ConsoleWindow : Window, IDisposable { if (string.IsNullOrEmpty(this.commandText)) return; - + this.historyPos = -1; - + if (this.commandText != this.configuration.LogCommandHistory.LastOrDefault()) this.configuration.LogCommandHistory.Add(this.commandText); - + if (this.configuration.LogCommandHistory.Count > HistorySize) this.configuration.LogCommandHistory.RemoveAt(0); - + this.configuration.QueueSave(); this.lastCmdSuccess = Service.Get().ProcessCommand(this.commandText); @@ -832,7 +832,7 @@ internal class ConsoleWindow : Window, IDisposable this.completionZipText = null; this.completionTabIdx = 0; break; - + case ImGuiInputTextFlags.CallbackCompletion: var textBytes = new byte[data->BufTextLen]; Marshal.Copy((IntPtr)data->Buf, textBytes, 0, data->BufTextLen); @@ -843,11 +843,11 @@ internal class ConsoleWindow : Window, IDisposable // We can't do any completion for parameters at the moment since it just calls into CommandHandler if (words.Length > 1) return 0; - + var wordToComplete = words[0]; if (wordToComplete.IsNullOrWhitespace()) return 0; - + if (this.completionZipText is not null) wordToComplete = this.completionZipText; @@ -878,7 +878,7 @@ internal class ConsoleWindow : Window, IDisposable toComplete = candidates.ElementAt(this.completionTabIdx); this.completionTabIdx = (this.completionTabIdx + 1) % candidates.Count(); } - + if (toComplete != null) { ptr.DeleteChars(0, ptr.BufTextLen); @@ -1103,7 +1103,7 @@ internal class ConsoleWindow : Window, IDisposable charOffsets[charOffsetsIndex++] = line.Length; var screenPos = ImGui.GetCursorScreenPos(); - var drawList = ImGui.GetWindowDrawList().NativePtr; + var drawList = ImGui.GetWindowDrawList().Handle; var font = ImGui.GetFont(); var size = ImGui.GetFontSize(); var scale = size / font.FontSize; diff --git a/Dalamud/Interface/Internal/Windows/Data/DataWindow.cs b/Dalamud/Interface/Internal/Windows/Data/DataWindow.cs index 7326f6745..0984b2a79 100644 --- a/Dalamud/Interface/Internal/Windows/Data/DataWindow.cs +++ b/Dalamud/Interface/Internal/Windows/Data/DataWindow.cs @@ -8,7 +8,7 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Windowing; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; namespace Dalamud.Interface.Internal.Windows.Data; diff --git a/Dalamud/Interface/Internal/Windows/Data/DataWindowWidgetExtensions.cs b/Dalamud/Interface/Internal/Windows/Data/DataWindowWidgetExtensions.cs index 24adb8bc5..a2c519fca 100644 --- a/Dalamud/Interface/Internal/Windows/Data/DataWindowWidgetExtensions.cs +++ b/Dalamud/Interface/Internal/Windows/Data/DataWindowWidgetExtensions.cs @@ -3,7 +3,7 @@ using System.Numerics; using Dalamud.Interface.ImGuiNotification; using Dalamud.Interface.ImGuiNotification.Internal; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data; @@ -50,7 +50,7 @@ internal static class DataWindowWidgetExtensions { ImGui.SetClipboardText(s); Service.Get().AddNotification( - $"Copied {ImGui.TableGetColumnName()} to clipboard.", + $"Copied {ImGui.TableGetColumnNameS()} to clipboard.", widget.DisplayName, NotificationType.Success); } diff --git a/Dalamud/Interface/Internal/Windows/Data/GameInventoryTestWidget.cs b/Dalamud/Interface/Internal/Windows/Data/GameInventoryTestWidget.cs index 5cede00cf..dad98684c 100644 --- a/Dalamud/Interface/Internal/Windows/Data/GameInventoryTestWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/GameInventoryTestWidget.cs @@ -8,7 +8,7 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Logging.Internal; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog.Events; @@ -46,7 +46,7 @@ internal class GameInventoryTestWidget : IDataWindowWidget ImGuiColors.DalamudRed, "Enable LogLevel=Information display to see the logs."); } - + using var table = ImRaii.Table(this.DisplayName, 3, ImGuiTableFlags.SizingFixedFit); if (!table.Success) return; diff --git a/Dalamud/Interface/Internal/Windows/Data/WidgetUtil.cs b/Dalamud/Interface/Internal/Windows/Data/WidgetUtil.cs index 209970e24..3d99c5d7c 100644 --- a/Dalamud/Interface/Internal/Windows/Data/WidgetUtil.cs +++ b/Dalamud/Interface/Internal/Windows/Data/WidgetUtil.cs @@ -1,6 +1,6 @@ using Dalamud.Interface.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data; diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs index 53066765e..8bf968dc8 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs @@ -5,7 +5,7 @@ using Dalamud.Game.Addon.Lifecycle; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -19,11 +19,11 @@ public class AddonLifecycleWidget : IDataWindowWidget /// public string DisplayName { get; init; } = "Addon Lifecycle"; - + /// [MemberNotNullWhen(true, "AddonLifecycle")] public bool Ready { get; set; } - + private AddonLifecycle? AddonLifecycle { get; set; } /// @@ -38,7 +38,7 @@ public class AddonLifecycleWidget : IDataWindowWidget this.Ready = true; }); } - + /// public void Draw() { @@ -62,11 +62,11 @@ public class AddonLifecycleWidget : IDataWindowWidget ImGui.Unindent(); } } - + private void DrawEventListeners() { if (!this.Ready) return; - + foreach (var eventType in Enum.GetValues()) { if (ImGui.CollapsingHeader(eventType.ToString())) @@ -78,7 +78,7 @@ public class AddonLifecycleWidget : IDataWindowWidget { ImGui.Text("No Listeners Registered for Event"); } - + if (ImGui.BeginTable("AddonLifecycleListenersTable", 2)) { ImGui.TableSetupColumn("##AddonName", ImGuiTableColumnFlags.WidthFixed, 100.0f * ImGuiHelpers.GlobalScale); @@ -92,10 +92,10 @@ public class AddonLifecycleWidget : IDataWindowWidget ImGui.TableNextColumn(); ImGui.Text($"{listener.FunctionDelegate.Method.DeclaringType?.FullName ?? "Unknown Declaring Type"}::{listener.FunctionDelegate.Method.Name}"); } - + ImGui.EndTable(); } - + ImGui.Unindent(); } } @@ -111,7 +111,7 @@ public class AddonLifecycleWidget : IDataWindowWidget { ImGui.Text("No ReceiveEvent Hooks are Registered"); } - + foreach (var receiveEventListener in this.AddonLifecycle.ReceiveEventListeners) { if (ImGui.CollapsingHeader(string.Join(", ", receiveEventListener.AddonNames))) @@ -135,7 +135,7 @@ public class AddonLifecycleWidget : IDataWindowWidget var text = receiveEventListener.Hook.IsEnabled ? "Enabled" : "Disabled"; ImGui.TextColored(color, text); } - + ImGui.Columns(1); } } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonWidget.cs index 18bcd9334..38ca26b7c 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonWidget.cs @@ -1,7 +1,7 @@ using Dalamud.Game.Gui; using Dalamud.Memory; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -15,7 +15,7 @@ internal unsafe class AddonWidget : IDataWindowWidget private nint findAgentInterfacePtr; /// - public string DisplayName { get; init; } = "Addon"; + public string DisplayName { get; init; } = "Addon"; /// public string[]? CommandShortcuts { get; init; } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddressesWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddressesWidget.cs index c7ed526e1..183cb50e3 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddressesWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddressesWidget.cs @@ -3,7 +3,7 @@ using Dalamud.Game; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -19,7 +19,7 @@ internal class AddressesWidget : IDataWindowWidget public string[]? CommandShortcuts { get; init; } = { "address" }; /// - public string DisplayName { get; init; } = "Addresses"; + public string DisplayName { get; init; } = "Addresses"; /// public bool Ready { get; set; } @@ -29,7 +29,7 @@ internal class AddressesWidget : IDataWindowWidget { this.Ready = true; } - + /// public void Draw() { diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AetherytesWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AetherytesWidget.cs index 9a3b231e5..0e45f8ab6 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AetherytesWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AetherytesWidget.cs @@ -1,6 +1,6 @@ using Dalamud.Game.ClientState.Aetherytes; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -14,9 +14,9 @@ internal class AetherytesWidget : IDataWindowWidget /// public string[]? CommandShortcuts { get; init; } = { "aetherytes" }; - + /// - public string DisplayName { get; init; } = "Aetherytes"; + public string DisplayName { get; init; } = "Aetherytes"; /// public void Load() diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AtkArrayDataBrowserWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AtkArrayDataBrowserWidget.cs index c3499570c..1a030ad54 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AtkArrayDataBrowserWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AtkArrayDataBrowserWidget.cs @@ -6,7 +6,7 @@ using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Text.ReadOnly; @@ -36,7 +36,7 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget /// public string[]? CommandShortcuts { get; init; } = { "atkarray" }; - + /// public string DisplayName { get; init; } = "Atk Array Data"; diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/BuddyListWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/BuddyListWidget.cs index 961d3c3c0..0298f879a 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/BuddyListWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/BuddyListWidget.cs @@ -1,6 +1,6 @@ using Dalamud.Game.ClientState.Buddy; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -16,9 +16,9 @@ internal class BuddyListWidget : IDataWindowWidget /// public string[]? CommandShortcuts { get; init; } = { "buddy", "buddylist" }; - + /// - public string DisplayName { get; init; } = "Buddy List"; + public string DisplayName { get; init; } = "Buddy List"; /// public void Load() diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/CommandWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/CommandWidget.cs index 07695c02a..254bfc10c 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/CommandWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/CommandWidget.cs @@ -3,7 +3,7 @@ using Dalamud.Game.Command; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -14,9 +14,9 @@ internal class CommandWidget : IDataWindowWidget { /// public string[]? CommandShortcuts { get; init; } = { "command" }; - + /// - public string DisplayName { get; init; } = "Command"; + public string DisplayName { get; init; } = "Command"; /// public bool Ready { get; set; } @@ -44,7 +44,7 @@ internal class CommandWidget : IDataWindowWidget ImGui.TableSetupColumn("HelpMessage", ImGuiTableColumnFlags.NoSort); ImGui.TableSetupColumn("In Help?", ImGuiTableColumnFlags.NoSort); ImGui.TableHeadersRow(); - + var sortSpecs = ImGui.TableGetSortSpecs(); var commands = commandManager.Commands.ToArray(); @@ -65,16 +65,16 @@ internal class CommandWidget : IDataWindowWidget foreach (var command in commands) { ImGui.TableNextRow(); - + ImGui.TableSetColumnIndex(0); ImGui.Text(command.Key); - + ImGui.TableNextColumn(); ImGui.Text(commandManager.GetHandlerAssemblyName(command.Key, command.Value)); - + ImGui.TableNextColumn(); ImGui.TextWrapped(command.Value.HelpMessage); - + ImGui.TableNextColumn(); ImGui.Text(command.Value.ShowInHelp ? "Yes" : "No"); } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ConditionWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ConditionWidget.cs index 355a73a71..f32db563d 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ConditionWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ConditionWidget.cs @@ -1,7 +1,7 @@ using Dalamud.Game.ClientState.Conditions; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -15,9 +15,9 @@ internal class ConditionWidget : IDataWindowWidget /// public string[]? CommandShortcuts { get; init; } = { "condition" }; - + /// - public string DisplayName { get; init; } = "Condition"; + public string DisplayName { get; init; } = "Condition"; /// public void Load() diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/DataShareWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/DataShareWidget.cs index b1bd0f05c..ca697642f 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/DataShareWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/DataShareWidget.cs @@ -11,7 +11,7 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin.Ipc.Internal; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; @@ -124,13 +124,13 @@ internal class DataShareWidget : IDataWindowWidget if (ImGui.Button("Copy")) { fixed (byte* pData = data) - ImGuiNative.igSetClipboardText(pData); + ImGui.SetClipboardText(pData); } fixed (byte* pLabel = "text"u8) fixed (byte* pData = data) { - ImGuiNative.igInputTextMultiline( + ImGui.InputTextMultiline( pLabel, pData, (uint)data.Length, @@ -148,7 +148,7 @@ internal class DataShareWidget : IDataWindowWidget { if (mi is null) return "-"; - + var sb = new StringBuilder(); sb.Append(ReprType(mi.DeclaringType)) .Append("::") @@ -245,7 +245,7 @@ internal class DataShareWidget : IDataWindowWidget { ImGui.SetClipboardText(tooltip?.Invoke() ?? s); Service.Get().AddNotification( - $"Copied {ImGui.TableGetColumnName()} to clipboard.", + $"Copied {ImGui.TableGetColumnNameS()} to clipboard.", this.DisplayName, NotificationType.Success); } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/DtrBarWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/DtrBarWidget.cs index 8b7a692d4..a7965eb8f 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/DtrBarWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/DtrBarWidget.cs @@ -5,7 +5,7 @@ using Dalamud.Configuration.Internal; using Dalamud.Game; using Dalamud.Game.Gui.Dtr; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/FateTableWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/FateTableWidget.cs index 34b04dae0..9e715f9bf 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/FateTableWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/FateTableWidget.cs @@ -3,7 +3,7 @@ using Dalamud.Interface.Textures.Internal; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -14,9 +14,9 @@ internal class FateTableWidget : IDataWindowWidget { /// public string[]? CommandShortcuts { get; init; } = { "fate", "fatetable" }; - + /// - public string DisplayName { get; init; } = "Fate Table"; + public string DisplayName { get; init; } = "Fate Table"; /// public bool Ready { get; set; } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/FlyTextWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/FlyTextWidget.cs index 40275645f..da1dc071a 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/FlyTextWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/FlyTextWidget.cs @@ -2,7 +2,7 @@ using Dalamud.Game.Gui.FlyText; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -20,12 +20,12 @@ internal class FlyTextWidget : IDataWindowWidget private int flyIcon; private int flyDmgIcon; private Vector4 flyColor = new(1, 0, 0, 1); - + /// public string[]? CommandShortcuts { get; init; } = { "flytext" }; - + /// - public string DisplayName { get; init; } = "Fly Text"; + public string DisplayName { get; init; } = "Fly Text"; /// public bool Ready { get; set; } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs index a6d76f44f..fd25e3025 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Numerics; using Dalamud.Interface.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -19,12 +19,12 @@ internal class FontAwesomeTestWidget : IDataWindowWidget private string iconSearchInput = string.Empty; private bool iconSearchChanged = true; private bool useFixedWidth = false; - + /// public string[]? CommandShortcuts { get; init; } = { "fa", "fatest", "fontawesome" }; - + /// - public string DisplayName { get; init; } = "Font Awesome Test"; + public string DisplayName { get; init; } = "Font Awesome Test"; /// public bool Ready { get; set; } @@ -81,7 +81,7 @@ internal class FontAwesomeTestWidget : IDataWindowWidget { this.iconSearchChanged = true; } - + ImGui.Checkbox("Use fixed width font", ref this.useFixedWidth); ImGuiHelpers.ScaledDummy(10f); @@ -96,7 +96,7 @@ internal class FontAwesomeTestWidget : IDataWindowWidget ImGui.PopFont(); ImGuiHelpers.ScaledDummy(2f); } - + ImGui.PopStyleVar(); } } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/GamePrebakedFontsTestWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/GamePrebakedFontsTestWidget.cs index 469ef3dc3..8a6ec135e 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/GamePrebakedFontsTestWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/GamePrebakedFontsTestWidget.cs @@ -2,9 +2,11 @@ using System.Collections.Immutable; using System.Linq; using System.Numerics; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; +using Dalamud.Bindings.ImGui; using Dalamud.Game; using Dalamud.Interface.FontIdentifier; using Dalamud.Interface.GameFonts; @@ -13,9 +15,6 @@ using Dalamud.Interface.ManagedFontAtlas; using Dalamud.Interface.ManagedFontAtlas.Internals; using Dalamud.Interface.Utility; using Dalamud.Utility; - -using ImGuiNET; - using Serilog; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -66,10 +65,10 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable this.ClearAtlas(); fixed (byte* labelPtr = "Global Scale for Atlas"u8) { - var v = (byte)(this.atlasScaleMode ? 1 : 0); - if (ImGuiNative.igCheckbox(labelPtr, &v) != 0) + var v = this.atlasScaleMode; + if (ImGui.Checkbox(labelPtr, ref v)) { - this.atlasScaleMode = v != 0; + this.atlasScaleMode = v; this.ClearAtlas(); } } @@ -77,40 +76,40 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable ImGui.SameLine(); fixed (byte* labelPtr = "Word Wrap"u8) { - var v = (byte)(this.useWordWrap ? 1 : 0); - if (ImGuiNative.igCheckbox(labelPtr, &v) != 0) - this.useWordWrap = v != 0; + var v = this.useWordWrap; + if (ImGui.Checkbox(labelPtr, &v)) + this.useWordWrap = v; } - + ImGui.SameLine(); fixed (byte* labelPtr = "Italic"u8) { - var v = (byte)(this.useItalic ? 1 : 0); - if (ImGuiNative.igCheckbox(labelPtr, &v) != 0) + var v = this.useItalic; + if (ImGui.Checkbox(labelPtr, &v)) { - this.useItalic = v != 0; + this.useItalic = v; this.ClearAtlas(); } } - + ImGui.SameLine(); fixed (byte* labelPtr = "Bold"u8) { - var v = (byte)(this.useBold ? 1 : 0); - if (ImGuiNative.igCheckbox(labelPtr, &v) != 0) + var v = this.useBold; + if (ImGui.Checkbox(labelPtr, &v)) { - this.useBold = v != 0; + this.useBold = v; this.ClearAtlas(); } } - + ImGui.SameLine(); fixed (byte* labelPtr = "Minimum Range"u8) { - var v = (byte)(this.useMinimumBuild ? 1 : 0); - if (ImGuiNative.igCheckbox(labelPtr, &v) != 0) + var v = this.useMinimumBuild; + if (ImGui.Checkbox(labelPtr, &v)) { - this.useMinimumBuild = v != 0; + this.useMinimumBuild = v; this.ClearAtlas(); } } @@ -211,17 +210,17 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable fixed (byte* labelPtr = "Test Input"u8) { if (!this.atlasScaleMode) - ImGuiNative.igSetWindowFontScale(1 / ImGuiHelpers.GlobalScale); + ImGui.SetWindowFontScale(1 / ImGuiHelpers.GlobalScale); using (this.fontDialogHandle.Push()) { - if (ImGuiNative.igInputTextMultiline( + if (ImGui.InputTextMultiline( labelPtr, this.testStringBuffer.Data, (uint)this.testStringBuffer.Capacity, new(ImGui.GetContentRegionAvail().X, ImGui.GetTextLineHeight() * 3), 0, null, - null) != 0) + null)) { var len = this.testStringBuffer.StorageSpan.IndexOf((byte)0); if (len + 4 >= this.testStringBuffer.Capacity) @@ -238,7 +237,7 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable } if (!this.atlasScaleMode) - ImGuiNative.igSetWindowFontScale(1); + ImGui.SetWindowFontScale(1); } this.fontHandles ??= @@ -285,7 +284,7 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable { ImGui.TextUnformatted($"{gfs.SizePt}pt"); ImGui.SameLine(offsetX); - ImGuiNative.igPushTextWrapPos(this.useWordWrap ? 0f : -1f); + ImGui.PushTextWrapPos(this.useWordWrap ? 0f : -1f); try { if (handle.Value.LoadException is { } exc) @@ -295,23 +294,23 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable else if (!handle.Value.Available) { fixed (byte* labelPtr = "Loading..."u8) - ImGuiNative.igTextUnformatted(labelPtr, labelPtr + 8 + ((Environment.TickCount / 200) % 3)); + ImGui.TextUnformatted(labelPtr, labelPtr + 8 + ((Environment.TickCount / 200) % 3)); } else { if (!this.atlasScaleMode) - ImGuiNative.igSetWindowFontScale(1 / ImGuiHelpers.GlobalScale); + ImGui.SetWindowFontScale(1 / ImGuiHelpers.GlobalScale); if (counter++ % 2 == 0) { using var pushPop = handle.Value.Push(); - ImGuiNative.igTextUnformatted( + ImGui.TextUnformatted( this.testStringBuffer.Data, this.testStringBuffer.Data + this.testStringBuffer.Length); } else { handle.Value.Push(); - ImGuiNative.igTextUnformatted( + ImGui.TextUnformatted( this.testStringBuffer.Data, this.testStringBuffer.Data + this.testStringBuffer.Length); handle.Value.Pop(); @@ -320,8 +319,8 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable } finally { - ImGuiNative.igSetWindowFontScale(1); - ImGuiNative.igPopTextWrapPos(); + ImGui.SetWindowFontScale(1); + ImGui.PopTextWrapPos(); } } } @@ -385,7 +384,7 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable var dim = default(Vector2); var test = "Test string"u8; fixed (byte* pTest = test) - ImGuiNative.ImFont_CalcTextSizeA(&dim, fontPtr, fontPtr.FontSize, float.MaxValue, 0, pTest, null, null); + ImGui.CalcTextSizeA(ref dim, fontPtr, fontPtr.FontSize, float.MaxValue, 0f, pTest, (string)null, null); Log.Information($"{nameof(GamePrebakedFontsTestWidget)}: {handle} => {dim}"); } } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/GamepadWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/GamepadWidget.cs index 610fa90cc..ccd9788c7 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/GamepadWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/GamepadWidget.cs @@ -1,7 +1,7 @@ using Dalamud.Game.ClientState.GamePad; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/GaugeWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/GaugeWidget.cs index f30585406..1dfb1a66b 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/GaugeWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/GaugeWidget.cs @@ -2,7 +2,7 @@ using Dalamud.Game.ClientState; using Dalamud.Game.ClientState.JobGauge; using Dalamud.Game.ClientState.JobGauge.Types; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -13,9 +13,9 @@ internal class GaugeWidget : IDataWindowWidget { /// public string[]? CommandShortcuts { get; init; } = { "gauge", "jobgauge", "job" }; - + /// - public string DisplayName { get; init; } = "Job Gauge"; + public string DisplayName { get; init; } = "Job Gauge"; /// public bool Ready { get; set; } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/HookWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/HookWidget.cs index b24587d6c..59cdfe1ab 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/HookWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/HookWidget.cs @@ -1,7 +1,10 @@ using System.Runtime.InteropServices; +using Windows.Win32.Foundation; +using Windows.Win32.UI.WindowsAndMessaging; + using Dalamud.Hooking; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using PInvoke; using Serilog; @@ -14,19 +17,19 @@ internal class HookWidget : IDataWindowWidget { private Hook? messageBoxMinHook; private bool hookUseMinHook; - + private delegate int MessageBoxWDelegate( IntPtr hWnd, [MarshalAs(UnmanagedType.LPWStr)] string text, [MarshalAs(UnmanagedType.LPWStr)] string caption, - NativeFunctions.MessageBoxType type); - + MESSAGEBOX_STYLE type); + /// - public string DisplayName { get; init; } = "Hook"; + public string DisplayName { get; init; } = "Hook"; /// public string[]? CommandShortcuts { get; init; } = { "hook" }; - + /// public bool Ready { get; set; } @@ -53,7 +56,7 @@ internal class HookWidget : IDataWindowWidget this.messageBoxMinHook?.Disable(); if (ImGui.Button("Call Original")) - this.messageBoxMinHook?.Original(IntPtr.Zero, "Hello from .Original", "Hook Test", NativeFunctions.MessageBoxType.Ok); + this.messageBoxMinHook?.Original(IntPtr.Zero, "Hello from .Original", "Hook Test", MESSAGEBOX_STYLE.MB_OK); if (ImGui.Button("Dispose")) { @@ -62,7 +65,7 @@ internal class HookWidget : IDataWindowWidget } if (ImGui.Button("Test")) - _ = NativeFunctions.MessageBoxW(IntPtr.Zero, "Hi", "Hello", NativeFunctions.MessageBoxType.Ok); + _ = global::Windows.Win32.PInvoke.MessageBox(HWND.Null, "Hi", "Hello", MESSAGEBOX_STYLE.MB_OK); if (this.messageBoxMinHook != null) ImGui.Text("Enabled: " + this.messageBoxMinHook?.IsEnabled); @@ -72,12 +75,12 @@ internal class HookWidget : IDataWindowWidget Log.Error(ex, "MinHook error caught"); } } - - private int MessageBoxWDetour(IntPtr hwnd, string text, string caption, NativeFunctions.MessageBoxType type) + + private int MessageBoxWDetour(IntPtr hwnd, string text, string caption, MESSAGEBOX_STYLE type) { Log.Information("[DATAHOOK] {Hwnd} {Text} {Caption} {Type}", hwnd, text, caption, type); - var result = this.messageBoxMinHook!.Original(hwnd, "Cause Access Violation?", caption, NativeFunctions.MessageBoxType.YesNo); + var result = this.messageBoxMinHook!.Original(hwnd, "Cause Access Violation?", caption, MESSAGEBOX_STYLE.MB_YESNO); if (result == (int)User32.MessageBoxResult.IDYES) { diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/IconBrowserWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/IconBrowserWidget.cs index 3f510b088..d07117472 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/IconBrowserWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/IconBrowserWidget.cs @@ -8,7 +8,7 @@ using Dalamud.Interface.Textures.TextureWraps; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Internal; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ImGuiWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ImGuiWidget.cs index 08d29398b..1dcf393f1 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ImGuiWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ImGuiWidget.cs @@ -11,7 +11,7 @@ using Dalamud.Interface.Textures.TextureWraps; using Dalamud.Interface.Windowing; using Dalamud.Storage.Assets; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -457,7 +457,7 @@ internal class ImGuiWidget : IDataWindowWidget public DisposeLoggingTextureWrap(IDalamudTextureWrap inner) => this.inner = inner; - public nint ImGuiHandle => this.inner.ImGuiHandle; + public ImTextureID ImGuiHandle => this.inner.ImGuiHandle; public int Width => this.inner.Width; diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/InventoryWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/InventoryWidget.cs index f8aa4e500..dd54d4cdf 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/InventoryWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/InventoryWidget.cs @@ -13,7 +13,7 @@ using Dalamud.Utility; using FFXIVClientStructs.FFXIV.Client.Game; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Excel.Sheets; diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/KeyStateWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/KeyStateWidget.cs index ce56052b1..bf4c87306 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/KeyStateWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/KeyStateWidget.cs @@ -1,7 +1,7 @@ using Dalamud.Game.ClientState.Keys; using Dalamud.Interface.Colors; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -12,9 +12,9 @@ internal class KeyStateWidget : IDataWindowWidget { /// public string[]? CommandShortcuts { get; init; } = { "keystate" }; - + /// - public string DisplayName { get; init; } = "KeyState"; + public string DisplayName { get; init; } = "KeyState"; /// public bool Ready { get; set; } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/MarketBoardWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/MarketBoardWidget.cs index b209e2d9e..a5b7056d1 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/MarketBoardWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/MarketBoardWidget.cs @@ -5,7 +5,9 @@ using Dalamud.Game.MarketBoard; using Dalamud.Game.Network.Structures; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; + +using ImGuiTable = Dalamud.Interface.Utility.ImGuiTable; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs index 69a440713..e6bd630ce 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs @@ -8,7 +8,9 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Memory; -using ImGuiNET; +using Dalamud.Bindings.ImGui; + +using ImGuiTable = Dalamud.Interface.Utility.ImGuiTable; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -42,9 +44,9 @@ internal class NetworkMonitorWidget : IDataWindowWidget /// public string[]? CommandShortcuts { get; init; } = { "network", "netmon", "networkmonitor" }; - + /// - public string DisplayName { get; init; } = "Network Monitor"; + public string DisplayName { get; init; } = "Network Monitor"; /// public bool Ready { get; set; } @@ -59,7 +61,7 @@ internal class NetworkMonitorWidget : IDataWindowWidget this.packets.Clear(); this.Ready = true; } - + /// public void Draw() { @@ -203,7 +205,7 @@ internal class NetworkMonitorWidget : IDataWindowWidget /// The filter should find opCodes by number (decimal and hex) and name, if existing. private string OpCodeToString(ushort opCode) => $"{opCode}\0{opCode:X}"; - + #pragma warning disable SA1313 private readonly record struct NetworkPacketData(ushort OpCode, NetworkMessageDirection Direction, uint SourceActorId, uint TargetActorId) #pragma warning restore SA1313 diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/NounProcessorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/NounProcessorWidget.cs index bc0bd0ac9..8c5e11d1c 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/NounProcessorWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/NounProcessorWidget.cs @@ -8,7 +8,7 @@ using Dalamud.Game.Text.Noun; using Dalamud.Game.Text.Noun.Enums; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Data; using Lumina.Excel; using Lumina.Excel.Sheets; diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ObjectTableWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ObjectTableWidget.cs index 761dc49a8..3fd67b057 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ObjectTableWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ObjectTableWidget.cs @@ -4,7 +4,7 @@ using Dalamud.Game.ClientState; using Dalamud.Game.ClientState.Objects; using Dalamud.Game.Gui; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -19,24 +19,24 @@ internal class ObjectTableWidget : IDataWindowWidget /// public string[]? CommandShortcuts { get; init; } = { "ot", "objecttable" }; - + /// - public string DisplayName { get; init; } = "Object Table"; + public string DisplayName { get; init; } = "Object Table"; /// public bool Ready { get; set; } - + /// public void Load() { this.Ready = true; } - + /// public void Draw() { ImGui.Checkbox("Resolve GameData", ref this.resolveGameData); - + var chatGui = Service.Get(); var clientState = Service.Get(); var gameGui = Service.Get(); diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/PartyListWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/PartyListWidget.cs index 6e4cbcb16..0f505746d 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/PartyListWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/PartyListWidget.cs @@ -1,6 +1,6 @@ using Dalamud.Game.ClientState.Party; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -13,9 +13,9 @@ internal class PartyListWidget : IDataWindowWidget /// public string[]? CommandShortcuts { get; init; } = { "partylist", "party" }; - + /// - public string DisplayName { get; init; } = "Party List"; + public string DisplayName { get; init; } = "Party List"; /// public bool Ready { get; set; } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/PluginIpcWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/PluginIpcWidget.cs index d67dfc103..029fce1e0 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/PluginIpcWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/PluginIpcWidget.cs @@ -4,7 +4,7 @@ using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Plugin.Ipc; using Dalamud.Plugin.Ipc.Internal; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -17,18 +17,18 @@ internal class PluginIpcWidget : IDataWindowWidget // IPC private ICallGateProvider? ipcPub; private ICallGateSubscriber? ipcSub; - + // IPC private ICallGateProvider? ipcPubGo; private ICallGateSubscriber? ipcSubGo; - + private string callGateResponse = string.Empty; - + /// public string[]? CommandShortcuts { get; init; } = { "ipc" }; - + /// - public string DisplayName { get; init; } = "Plugin IPC"; + public string DisplayName { get; init; } = "Plugin IPC"; /// public bool Ready { get; set; } @@ -108,17 +108,17 @@ internal class PluginIpcWidget : IDataWindowWidget { this.callGateResponse = this.ipcSub.InvokeFunc("button2"); } - + if (ImGui.Button("Action GO")) { this.ipcSubGo.InvokeAction(Service.Get().LocalPlayer); } - + if (ImGui.Button("Func GO")) { this.callGateResponse = this.ipcSubGo.InvokeFunc(Service.Get().LocalPlayer); } - + if (!this.callGateResponse.IsNullOrEmpty()) ImGui.Text($"Response: {this.callGateResponse}"); } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeFontTestWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeFontTestWidget.cs index 35a2a616e..a3e1cbb11 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeFontTestWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeFontTestWidget.cs @@ -1,7 +1,7 @@ using System.Linq; using Dalamud.Game.Text; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -12,9 +12,9 @@ internal class SeFontTestWidget : IDataWindowWidget { /// public string[]? CommandShortcuts { get; init; } = { "sefont", "sefonttest" }; - + /// - public string DisplayName { get; init; } = "SeFont Test"; + public string DisplayName { get; init; } = "SeFont Test"; /// public bool Ready { get; set; } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringCreatorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringCreatorWidget.cs index 92e57ddac..4fca97ea4 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringCreatorWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringCreatorWidget.cs @@ -19,7 +19,7 @@ using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Client.UI.Misc; using FFXIVClientStructs.FFXIV.Component.Text; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Data; using Lumina.Data.Files.Excel; @@ -225,7 +225,7 @@ internal class SeStringCreatorWidget : IDataWindowWidget if (ImGui.IsItemHovered()) { - ImGui.SetMouseCursor(ImGuiMouseCursor.ResizeEW); + ImGui.SetMouseCursor(ImGuiMouseCursor.ResizeEw); if (ImGui.IsMouseDoubleClicked(ImGuiMouseButton.Left)) { diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringRendererTestWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringRendererTestWidget.cs index 323c9ce62..8a000e55b 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringRendererTestWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringRendererTestWidget.cs @@ -13,7 +13,7 @@ using Dalamud.Utility; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Excel.Sheets; using Lumina.Text; @@ -193,7 +193,7 @@ internal unsafe class SeStringRendererTestWidget : IDataWindowWidget var addon = Service.GetNullable()?.GetExcelSheet() ?? throw new InvalidOperationException("Addon sheet not loaded."); - var clipper = new ImGuiListClipperPtr(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); + var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper()); clipper.Begin(addon.Count); while (clipper.Step()) { @@ -266,14 +266,14 @@ internal unsafe class SeStringRendererTestWidget : IDataWindowWidget fixed (byte* labelPtr = "Test Input"u8) { - if (ImGuiNative.igInputTextMultiline( + if (ImGui.InputTextMultiline( labelPtr, this.testStringBuffer.Data, (uint)this.testStringBuffer.Capacity, new(ImGui.GetContentRegionAvail().X, ImGui.GetTextLineHeight() * 3), 0, null, - null) != 0) + null)) { var len = this.testStringBuffer.StorageSpan.IndexOf((byte)0); if (len + 4 >= this.testStringBuffer.Capacity) diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ServicesWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ServicesWidget.cs index d1e6bc58a..61053ddb9 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ServicesWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ServicesWidget.cs @@ -8,7 +8,7 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.IoC.Internal; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -26,9 +26,9 @@ internal class ServicesWidget : IDataWindowWidget /// public string[]? CommandShortcuts { get; init; } = { "services" }; - + /// - public string DisplayName { get; init; } = "Service Container"; + public string DisplayName { get; init; } = "Service Container"; /// public bool Ready { get; set; } @@ -48,7 +48,7 @@ internal class ServicesWidget : IDataWindowWidget { if (ImGui.Button("Clear selection")) this.selectedNodes.Clear(); - + ImGui.SameLine(); switch (this.includeUnloadDependencies) { @@ -90,12 +90,12 @@ internal class ServicesWidget : IDataWindowWidget var dl = ImGui.GetWindowDrawList(); var mouse = ImGui.GetMousePos(); var maxRowWidth = 0f; - + // 1. Layout for (var level = 0; level < this.dependencyNodes.Count; level++) { var levelNodes = this.dependencyNodes[level]; - + var rowWidth = 0f; foreach (var node in levelNodes) rowWidth += node.DisplayedNameSize.X + cellPad.X + margin.X; @@ -139,7 +139,7 @@ internal class ServicesWidget : IDataWindowWidget { var rect = this.nodeRects[node]; var point1 = new Vector2((rect.X + rect.Z) / 2, rect.Y); - + foreach (var parent in node.InvalidParents) { rect = this.nodeRects[parent]; @@ -149,7 +149,7 @@ internal class ServicesWidget : IDataWindowWidget dl.AddLine(point1, point2, lineInvalidColor, 2f * ImGuiHelpers.GlobalScale); } - + foreach (var parent in node.Parents) { rect = this.nodeRects[parent]; @@ -170,7 +170,7 @@ internal class ServicesWidget : IDataWindowWidget } } } - + // 3. Draw boxes foreach (var levelNodes in this.dependencyNodes) { @@ -231,7 +231,7 @@ internal class ServicesWidget : IDataWindowWidget } } } - + ImGui.SetCursorPos(default); ImGui.Dummy(new(maxRowWidth, this.dependencyNodes.Count * rowHeight)); ImGui.EndChild(); @@ -301,7 +301,7 @@ internal class ServicesWidget : IDataWindowWidget public string DisplayedName { get; } public string TypeSuffix { get; } - + public uint TypeSuffixColor { get; } public Vector2 DisplayedNameSize => @@ -319,7 +319,7 @@ internal class ServicesWidget : IDataWindowWidget public IEnumerable Relatives => this.parents.Concat(this.children).Concat(this.invalidParents); - + public int Level { get; private set; } public static List CreateTree(bool includeUnloadDependencies) diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/StartInfoWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/StartInfoWidget.cs index 4dee316c5..7fb2cc2bf 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/StartInfoWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/StartInfoWidget.cs @@ -1,4 +1,4 @@ -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -10,9 +10,9 @@ internal class StartInfoWidget : IDataWindowWidget { /// public string[]? CommandShortcuts { get; init; } = { "startinfo" }; - + /// - public string DisplayName { get; init; } = "Start Info"; + public string DisplayName { get; init; } = "Start Info"; /// public bool Ready { get; set; } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/TargetWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/TargetWidget.cs index 68e00799d..bcea447f1 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/TargetWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/TargetWidget.cs @@ -2,7 +2,7 @@ using Dalamud.Game.ClientState.Objects; using Dalamud.Interface.Utility; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -12,12 +12,12 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets; internal class TargetWidget : IDataWindowWidget { private bool resolveGameData; - + /// public string[]? CommandShortcuts { get; init; } = { "target" }; - + /// - public string DisplayName { get; init; } = "Target"; + public string DisplayName { get; init; } = "Target"; /// public bool Ready { get; set; } @@ -32,7 +32,7 @@ internal class TargetWidget : IDataWindowWidget public void Draw() { ImGui.Checkbox("Resolve GameData", ref this.resolveGameData); - + var clientState = Service.Get(); var targetMgr = Service.Get(); @@ -67,10 +67,10 @@ internal class TargetWidget : IDataWindowWidget if (targetMgr.SoftTarget != null) Util.PrintGameObject(targetMgr.SoftTarget, "SoftTarget", this.resolveGameData); - + if (targetMgr.GPoseTarget != null) Util.PrintGameObject(targetMgr.GPoseTarget, "GPoseTarget", this.resolveGameData); - + if (targetMgr.MouseOverNameplateTarget != null) Util.PrintGameObject(targetMgr.MouseOverNameplateTarget, "MouseOverNameplateTarget", this.resolveGameData); diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/TaskSchedulerWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/TaskSchedulerWidget.cs index f4086fe5a..f53f58495 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/TaskSchedulerWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/TaskSchedulerWidget.cs @@ -17,7 +17,7 @@ using Dalamud.Interface.Utility.Raii; using Dalamud.Logging.Internal; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -28,18 +28,18 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets; internal class TaskSchedulerWidget : IDataWindowWidget { private readonly FileDialogManager fileDialogManager = new(); - private readonly byte[] urlBytes = new byte[2048]; - private readonly byte[] localPathBytes = new byte[2048]; + private string url = "https://geo.mirror.pkgbuild.com/iso/2024.01.01/archlinux-2024.01.01-x86_64.iso"; + private string localPath = string.Empty; private Task? downloadTask = null; private (long Downloaded, long Total, float Percentage) downloadState; private CancellationTokenSource taskSchedulerCancelSource = new(); - + /// public string[]? CommandShortcuts { get; init; } = { "tasksched", "taskscheduler" }; - + /// - public string DisplayName { get; init; } = "Task Scheduler"; + public string DisplayName { get; init; } = "Task Scheduler"; /// public bool Ready { get; set; } @@ -48,9 +48,6 @@ internal class TaskSchedulerWidget : IDataWindowWidget public void Load() { this.Ready = true; - Encoding.UTF8.GetBytes( - "https://geo.mirror.pkgbuild.com/iso/2024.01.01/archlinux-2024.01.01-x86_64.iso", - this.urlBytes); } /// @@ -247,13 +244,13 @@ internal class TaskSchedulerWidget : IDataWindowWidget if (ImGui.CollapsingHeader("Download")) { - ImGui.InputText("URL", this.urlBytes, (uint)this.urlBytes.Length); - ImGui.InputText("Local Path", this.localPathBytes, (uint)this.localPathBytes.Length); + ImGui.InputText("URL", ref this.url, (uint)this.url.Length); + ImGui.InputText("Local Path", ref this.localPath, (uint)this.localPath.Length); ImGui.SameLine(); - + if (ImGuiComponents.IconButton("##localpathpicker", FontAwesomeIcon.File)) { - var defaultFileName = Encoding.UTF8.GetString(this.urlBytes).Split('\0', 2)[0].Split('/').Last(); + var defaultFileName = this.url.Split('\0', 2)[0].Split('/').Last(); this.fileDialogManager.SaveFileDialog( "Choose a local path", "*", @@ -263,8 +260,7 @@ internal class TaskSchedulerWidget : IDataWindowWidget { if (accept) { - this.localPathBytes.AsSpan().Clear(); - Encoding.UTF8.GetBytes(newPath, this.localPathBytes.AsSpan()); + this.localPath = newPath; } }); } @@ -272,7 +268,7 @@ internal class TaskSchedulerWidget : IDataWindowWidget ImGui.TextUnformatted($"{this.downloadState.Downloaded:##,###}/{this.downloadState.Total:##,###} ({this.downloadState.Percentage:0.00}%)"); using var disabled = - ImRaii.Disabled(this.downloadTask?.IsCompleted is false || this.localPathBytes[0] == 0); + ImRaii.Disabled(this.downloadTask?.IsCompleted is false || this.localPath[0] == 0); ImGui.AlignTextToFramePadding(); ImGui.TextUnformatted("Download"); ImGui.SameLine(); @@ -281,8 +277,6 @@ internal class TaskSchedulerWidget : IDataWindowWidget var downloadUsingFramework = ImGui.Button("using Framework.Update"); if (downloadUsingGlobalScheduler || downloadUsingFramework) { - var url = Encoding.UTF8.GetString(this.urlBytes).Split('\0', 2)[0]; - var localPath = Encoding.UTF8.GetString(this.localPathBytes).Split('\0', 2)[0]; var ct = this.taskSchedulerCancelSource.Token; this.downloadState = default; var factory = downloadUsingGlobalScheduler @@ -294,9 +288,9 @@ internal class TaskSchedulerWidget : IDataWindowWidget { try { - await using var to = File.Create(localPath); + await using var to = File.Create(this.localPath); using var client = new HttpClient(); - using var conn = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead, ct); + using var conn = await client.GetAsync(this.url, HttpCompletionOption.ResponseHeadersRead, ct); this.downloadState.Total = conn.Content.Headers.ContentLength ?? -1L; await using var from = conn.Content.ReadAsStream(ct); var buffer = new byte[8192]; @@ -339,31 +333,31 @@ internal class TaskSchedulerWidget : IDataWindowWidget { var token = this.taskSchedulerCancelSource.Token; Task.Run( - () => + () => { for (var i = 0; i < 100; i++) { token.ThrowIfCancellationRequested(); Task.Run( - () => + () => { for (var j = 0; j < 100; j++) { token.ThrowIfCancellationRequested(); Task.Run( - () => + () => { for (var k = 0; k < 100; k++) { token.ThrowIfCancellationRequested(); Task.Run( - () => + () => { for (var l = 0; l < 100; l++) { token.ThrowIfCancellationRequested(); Task.Run( - async () => + async () => { for (var m = 0; m < 100; m++) { @@ -380,7 +374,7 @@ internal class TaskSchedulerWidget : IDataWindowWidget } }); } - + ImGui.SameLine(); ImGuiHelpers.ScaledDummy(20); @@ -456,7 +450,7 @@ internal class TaskSchedulerWidget : IDataWindowWidget this.fileDialogManager.Draw(); } - + private async Task TestTaskInTaskDelay(CancellationToken token) { await Task.Delay(5000, token); diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/TexWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/TexWidget.cs index 07b2d01ff..e23324544 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/TexWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/TexWidget.cs @@ -17,7 +17,7 @@ using Dalamud.Plugin.Services; using Dalamud.Storage.Assets; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using TerraFX.Interop.DirectX; @@ -288,7 +288,7 @@ internal class TexWidget : IDataWindowWidget { if (t.GetTexture(this.textureManager) is { } source) { - var psrv = (ID3D11ShaderResourceView*)source.ImGuiHandle; + var psrv = (ID3D11ShaderResourceView*)source.ImGuiHandle.Handle; var rcsrv = psrv->AddRef() - 1; psrv->Release(); @@ -404,13 +404,13 @@ internal class TexWidget : IDataWindowWidget ImGui.TableHeadersRow(); var sortSpecs = ImGui.TableGetSortSpecs(); - if (sortSpecs.NativePtr is not null && (sortSpecs.SpecsDirty || shouldSortAgain)) + if (sortSpecs.Handle is not null && (sortSpecs.SpecsDirty || shouldSortAgain)) { allBlames.Sort( static (a, b) => { var sortSpecs = ImGui.TableGetSortSpecs(); - var specs = new Span(sortSpecs.NativePtr->Specs, sortSpecs.SpecsCount); + var specs = new Span(sortSpecs.Handle->Specs, sortSpecs.SpecsCount); Span sorted = stackalloc bool[(int)DrawBlameTableColumnUserId.ColumnCount]; foreach (ref var spec in specs) { @@ -442,7 +442,7 @@ internal class TexWidget : IDataWindowWidget sortSpecs.SpecsDirty = false; } - var clipper = new ImGuiListClipperPtr(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); + var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper()); clipper.Begin(allBlames.Count); while (clipper.Step()) @@ -531,7 +531,7 @@ internal class TexWidget : IDataWindowWidget (ImGui.GetStyle().ItemSpacing.X * 1 * numIcons)); ImGui.TableHeadersRow(); - var clipper = new ImGuiListClipperPtr(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); + var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper()); clipper.Begin(textures.Count); using (var enu = textures.GetEnumerator()) diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ToastWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ToastWidget.cs index e101fbd0b..6917eb178 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ToastWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ToastWidget.cs @@ -3,7 +3,7 @@ using Dalamud.Game.Gui.Toast; using Dalamud.Interface.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -19,12 +19,12 @@ internal class ToastWidget : IDataWindowWidget private bool questToastSound; private int questToastIconId; private bool questToastCheckmark; - + /// public string[]? CommandShortcuts { get; init; } = { "toast" }; - + /// - public string DisplayName { get; init; } = "Toast"; + public string DisplayName { get; init; } = "Toast"; /// public bool Ready { get; set; } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs index 45f1ad715..673303aac 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs @@ -7,7 +7,7 @@ using Dalamud.Interface.ImGuiNotification; using Dalamud.Interface.ImGuiNotification.Internal; using Dalamud.Interface.ImGuiSeStringRenderer.Internal; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Excel.Sheets; @@ -66,7 +66,7 @@ internal class UiColorWidget : IDataWindowWidget ImGui.TableSetupColumn("Clear Blue", ImGuiTableColumnFlags.WidthFixed, colorw); ImGui.TableHeadersRow(); - var clipper = new ImGuiListClipperPtr(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); + var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper()); clipper.Begin(colors.Count, ImGui.GetFrameHeightWithSpacing()); while (clipper.Step()) { diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/UldWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/UldWidget.cs index ec39e38f1..4af7f9eec 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/UldWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/UldWidget.cs @@ -13,7 +13,7 @@ using Dalamud.Interface.Textures.Internal; using Dalamud.Interface.Utility; using Dalamud.Memory; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Data.Files; using Lumina.Data.Parsing.Uld; diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/VfsWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/VfsWidget.cs index 019d743bc..eb18a8bcf 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/VfsWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/VfsWidget.cs @@ -3,7 +3,7 @@ using System.IO; using Dalamud.Configuration.Internal; using Dalamud.Storage; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; diff --git a/Dalamud/Interface/Internal/Windows/GamepadModeNotifierWindow.cs b/Dalamud/Interface/Internal/Windows/GamepadModeNotifierWindow.cs index ff5af1556..12e676671 100644 --- a/Dalamud/Interface/Internal/Windows/GamepadModeNotifierWindow.cs +++ b/Dalamud/Interface/Internal/Windows/GamepadModeNotifierWindow.cs @@ -3,7 +3,7 @@ using System.Numerics; using CheapLoc; using Dalamud.Interface.Utility; using Dalamud.Interface.Windowing; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows; diff --git a/Dalamud/Interface/Internal/Windows/HitchSettingsWindow.cs b/Dalamud/Interface/Internal/Windows/HitchSettingsWindow.cs index 1f633934f..9297ba28b 100644 --- a/Dalamud/Interface/Internal/Windows/HitchSettingsWindow.cs +++ b/Dalamud/Interface/Internal/Windows/HitchSettingsWindow.cs @@ -1,7 +1,7 @@ using Dalamud.Configuration.Internal; using Dalamud.Interface.Windowing; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows; @@ -22,7 +22,7 @@ public class HitchSettingsWindow : Window this.ShowCloseButton = true; this.RespectCloseHotkey = true; } - + /// public override void Draw() { @@ -41,14 +41,14 @@ public class HitchSettingsWindow : Window config.FrameworkUpdateHitch = frameworkUpdateHitch; config.QueueSave(); } - + var gameNetworkUpHitch = (float)config.GameNetworkUpHitch; if (ImGui.SliderFloat("GameNetworkUpHitch", ref gameNetworkUpHitch, MinHitch, MaxHitch)) { config.GameNetworkUpHitch = gameNetworkUpHitch; config.QueueSave(); } - + var gameNetworkDownHitch = (float)config.GameNetworkDownHitch; if (ImGui.SliderFloat("GameNetworkDownHitch", ref gameNetworkDownHitch, MinHitch, MaxHitch)) { diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs index dfd37431c..33ba4fa12 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs @@ -34,7 +34,7 @@ using Dalamud.Plugin.Internal.Types.Manifest; using Dalamud.Support; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.PluginInstaller; diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs index ddb89d38c..2031fde40 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs @@ -14,7 +14,7 @@ using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin.Internal; using Dalamud.Plugin.Internal.Profiles; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; namespace Dalamud.Interface.Internal.Windows.PluginInstaller; @@ -56,11 +56,11 @@ internal class ProfileManagerWidget this.DrawChoice(); return; } - + var tutorialTitle = Locs.TutorialTitle + "###collectionsTutorWindow"; var tutorialId = ImGui.GetID(tutorialTitle); this.DrawTutorial(tutorialTitle); - + switch (this.mode) { case Mode.Overview: @@ -120,22 +120,22 @@ internal class ProfileManagerWidget ImGuiHelpers.SafeTextWrapped(Locs.TutorialParagraphFour); ImGuiHelpers.ScaledDummy(5); ImGuiHelpers.SafeTextWrapped(Locs.TutorialCommands); - + ImGui.Bullet(); ImGui.SameLine(); ImGuiHelpers.SafeTextWrapped(Locs.TutorialCommandsEnable); - + ImGui.Bullet(); ImGui.SameLine(); ImGuiHelpers.SafeTextWrapped(Locs.TutorialCommandsDisable); - + ImGui.Bullet(); ImGui.SameLine(); ImGuiHelpers.SafeTextWrapped(Locs.TutorialCommandsToggle); ImGuiHelpers.SafeTextWrapped(Locs.TutorialCommandsEnd); ImGuiHelpers.ScaledDummy(5); - + var buttonWidth = 120f; ImGui.SetCursorPosX((ImGui.GetWindowWidth() - buttonWidth) / 2); if (ImGui.Button("OK", new Vector2(buttonWidth, 40))) @@ -174,7 +174,7 @@ internal class ProfileManagerWidget { try { - profman.ImportProfile(ImGui.GetClipboardText()); + profman.ImportProfile(ImGui.GetClipboardTextS()); Service.Get().AddNotification(Locs.NotificationImportSuccess, type: NotificationType.Success); } catch (Exception ex) @@ -186,14 +186,14 @@ internal class ProfileManagerWidget if (ImGui.IsItemHovered()) ImGui.SetTooltip(Locs.ImportProfileHint); - + ImGui.SameLine(); ImGuiHelpers.ScaledDummy(5); ImGui.SameLine(); - + if (ImGuiComponents.IconButton(FontAwesomeIcon.Question)) ImGui.OpenPopup(tutorialId); - + if (ImGui.IsItemHovered()) ImGui.SetTooltip(Locs.TutorialHint); @@ -425,7 +425,7 @@ internal class ProfileManagerWidget ImGui.Image(pic.DevPluginIcon.ImGuiHandle, new Vector2(pluginLineHeight)); ImGui.PopStyleVar(); } - + ImGui.SameLine(); var text = $"{pmPlugin.Name}{(pmPlugin.IsDev ? " (dev plugin" : string.Empty)}"; @@ -448,12 +448,12 @@ internal class ProfileManagerWidget ImGui.SetCursorPosY(ImGui.GetCursorPosY() + (pluginLineHeight / 2) - (textHeight.Y / 2)); ImGui.TextUnformatted(text); - + var firstAvailableInstalled = pm.InstalledPlugins.FirstOrDefault(x => x.InternalName == profileEntry.InternalName); var installable = pm.AvailablePlugins.FirstOrDefault( x => x.InternalName == profileEntry.InternalName && !x.SourceRepo.IsThirdParty); - + if (firstAvailableInstalled != null) { ImGui.Text($"Match to plugin '{firstAvailableInstalled.Name}'?"); @@ -488,7 +488,7 @@ internal class ProfileManagerWidget if (ImGui.IsItemHovered()) ImGui.SetTooltip(Locs.InstallPlugin); } - + ImGui.SetCursorPos(before); } @@ -608,13 +608,13 @@ internal class ProfileManagerWidget public static string TutorialTitle => Loc.Localize("ProfileManagerTutorial", "About Collections"); - + public static string TutorialParagraphOne => Loc.Localize("ProfileManagerTutorialParagraphOne", "Collections are shareable lists of plugins that can be enabled or disabled in the plugin installer or via chat commands.\nWhen a plugin is part of a collection, it will be enabled if the collection is enabled. If a plugin is part of multiple collections, it will be enabled if one or more collections it is a part of are enabled."); - + public static string TutorialParagraphTwo => Loc.Localize("ProfileManagerTutorialParagraphTwo", "You can add plugins to collections by clicking the plus button when editing a collection on this screen, or by using the button with the toolbox icon on the \"Installed Plugins\" screen."); - + public static string TutorialParagraphThree => Loc.Localize("ProfileManagerTutorialParagraphThree", "If a collection's \"Start on boot\" checkbox is ticked, the collection and the plugins within will be enabled every time the game starts up, even if it has been manually disabled in a prior session."); @@ -623,25 +623,25 @@ internal class ProfileManagerWidget public static string TutorialCommands => Loc.Localize("ProfileManagerTutorialCommands", "You can use the following commands in chat or in macros to manage active collections:"); - + public static string TutorialCommandsEnable => Loc.Localize("ProfileManagerTutorialCommandsEnable", "{0} \"Collection Name\" - Enable a collection").Format(PluginManagementCommandHandler.CommandEnableProfile); public static string TutorialCommandsDisable => Loc.Localize("ProfileManagerTutorialCommandsDisable", "{0} \"Collection Name\" - Disable a collection").Format(PluginManagementCommandHandler.CommandDisableProfile); - + public static string TutorialCommandsToggle => Loc.Localize("ProfileManagerTutorialCommandsToggle", "{0} \"Collection Name\" - Toggle a collection's state").Format(PluginManagementCommandHandler.CommandToggleProfile); - + public static string TutorialCommandsEnd => Loc.Localize("ProfileManagerTutorialCommandsEnd", "If you run multiple of these commands, they will be executed in order."); public static string Choice1 => Loc.Localize("ProfileManagerChoice1", "Plugin collections are a new feature that allow you to group plugins into collections which can be toggled and shared."); - + public static string Choice2 => Loc.Localize("ProfileManagerChoice2", "They are experimental and may still contain bugs. Do you want to enable them now?"); - + public static string ChoiceConfirmation => Loc.Localize("ProfileManagerChoiceConfirmation", "Yes, enable Plugin Collections"); diff --git a/Dalamud/Interface/Internal/Windows/PluginStatWindow.cs b/Dalamud/Interface/Internal/Windows/PluginStatWindow.cs index eeafa98e7..554559910 100644 --- a/Dalamud/Interface/Internal/Windows/PluginStatWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginStatWindow.cs @@ -12,7 +12,7 @@ using Dalamud.Interface.Windowing; using Dalamud.Plugin.Internal; using Dalamud.Plugin.Internal.Types; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; namespace Dalamud.Interface.Internal.Windows; diff --git a/Dalamud/Interface/Internal/Windows/ProfilerWindow.cs b/Dalamud/Interface/Internal/Windows/ProfilerWindow.cs index 28dcdb117..036858c75 100644 --- a/Dalamud/Interface/Internal/Windows/ProfilerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/ProfilerWindow.cs @@ -8,7 +8,7 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Windowing; using Dalamud.Utility.Numerics; using Dalamud.Utility.Timing; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows; @@ -192,7 +192,7 @@ public class ProfilerWindow : Window var eventsXPos = new List(); const float eventsXPosFudge = 5f; - + foreach (var timingEvent in Timings.Events) { var startX = (timingEvent.StartTime - this.min) / (this.max - this.min) * width; @@ -217,7 +217,7 @@ public class ProfilerWindow : Window { textPos.X = pos.X + (uint)startX - textSize.X - padding; } - + var numClashes = eventsXPos.Count(x => Math.Abs(x - textPos.X) < textSize.X + eventsXPosFudge); if (numClashes > 0) { @@ -228,7 +228,7 @@ public class ProfilerWindow : Window textPos, ImGui.GetColorU32(ImGuiColors.DalamudWhite), timingEvent.Name); - + eventsXPos.Add(textPos.X); } } diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/SelfTestWindow.cs b/Dalamud/Interface/Internal/Windows/SelfTest/SelfTestWindow.cs index b6f08edf6..a678f8d4f 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/SelfTestWindow.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/SelfTestWindow.cs @@ -9,7 +9,7 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Windowing; using Dalamud.Logging.Internal; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Excel.Sheets; namespace Dalamud.Interface.Internal.Windows.SelfTest; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ActorTableSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ActorTableSelfTestStep.cs index f246cb940..2c1a7faab 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ActorTableSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ActorTableSelfTestStep.cs @@ -1,6 +1,6 @@ using Dalamud.Game.ClientState.Objects; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/AddonLifecycleSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/AddonLifecycleSelfTestStep.cs index 458edfaff..230bf90e2 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/AddonLifecycleSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/AddonLifecycleSelfTestStep.cs @@ -3,7 +3,7 @@ using Dalamud.Game.Addon.Lifecycle; using Dalamud.Game.Addon.Lifecycle.AddonArgTypes; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/AetheryteListSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/AetheryteListSelfTestStep.cs index 207f718ff..4ae43729e 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/AetheryteListSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/AetheryteListSelfTestStep.cs @@ -1,6 +1,6 @@ using Dalamud.Game.ClientState.Aetherytes; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ChatSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ChatSelfTestStep.cs index 8ab1809ad..0b7dbaa67 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ChatSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ChatSelfTestStep.cs @@ -2,7 +2,7 @@ using Dalamud.Game.Gui; using Dalamud.Game.Text; using Dalamud.Game.Text.SeStringHandling; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ConditionSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ConditionSelfTestStep.cs index 2d49fbdcd..ddd079559 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ConditionSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ConditionSelfTestStep.cs @@ -1,6 +1,6 @@ using Dalamud.Game.ClientState.Conditions; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ContextMenuSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ContextMenuSelfTestStep.cs index 0e2f61aba..92004b9f0 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ContextMenuSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ContextMenuSelfTestStep.cs @@ -7,7 +7,7 @@ using Dalamud.Game.ClientState.Objects.SubKinds; using Dalamud.Game.Gui.ContextMenu; using Dalamud.Game.Text; using Dalamud.Game.Text.SeStringHandling; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Excel; using Lumina.Excel.Sheets; using Serilog; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/DutyStateSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/DutyStateSelfTestStep.cs index 4c33347fc..44a448fbb 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/DutyStateSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/DutyStateSelfTestStep.cs @@ -1,6 +1,6 @@ using Dalamud.Game.DutyState; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/EnterTerritorySelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/EnterTerritorySelfTestStep.cs index 04c8eda5e..f81be3150 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/EnterTerritorySelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/EnterTerritorySelfTestStep.cs @@ -1,6 +1,6 @@ using Dalamud.Game.ClientState; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/FateTableSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/FateTableSelfTestStep.cs index 982633dcb..edaa2febe 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/FateTableSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/FateTableSelfTestStep.cs @@ -1,6 +1,6 @@ using Dalamud.Game.ClientState.Fates; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/GameConfigSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/GameConfigSelfTestStep.cs index 440ec9f5d..3a4c5e2ac 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/GameConfigSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/GameConfigSelfTestStep.cs @@ -1,6 +1,6 @@ using Dalamud.Game.Config; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/HoverSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/HoverSelfTestStep.cs index 85b5d3784..7c6a7951b 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/HoverSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/HoverSelfTestStep.cs @@ -1,6 +1,6 @@ using Dalamud.Game.Gui; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ItemPayloadSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ItemPayloadSelfTestStep.cs index 0988413b0..9e02742fe 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ItemPayloadSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ItemPayloadSelfTestStep.cs @@ -2,7 +2,7 @@ using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/KeyStateSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/KeyStateSelfTestStep.cs index 667f3adc4..e80aece76 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/KeyStateSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/KeyStateSelfTestStep.cs @@ -1,6 +1,6 @@ using Dalamud.Game.ClientState.Keys; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/LoginEventSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/LoginEventSelfTestStep.cs index 9540c636a..876722d8c 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/LoginEventSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/LoginEventSelfTestStep.cs @@ -1,6 +1,6 @@ using Dalamud.Game.ClientState; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/LogoutEventSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/LogoutEventSelfTestStep.cs index 13bcfcf35..b15fcb42c 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/LogoutEventSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/LogoutEventSelfTestStep.cs @@ -1,6 +1,6 @@ using Dalamud.Game.ClientState; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/MarketBoardSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/MarketBoardSelfTestStep.cs index 4a6dd185f..ec5b57fb9 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/MarketBoardSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/MarketBoardSelfTestStep.cs @@ -3,7 +3,7 @@ using System.Linq; using Dalamud.Game.MarketBoard; using Dalamud.Game.Network.Structures; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/NamePlateSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/NamePlateSelfTestStep.cs index e7ce8e42a..440819b67 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/NamePlateSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/NamePlateSelfTestStep.cs @@ -4,7 +4,7 @@ using Dalamud.Game.Gui.NamePlate; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/NounProcessorSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/NounProcessorSelfTestStep.cs index 7319eec7b..7a95f66ba 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/NounProcessorSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/NounProcessorSelfTestStep.cs @@ -2,7 +2,7 @@ using Dalamud.Game; using Dalamud.Game.Text.Noun; using Dalamud.Game.Text.Noun.Enums; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using LSheets = Lumina.Excel.Sheets; @@ -212,7 +212,7 @@ internal class NounProcessorSelfTestStep : ISelfTestStep for (var i = 0; i < this.tests.Length; i++) { var e = this.tests[i]; - + var nounParams = new NounParams() { SheetName = e.SheetName, diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/PartyFinderSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/PartyFinderSelfTestStep.cs index 475412e70..e8746c8b2 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/PartyFinderSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/PartyFinderSelfTestStep.cs @@ -1,7 +1,7 @@ using Dalamud.Game.Gui.PartyFinder; using Dalamud.Game.Gui.PartyFinder.Types; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/SeStringEvaluatorSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/SeStringEvaluatorSelfTestStep.cs index 423a56172..329c96990 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/SeStringEvaluatorSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/SeStringEvaluatorSelfTestStep.cs @@ -1,7 +1,7 @@ using Dalamud.Game.ClientState; using Dalamud.Game.Text.Evaluator; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Text.ReadOnly; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/SheetRedirectResolverSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/SheetRedirectResolverSelfTestStep.cs index 6ab08cd91..cb9782d5e 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/SheetRedirectResolverSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/SheetRedirectResolverSelfTestStep.cs @@ -6,7 +6,7 @@ using Dalamud.Game.Text.Evaluator.Internal; using FFXIVClientStructs.FFXIV.Client.System.String; using FFXIVClientStructs.FFXIV.Client.UI.Misc; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/TargetSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/TargetSelfTestStep.cs index b56b08ed5..ae074c4f3 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/TargetSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/TargetSelfTestStep.cs @@ -2,7 +2,7 @@ using Dalamud.Game.ClientState.Objects; using Dalamud.Game.ClientState.Objects.SubKinds; using Dalamud.Game.ClientState.Objects.Types; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ToastSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ToastSelfTestStep.cs index cd34fa30b..19b13f4a5 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ToastSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/ToastSelfTestStep.cs @@ -1,6 +1,6 @@ using Dalamud.Game.Gui.Toast; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; diff --git a/Dalamud/Interface/Internal/Windows/Settings/SettingsWindow.cs b/Dalamud/Interface/Internal/Windows/Settings/SettingsWindow.cs index c678dff10..2548ef2ce 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/SettingsWindow.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/SettingsWindow.cs @@ -12,7 +12,7 @@ using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Windowing; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Settings; @@ -42,7 +42,7 @@ internal class SettingsWindow : Window }; this.SizeCondition = ImGuiCond.FirstUseEver; - + this.tabs = [ new SettingsTabGeneral(), @@ -143,7 +143,7 @@ internal class SettingsWindow : Window flags |= ImGuiTabItemFlags.SetSelected; this.setActiveTab = null; } - + using var tab = ImRaii.TabItem(settingsTab.Title, flags); if (tab) { diff --git a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabAbout.cs b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabAbout.cs index 428be05c2..55ea3638c 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabAbout.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabAbout.cs @@ -15,7 +15,7 @@ using Dalamud.Plugin.Internal; using Dalamud.Storage.Assets; using Dalamud.Utility; using FFXIVClientStructs.FFXIV.Client.Game.UI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Settings.Tabs; diff --git a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabAutoUpdate.cs b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabAutoUpdate.cs index 9356131ad..66e3aa2ed 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabAutoUpdate.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabAutoUpdate.cs @@ -14,7 +14,7 @@ using Dalamud.Plugin.Internal; using Dalamud.Plugin.Internal.AutoUpdate; using Dalamud.Plugin.Internal.Types; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Settings.Tabs; diff --git a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabDtr.cs b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabDtr.cs index d1040b5b2..5a7ad82ab 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabDtr.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabDtr.cs @@ -10,7 +10,7 @@ using Dalamud.Interface.Colors; using Dalamud.Interface.Components; using Dalamud.Interface.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Settings.Tabs; diff --git a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabLook.cs b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabLook.cs index 7f75dbf29..6db8cb6d1 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabLook.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabLook.cs @@ -16,7 +16,7 @@ using Dalamud.Interface.Internal.Windows.Settings.Widgets; using Dalamud.Interface.ManagedFontAtlas.Internals; using Dalamud.Interface.Utility; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; namespace Dalamud.Interface.Internal.Windows.Settings.Tabs; @@ -182,7 +182,7 @@ public class SettingsTabLook : SettingsTab var buttonSize = GlobalUiScalePresets - .Select(x => ImGui.CalcTextSize(x.Item1, 0, x.Item1.IndexOf('#'))) + .Select(x => ImGui.CalcTextSize(x.Item1, true)) .Aggregate(Vector2.Zero, Vector2.Max) + (ImGui.GetStyle().FramePadding * 2); foreach (var (buttonLabel, scale) in GlobalUiScalePresets) @@ -204,7 +204,7 @@ public class SettingsTabLook : SettingsTab var len = Encoding.UTF8.GetByteCount(buildingFonts); var p = stackalloc byte[len]; Encoding.UTF8.GetBytes(buildingFonts, new(p, len)); - ImGuiNative.igTextUnformatted(p, (p + len + ((Environment.TickCount / 200) % 3)) - 2); + ImGui.TextUnformatted(p, (p + len + ((Environment.TickCount / 200) % 3)) - 2); } } diff --git a/Dalamud/Interface/Internal/Windows/Settings/Widgets/ButtonSettingsEntry.cs b/Dalamud/Interface/Internal/Windows/Settings/Widgets/ButtonSettingsEntry.cs index 6bce2a451..a7f546390 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Widgets/ButtonSettingsEntry.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Widgets/ButtonSettingsEntry.cs @@ -2,7 +2,7 @@ using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Settings.Widgets; diff --git a/Dalamud/Interface/Internal/Windows/Settings/Widgets/DevPluginsSettingsEntry.cs b/Dalamud/Interface/Internal/Windows/Settings/Widgets/DevPluginsSettingsEntry.cs index 4c5dc8b83..4b8e50890 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Widgets/DevPluginsSettingsEntry.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Widgets/DevPluginsSettingsEntry.cs @@ -15,7 +15,7 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin.Internal; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Settings.Widgets; diff --git a/Dalamud/Interface/Internal/Windows/Settings/Widgets/EnumSettingsEntry{T}.cs b/Dalamud/Interface/Internal/Windows/Settings/Widgets/EnumSettingsEntry{T}.cs index f40654542..a6fedc4c0 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Widgets/EnumSettingsEntry{T}.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Widgets/EnumSettingsEntry{T}.cs @@ -8,7 +8,7 @@ using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Settings.Widgets; diff --git a/Dalamud/Interface/Internal/Windows/Settings/Widgets/GapSettingsEntry.cs b/Dalamud/Interface/Internal/Windows/Settings/Widgets/GapSettingsEntry.cs index 1db3c4756..58e4984e4 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Widgets/GapSettingsEntry.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Widgets/GapSettingsEntry.cs @@ -1,7 +1,7 @@ using System.Diagnostics.CodeAnalysis; using Dalamud.Interface.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Settings.Widgets; diff --git a/Dalamud/Interface/Internal/Windows/Settings/Widgets/LanguageChooserSettingsEntry.cs b/Dalamud/Interface/Internal/Windows/Settings/Widgets/LanguageChooserSettingsEntry.cs index cb79000d2..816a34f0a 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Widgets/LanguageChooserSettingsEntry.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Widgets/LanguageChooserSettingsEntry.cs @@ -7,7 +7,7 @@ using Dalamud.Configuration.Internal; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Settings.Widgets; diff --git a/Dalamud/Interface/Internal/Windows/Settings/Widgets/SettingsEntry{T}.cs b/Dalamud/Interface/Internal/Windows/Settings/Widgets/SettingsEntry{T}.cs index cffe0a5da..751e262ef 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Widgets/SettingsEntry{T}.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Widgets/SettingsEntry{T}.cs @@ -8,7 +8,7 @@ using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Settings.Widgets; diff --git a/Dalamud/Interface/Internal/Windows/Settings/Widgets/ThirdRepoSettingsEntry.cs b/Dalamud/Interface/Internal/Windows/Settings/Widgets/ThirdRepoSettingsEntry.cs index 1d6aab1bd..d63718fa3 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Widgets/ThirdRepoSettingsEntry.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Widgets/ThirdRepoSettingsEntry.cs @@ -13,7 +13,7 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin.Internal; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Internal.Windows.Settings.Widgets; @@ -30,7 +30,7 @@ public class ThirdRepoSettingsEntry : SettingsEntry { this.timeSinceOpened = DateTime.Now; } - + public override void OnClose() { this.thirdRepoList = @@ -59,7 +59,7 @@ public class ThirdRepoSettingsEntry : SettingsEntry public override void Draw() { var config = Service.Get(); - + using var id = ImRaii.PushId("thirdRepo"); ImGui.TextUnformatted(Loc.Localize("DalamudSettingsCustomRepo", "Custom Plugin Repositories")); if (this.thirdRepoListChanged) @@ -70,14 +70,14 @@ public class ThirdRepoSettingsEntry : SettingsEntry ImGui.TextUnformatted(Loc.Localize("DalamudSettingsChanged", "(Changed)")); } } - + ImGuiHelpers.SafeTextColoredWrapped(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingCustomRepoHint", "Add custom plugin repositories.")); - + ImGuiHelpers.ScaledDummy(2); config.ThirdRepoSpeedbumpDismissed ??= config.ThirdRepoList.Any(x => x.IsEnabled); var disclaimerDismissed = config.ThirdRepoSpeedbumpDismissed.Value; - + ImGui.PushFont(InterfaceManager.IconFont); ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudOrange); ImGuiHelpers.SafeTextWrapped(FontAwesomeIcon.ExclamationTriangle.ToIconString()); @@ -100,7 +100,7 @@ public class ThirdRepoSettingsEntry : SettingsEntry ImGuiHelpers.SafeTextWrapped(Loc.Localize("DalamudSettingCustomRepoWarning3", "Please make absolutely sure that you only install plugins from developers you trust.")); ImGui.PopStyleColor(); - + if (!disclaimerDismissed) { const int speedbumpTime = 15; @@ -121,7 +121,7 @@ public class ThirdRepoSettingsEntry : SettingsEntry } } } - + ImGuiHelpers.ScaledDummy(2); using var disabled = ImRaii.Disabled(!disclaimerDismissed); diff --git a/Dalamud/Interface/Internal/Windows/StyleEditor/StyleEditorWindow.cs b/Dalamud/Interface/Internal/Windows/StyleEditor/StyleEditorWindow.cs index ceb009139..ae01dab36 100644 --- a/Dalamud/Interface/Internal/Windows/StyleEditor/StyleEditorWindow.cs +++ b/Dalamud/Interface/Internal/Windows/StyleEditor/StyleEditorWindow.cs @@ -11,7 +11,7 @@ using Dalamud.Interface.Style; using Dalamud.Interface.Utility; using Dalamud.Interface.Windowing; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; @@ -112,7 +112,7 @@ public class StyleEditorWindow : Window if (isBuiltinStyle) ImGui.BeginDisabled(); - + if (ImGuiComponents.IconButton(FontAwesomeIcon.Trash) && this.currentSel != 0) { this.currentSel--; @@ -157,7 +157,7 @@ public class StyleEditorWindow : Window if (ImGui.IsItemHovered()) ImGui.SetTooltip(Loc.Localize("StyleEditorCopy", "Copy style to clipboard for sharing")); - + if (isBuiltinStyle) ImGui.EndDisabled(); @@ -167,7 +167,7 @@ public class StyleEditorWindow : Window { this.SaveStyle(); - var styleJson = ImGui.GetClipboardText(); + var styleJson = ImGui.GetClipboardTextS(); try { @@ -288,7 +288,7 @@ public class StyleEditorWindow : Window foreach (var imGuiCol in Enum.GetValues()) { - if (imGuiCol == ImGuiCol.COUNT) + if (imGuiCol == ImGuiCol.Count) continue; ImGui.PushID(imGuiCol.ToString()); diff --git a/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs b/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs index cbb6998ac..2b0284b68 100644 --- a/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs +++ b/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs @@ -24,7 +24,7 @@ using Dalamud.Utility; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Text.ReadOnly; diff --git a/Dalamud/Interface/ManagedFontAtlas/FontAtlasBuildStep.cs b/Dalamud/Interface/ManagedFontAtlas/FontAtlasBuildStep.cs index dcfcc32e3..652b677b7 100644 --- a/Dalamud/Interface/ManagedFontAtlas/FontAtlasBuildStep.cs +++ b/Dalamud/Interface/ManagedFontAtlas/FontAtlasBuildStep.cs @@ -1,5 +1,3 @@ -using ImGuiNET; - namespace Dalamud.Interface.ManagedFontAtlas; /// diff --git a/Dalamud/Interface/ManagedFontAtlas/FontAtlasBuildToolkitUtilities.cs b/Dalamud/Interface/ManagedFontAtlas/FontAtlasBuildToolkitUtilities.cs index 3b8bfd965..2e497b6cd 100644 --- a/Dalamud/Interface/ManagedFontAtlas/FontAtlasBuildToolkitUtilities.cs +++ b/Dalamud/Interface/ManagedFontAtlas/FontAtlasBuildToolkitUtilities.cs @@ -2,10 +2,9 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Text.Unicode; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Utility; -using ImGuiNET; - namespace Dalamud.Interface.ManagedFontAtlas; /// @@ -42,7 +41,7 @@ public static class FontAtlasBuildToolkitUtilities default(FluentGlyphRangeBuilder).With(range); /// - /// Compiles given s into an array of containing ImGui glyph ranges. + /// Compiles given s into an array of containing ImGui glyph ranges. /// /// The chars. /// Add fallback codepoints to the range. @@ -56,7 +55,7 @@ public static class FontAtlasBuildToolkitUtilities enumerable.BeginGlyphRange().Build(addFallbackCodepoints, addEllipsisCodepoints); /// - /// Compiles given s into an array of containing ImGui glyph ranges. + /// Compiles given s into an array of containing ImGui glyph ranges. /// /// The chars. /// Add fallback codepoints to the range. @@ -70,7 +69,7 @@ public static class FontAtlasBuildToolkitUtilities span.BeginGlyphRange().Build(addFallbackCodepoints, addEllipsisCodepoints); /// - /// Compiles given string into an array of containing ImGui glyph ranges. + /// Compiles given string into an array of containing ImGui glyph ranges. /// /// The string. /// Add fallback codepoints to the range. @@ -93,10 +92,11 @@ public static class FontAtlasBuildToolkitUtilities /// The relevant config pointer, or empty config pointer if not found. public static unsafe ImFontConfigPtr FindConfigPtr(this IFontAtlasBuildToolkit toolkit, ImFontPtr fontPtr) { - foreach (ref var c in toolkit.NewImAtlas.ConfigDataWrapped().DataSpan) + for (var i = 0; i < toolkit.NewImAtlas.ConfigData.Size; i++) { - if (c.DstFont == fontPtr.NativePtr) - return new((nint)Unsafe.AsPointer(ref c)); + var c = toolkit.NewImAtlas.ConfigData[i]; + if (c.DstFont == fontPtr.Handle) + return new((ImFontConfig*)Unsafe.AsPointer(ref c)); } return default; diff --git a/Dalamud/Interface/ManagedFontAtlas/FontScaleMode.cs b/Dalamud/Interface/ManagedFontAtlas/FontScaleMode.cs index b30d5c26c..47751e12d 100644 --- a/Dalamud/Interface/ManagedFontAtlas/FontScaleMode.cs +++ b/Dalamud/Interface/ManagedFontAtlas/FontScaleMode.cs @@ -1,7 +1,6 @@ +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Utility; -using ImGuiNET; - namespace Dalamud.Interface.ManagedFontAtlas; /// @@ -15,14 +14,14 @@ public enum FontScaleMode /// Note that bitmap fonts and game fonts will always look blurry if they're not in their original sizes. /// Default, - + /// /// Do nothing with the font. Dalamud will load the font with the size that is exactly as specified. /// On drawing, the font will look blurry due to stretching. /// Intended for use with custom scale handling. /// SkipHandling, - + /// /// Stretch the glyphs of the loaded font by the inverse of the global scale. /// On drawing, the font will always render exactly as the requested size without blurring, as long as diff --git a/Dalamud/Interface/ManagedFontAtlas/IFontAtlas.cs b/Dalamud/Interface/ManagedFontAtlas/IFontAtlas.cs index d622fbbb2..8047df0d6 100644 --- a/Dalamud/Interface/ManagedFontAtlas/IFontAtlas.cs +++ b/Dalamud/Interface/ManagedFontAtlas/IFontAtlas.cs @@ -1,10 +1,9 @@ using System.Threading.Tasks; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.GameFonts; using Dalamud.Interface.Utility; -using ImGuiNET; - namespace Dalamud.Interface.ManagedFontAtlas; /// @@ -39,7 +38,7 @@ public interface IFontAtlas : IDisposable string Name { get; } /// - /// Gets a value how the atlas should be rebuilt when the relevant Dalamud Configuration changes. + /// Gets a value how the atlas should be rebuilt when the relevant Dalamud Configuration changes. /// FontAtlasAutoRebuildMode AutoRebuildMode { get; } @@ -153,7 +152,7 @@ public interface IFontAtlas : IDisposable void BuildFontsImmediately(); /// - /// Rebuilds fonts asynchronously, on any thread. + /// Rebuilds fonts asynchronously, on any thread. /// /// The task. /// If is . diff --git a/Dalamud/Interface/ManagedFontAtlas/IFontAtlasBuildToolkit.cs b/Dalamud/Interface/ManagedFontAtlas/IFontAtlasBuildToolkit.cs index ae996a39c..6dbd45c01 100644 --- a/Dalamud/Interface/ManagedFontAtlas/IFontAtlasBuildToolkit.cs +++ b/Dalamud/Interface/ManagedFontAtlas/IFontAtlasBuildToolkit.cs @@ -1,9 +1,8 @@ using System.Runtime.InteropServices; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Utility; -using ImGuiNET; - namespace Dalamud.Interface.ManagedFontAtlas; /// diff --git a/Dalamud/Interface/ManagedFontAtlas/IFontAtlasBuildToolkitPostBuild.cs b/Dalamud/Interface/ManagedFontAtlas/IFontAtlasBuildToolkitPostBuild.cs index c09285fce..32a096909 100644 --- a/Dalamud/Interface/ManagedFontAtlas/IFontAtlasBuildToolkitPostBuild.cs +++ b/Dalamud/Interface/ManagedFontAtlas/IFontAtlasBuildToolkitPostBuild.cs @@ -1,8 +1,6 @@ -using Dalamud.Interface.Internal; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Textures.TextureWraps; -using ImGuiNET; - namespace Dalamud.Interface.ManagedFontAtlas; /// diff --git a/Dalamud/Interface/ManagedFontAtlas/IFontAtlasBuildToolkitPreBuild.cs b/Dalamud/Interface/ManagedFontAtlas/IFontAtlasBuildToolkitPreBuild.cs index babe17fdd..ed6f14156 100644 --- a/Dalamud/Interface/ManagedFontAtlas/IFontAtlasBuildToolkitPreBuild.cs +++ b/Dalamud/Interface/ManagedFontAtlas/IFontAtlasBuildToolkitPreBuild.cs @@ -2,12 +2,10 @@ using System.IO; using System.Runtime.InteropServices; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.FontIdentifier; using Dalamud.Interface.GameFonts; using Dalamud.Interface.Utility; -using Dalamud.Utility; - -using ImGuiNET; using TerraFX.Interop.DirectX; @@ -211,7 +209,7 @@ public interface IFontAtlasBuildToolkitPreBuild : IFontAtlasBuildToolkit /// /// The font style, in range from 0 to 2. 0 is normal. /// - /// May do nothing at all if is unsupported by Dalamud font handler. + /// May do nothing at all if is unsupported by Dalamud font handler. /// See /// Microsoft /// Learn for the fonts. diff --git a/Dalamud/Interface/ManagedFontAtlas/IFontHandle.cs b/Dalamud/Interface/ManagedFontAtlas/IFontHandle.cs index 803f6b82c..82d3e0999 100644 --- a/Dalamud/Interface/ManagedFontAtlas/IFontHandle.cs +++ b/Dalamud/Interface/ManagedFontAtlas/IFontHandle.cs @@ -1,7 +1,5 @@ using System.Threading.Tasks; -using ImGuiNET; - namespace Dalamud.Interface.ManagedFontAtlas; /// @@ -58,7 +56,7 @@ public interface IFontHandle : IDisposable /// A disposable object that will pop the font on dispose. /// If called outside of the main thread. /// - /// This function uses , and may do extra things. + /// This function uses , and may do extra things. /// Use or to undo this operation. /// Do not use . /// @@ -77,7 +75,7 @@ public interface IFontHandle : IDisposable /// Push a font between two choices. /// /// using ((someCondition ? myFontHandle : dalamudPluginInterface.UiBuilder.MonoFontHandle).Push()) - /// ImGui.TextUnformatted("Test 3"); + /// ImGui.TextUnformatted("Test 3"); /// /// IDisposable Push(); diff --git a/Dalamud/Interface/ManagedFontAtlas/ILockedImFont.cs b/Dalamud/Interface/ManagedFontAtlas/ILockedImFont.cs index a4cc3afa7..b59f15485 100644 --- a/Dalamud/Interface/ManagedFontAtlas/ILockedImFont.cs +++ b/Dalamud/Interface/ManagedFontAtlas/ILockedImFont.cs @@ -1,4 +1,4 @@ -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.ManagedFontAtlas; diff --git a/Dalamud/Interface/ManagedFontAtlas/Internals/DelegateFontHandle.cs b/Dalamud/Interface/ManagedFontAtlas/Internals/DelegateFontHandle.cs index 52939385b..2f9c9fa7c 100644 --- a/Dalamud/Interface/ManagedFontAtlas/Internals/DelegateFontHandle.cs +++ b/Dalamud/Interface/ManagedFontAtlas/Internals/DelegateFontHandle.cs @@ -5,7 +5,7 @@ using Dalamud.Interface.Utility; using Dalamud.Logging.Internal; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.ManagedFontAtlas.Internals; @@ -177,7 +177,7 @@ internal sealed class DelegateFontHandle : FontHandle { for (var i = fontCountPrevious; !found && i < fontsVector.Length; i++) { - if (fontsVector[i].NativePtr == toolkitPreBuild.Font.NativePtr) + if (fontsVector[i].Handle == toolkitPreBuild.Font.Handle) found = true; } } @@ -223,7 +223,7 @@ internal sealed class DelegateFontHandle : FontHandle { unsafe { - if (fontsVector[i].NativePtr == fontsVector[j].NativePtr) + if (fontsVector[i].Handle == fontsVector[j].Handle) throw new InvalidOperationException("An already added font has been added again."); } } @@ -247,7 +247,7 @@ internal sealed class DelegateFontHandle : FontHandle { var distinct = fontsVector - .DistinctBy(x => (nint)x.NativePtr) // Remove duplicates + .DistinctBy(x => (nint)x.Handle) // Remove duplicates .Where(x => x.ValidateUnsafe() is null) // Remove invalid entries without freeing them .ToArray(); @@ -259,7 +259,7 @@ internal sealed class DelegateFontHandle : FontHandle } } - /// + /// public void OnPreBuildCleanup(IFontAtlasBuildToolkitPreBuild toolkitPreBuild) { // irrelevant diff --git a/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.BuildToolkit.cs b/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.BuildToolkit.cs index 955b10892..8f77b8084 100644 --- a/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.BuildToolkit.cs +++ b/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.BuildToolkit.cs @@ -15,7 +15,7 @@ using Dalamud.Interface.Utility; using Dalamud.Storage.Assets; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using SharpDX.DXGI; @@ -155,7 +155,7 @@ internal sealed partial class FontAtlasFactory Log.Verbose( "[{name}] 0x{atlas:X}: {funcname}(0x{dataPointer:X}, 0x{dataSize:X}, ...) from {tag}", this.data.Owner?.Name ?? "(error)", - (nint)this.NewImAtlas.NativePtr, + (nint)this.NewImAtlas.Handle, nameof(this.AddFontFromImGuiHeapAllocatedMemory), (nint)dataPointer, dataSize, @@ -169,7 +169,7 @@ internal sealed partial class FontAtlasFactory var raw = fontConfig.Raw with { FontData = dataPointer, - FontDataOwnedByAtlas = 1, + FontDataOwnedByAtlas = true, FontDataSize = dataSize, }; @@ -181,7 +181,7 @@ internal sealed partial class FontAtlasFactory TrueTypeUtils.CheckImGuiCompatibleOrThrow(raw); - font = this.NewImAtlas.AddFont(&raw); + font = this.NewImAtlas.AddFont(raw); var dataHash = default(HashCode); dataHash.AddBytes(new(dataPointer, dataSize)); @@ -222,7 +222,7 @@ internal sealed partial class FontAtlasFactory { // Note that for both RemoveAt calls, corresponding destructors will be called. - var configIndex = this.data.ConfigData.FindIndex(x => x.DstFont == font.NativePtr); + var configIndex = this.data.ConfigData.FindIndex(x => x.DstFont == font.Handle); if (configIndex >= 0) this.data.ConfigData.RemoveAt(configIndex); @@ -233,7 +233,7 @@ internal sealed partial class FontAtlasFactory // ImFontConfig has no destructor, and does not free the data. if (freeOnException) - ImGuiNative.igMemFree(dataPointer); + ImGui.MemFree(dataPointer); throw; } @@ -279,7 +279,7 @@ internal sealed partial class FontAtlasFactory } catch { - ImGuiNative.igMemFree(memory); + ImGui.MemFree(memory); throw; } } @@ -304,7 +304,7 @@ internal sealed partial class FontAtlasFactory } catch { - ImGuiNative.igMemFree(memory); + ImGui.MemFree(memory); throw; } } @@ -653,7 +653,7 @@ internal sealed partial class FontAtlasFactory foreach (var c in FallbackCodepoints) { var g = font.FindGlyphNoFallback(c); - if (g.NativePtr == null) + if (g == null) continue; font.UpdateFallbackChar(c); @@ -663,7 +663,7 @@ internal sealed partial class FontAtlasFactory foreach (var c in EllipsisCodepoints) { var g = font.FindGlyphNoFallback(c); - if (g.NativePtr == null) + if (g == null) continue; font.EllipsisChar = c; @@ -699,8 +699,8 @@ internal sealed partial class FontAtlasFactory { ref var texture = ref textureSpan[i]; var name = - $"{nameof(FontAtlasBuiltData)}[{this.data.Owner?.Name ?? "-"}][0x{(long)this.data.Atlas.NativePtr:X}][{i}]"; - if (texture.TexID != 0) + $"{nameof(FontAtlasBuiltData)}[{this.data.Owner?.Name ?? "-"}][0x{(long)this.data.Atlas.Handle:X}][{i}]"; + if (!texture.TexID.IsNull) { // Nothing to do } @@ -769,9 +769,9 @@ internal sealed partial class FontAtlasFactory } if (texture.TexPixelsRGBA32 is not null) - ImGuiNative.igMemFree(texture.TexPixelsRGBA32); + ImGui.MemFree(texture.TexPixelsRGBA32); if (texture.TexPixelsAlpha8 is not null) - ImGuiNative.igMemFree(texture.TexPixelsAlpha8); + ImGui.MemFree(texture.TexPixelsAlpha8); texture.TexPixelsRGBA32 = null; texture.TexPixelsAlpha8 = null; } @@ -795,8 +795,8 @@ internal sealed partial class FontAtlasFactory var targetFound = false; foreach (var f in this.Fonts) { - sourceFound |= f.NativePtr == source.NativePtr; - targetFound |= f.NativePtr == target.NativePtr; + sourceFound |= f.Handle == source.Handle; + targetFound |= f.Handle == target.Handle; } if (sourceFound && targetFound) @@ -817,8 +817,8 @@ internal sealed partial class FontAtlasFactory public unsafe void BuildLookupTable(ImFontPtr font) { // Need to clear previous Fallback pointers before BuildLookupTable, or it may crash - font.NativePtr->FallbackGlyph = null; - font.NativePtr->FallbackHotData = null; + font.Handle->FallbackGlyph = null; + font.Handle->FallbackHotData = null; font.BuildLookupTable(); // Need to fix our custom ImGui, so that imgui_widgets.cpp:3656 stops thinking @@ -826,7 +826,7 @@ internal sealed partial class FontAtlasFactory // Otherwise, having a fallback character in ImGui.InputText gets strange. var indexedHotData = font.IndexedHotDataWrapped(); var indexLookup = font.IndexLookupWrapped(); - ref var fallbackHotData = ref *(ImGuiHelpers.ImFontGlyphHotDataReal*)font.NativePtr->FallbackHotData; + ref var fallbackHotData = ref *(ImGuiHelpers.ImFontGlyphHotDataReal*)font.Handle->FallbackHotData; for (var codepoint = 0; codepoint < indexedHotData.Length; codepoint++) { if (indexLookup[codepoint] == ushort.MaxValue) diff --git a/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.Implementation.cs b/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.Implementation.cs index 853556239..5fe94287f 100644 --- a/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.Implementation.cs +++ b/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.Implementation.cs @@ -8,6 +8,7 @@ using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.GameFonts; using Dalamud.Interface.Textures.TextureWraps; using Dalamud.Interface.Utility; @@ -15,8 +16,6 @@ using Dalamud.Logging.Internal; using Dalamud.Plugin.Internal.Types; using Dalamud.Utility; -using ImGuiNET; - using JetBrains.Annotations; namespace Dalamud.Interface.ManagedFontAtlas.Internals; @@ -73,12 +72,12 @@ internal sealed partial class FontAtlasFactory var wrapsCopy = this.wraps = new(); this.Garbage.Add(() => wrapsCopy.Clear()); - var atlasPtr = ImGuiNative.ImFontAtlas_ImFontAtlas(); + var atlasPtr = ImGui.ImFontAtlas(); this.Atlas = atlasPtr; - if (this.Atlas.NativePtr is null) + if (this.Atlas.Handle is null) throw new OutOfMemoryException($"Failed to allocate a new {nameof(ImFontAtlas)}."); - this.Garbage.Add(() => ImGuiNative.ImFontAtlas_destroy(atlasPtr)); + this.Garbage.Add(() => this.Atlas.Destroy()); this.IsBuildInProgress = true; Interlocked.Increment(ref numActiveInstances); @@ -188,7 +187,7 @@ internal sealed partial class FontAtlasFactory case IRefCountable.RefCountResult.FinalRelease: #if VeryVerboseLog - Log.Verbose("[{name}] 0x{ptr:X}: Disposing", this.Owner?.Name ?? "", (nint)this.Atlas.NativePtr); + Log.Verbose("[{name}] 0x{ptr:X}: Disposing", this.Owner?.Name ?? "", (nint)this.Atlas.Handle); #endif if (this.IsBuildInProgress) @@ -199,7 +198,7 @@ internal sealed partial class FontAtlasFactory "[{name}] 0x{ptr:X}: Trying to dispose while build is in progress; disposing later.\n" + "Stack:\n{trace}", this.Owner?.Name ?? "", - (nint)this.Atlas.NativePtr, + (nint)this.Atlas.Handle, new StackTrace()); } @@ -371,7 +370,7 @@ internal sealed partial class FontAtlasFactory public Task BuildTask => this.buildTask; /// - public bool HasBuiltAtlas => !(this.builtData?.Atlas.IsNull() ?? true); + public bool HasBuiltAtlas => !(this.builtData?.Atlas.IsNull ?? true); /// public bool IsGlobalScaled { get; } @@ -568,7 +567,7 @@ internal sealed partial class FontAtlasFactory } var res = await this.RebuildFontsPrivate(true, scale); - if (res.Atlas.IsNull()) + if (res.Atlas.IsNull) return res; this.PromoteBuiltData(rebuildIndex, res, nameof(this.BuildFontsAsync)); @@ -663,10 +662,10 @@ internal sealed partial class FontAtlasFactory { res = new(this, scale); foreach (var fhm in this.fontHandleManagers) - res.InitialAddSubstance(fhm.NewSubstance(res)); + res.InitialAddSubstance(fhm.NewSubstance(res)); unsafe { - atlasPtr = (nint)res.Atlas.NativePtr; + atlasPtr = (nint)res.Atlas.Handle; } Log.Verbose( @@ -698,10 +697,10 @@ internal sealed partial class FontAtlasFactory res = new(this, scale); foreach (var fhm in this.fontHandleManagers) - res.InitialAddSubstance(fhm.NewSubstance(res)); + res.InitialAddSubstance(fhm.NewSubstance(res)); unsafe { - atlasPtr = (nint)res.Atlas.NativePtr; + atlasPtr = (nint)res.Atlas.Handle; } toolkit = res.CreateToolkit(this.factory, isAsync); diff --git a/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.cs b/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.cs index 84d59b234..5a326a9b1 100644 --- a/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.cs +++ b/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.cs @@ -18,7 +18,7 @@ using Dalamud.Plugin.Internal.Types; using Dalamud.Storage.Assets; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Data.Files; diff --git a/Dalamud/Interface/ManagedFontAtlas/Internals/FontHandle.cs b/Dalamud/Interface/ManagedFontAtlas/Internals/FontHandle.cs index b84a857da..aadea6aea 100644 --- a/Dalamud/Interface/ManagedFontAtlas/Internals/FontHandle.cs +++ b/Dalamud/Interface/ManagedFontAtlas/Internals/FontHandle.cs @@ -10,7 +10,7 @@ using Dalamud.Plugin.Internal; using Dalamud.Plugin.Internal.Types; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; diff --git a/Dalamud/Interface/ManagedFontAtlas/Internals/GamePrebakedFontHandle.cs b/Dalamud/Interface/ManagedFontAtlas/Internals/GamePrebakedFontHandle.cs index 636bee2e2..61aab9e75 100644 --- a/Dalamud/Interface/ManagedFontAtlas/Internals/GamePrebakedFontHandle.cs +++ b/Dalamud/Interface/ManagedFontAtlas/Internals/GamePrebakedFontHandle.cs @@ -12,7 +12,7 @@ using Dalamud.Interface.Textures.TextureWraps; using Dalamud.Interface.Utility; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Data.Files; @@ -381,7 +381,10 @@ internal class GamePrebakedFontHandle : FontHandle var pixels8Array = new byte*[toolkitPostBuild.NewImAtlas.Textures.Size]; var widths = new int[toolkitPostBuild.NewImAtlas.Textures.Size]; for (var i = 0; i < pixels8Array.Length; i++) - toolkitPostBuild.NewImAtlas.GetTexDataAsAlpha8(i, out pixels8Array[i], out widths[i], out _); + { + var width = 0; + toolkitPostBuild.NewImAtlas.GetTexDataAsAlpha8(i, ref pixels8Array[i], ref widths[i], ref width); + } foreach (var (style, plan) in this.fonts) { @@ -429,7 +432,7 @@ internal class GamePrebakedFontHandle : FontHandle var fas = style.Scale(atlasScale).FamilyAndSize; using var handle = this.handleManager.GameFontTextureProvider.CreateFdtFileView(fas, out var fdt); ref var fdtFontHeader = ref fdt.FontHeader; - var fontPtr = font.NativePtr; + var fontPtr = font.Handle; var scale = style.SizePt / fdtFontHeader.Size; fontPtr->Ascent = fdtFontHeader.Ascent * scale; @@ -513,7 +516,7 @@ internal class GamePrebakedFontHandle : FontHandle var ranges = this.Ranges[this.FullRangeFont]; foreach (var (font, extraRange) in this.Ranges) { - if (font.NativePtr != this.FullRangeFont.NativePtr) + if (font.Handle != this.FullRangeFont.Handle) ranges.Or(extraRange); } @@ -562,7 +565,7 @@ internal class GamePrebakedFontHandle : FontHandle public unsafe void PostProcessFullRangeFont(float atlasScale) { var round = 1 / atlasScale; - var pfrf = this.FullRangeFont.NativePtr; + var pfrf = this.FullRangeFont.Handle; ref var frf = ref *pfrf; frf.FontSize = MathF.Round(frf.FontSize / round) * round; @@ -589,19 +592,18 @@ internal class GamePrebakedFontHandle : FontHandle continue; if (!fullRange[leftInt] || !fullRange[rightInt]) continue; - ImGuiNative.ImFont_AddKerningPair( - pfrf, + pfrf->AddKerningPair( (ushort)leftInt, (ushort)rightInt, MathF.Round((k.RightOffset * scale) / round) * round); } pfrf->FallbackGlyph = null; - ImGuiNative.ImFont_BuildLookupTable(pfrf); + pfrf->BuildLookupTable(); foreach (var fallbackCharCandidate in FontAtlasFactory.FallbackCodepoints) { - var glyph = ImGuiNative.ImFont_FindGlyphNoFallback(pfrf, fallbackCharCandidate); + var glyph = pfrf->FindGlyphNoFallback(fallbackCharCandidate); if ((nint)glyph == IntPtr.Zero) continue; frf.FallbackChar = fallbackCharCandidate; @@ -619,7 +621,7 @@ internal class GamePrebakedFontHandle : FontHandle foreach (var (font, rangeBits) in this.Ranges) { - if (font.NativePtr == this.FullRangeFont.NativePtr) + if (font.Handle == this.FullRangeFont.Handle) continue; var fontScaleMode = toolkitPostBuild.GetFontScaleMode(font); @@ -641,7 +643,7 @@ internal class GamePrebakedFontHandle : FontHandle glyphIndex = (ushort)glyphs.Length; glyphs.Add(default); } - + ref var g = ref glyphs[glyphIndex]; g = sourceGlyph; if (fontScaleMode == FontScaleMode.SkipHandling) @@ -681,16 +683,16 @@ internal class GamePrebakedFontHandle : FontHandle } } - font.NativePtr->FallbackGlyph = null; + font.Handle->FallbackGlyph = null; font.BuildLookupTable(); foreach (var fallbackCharCandidate in FontAtlasFactory.FallbackCodepoints) { - var glyph = font.FindGlyphNoFallback(fallbackCharCandidate).NativePtr; - if ((nint)glyph == IntPtr.Zero) + var glyph = font.FindGlyphNoFallback(fallbackCharCandidate); + if (glyph == null) continue; - ref var frf = ref *font.NativePtr; + ref var frf = ref *font.Handle; frf.FallbackChar = fallbackCharCandidate; frf.FallbackGlyph = glyph; frf.FallbackHotData = @@ -804,10 +806,9 @@ internal class GamePrebakedFontHandle : FontHandle else { ref var rc = ref *(ImGuiHelpers.ImFontAtlasCustomRectReal*)toolkitPostBuild.NewImAtlas - .GetCustomRectByIndex(rectId) - .NativePtr; + .GetCustomRectByIndex(rectId); var widthAdjustment = this.BaseStyle.CalculateBaseWidthAdjustment(fdtFontHeader, fdtGlyph); - + // Glyph is scaled at this point; undo that. ref var glyph = ref glyphs[lookups[rc.GlyphId]]; glyph.X0 = this.BaseAttr.HorizontalOffset; @@ -822,7 +823,7 @@ internal class GamePrebakedFontHandle : FontHandle this.gftp.GetTexFile(this.BaseAttr.TexPathFormat, fdtGlyph.TextureFileIndex); var sourceBuffer = texFiles[fdtGlyph.TextureFileIndex].ImageData; var sourceBufferDelta = fdtGlyph.TextureChannelByteIndex; - + for (var y = 0; y < fdtGlyph.BoundingHeight; y++) { var sourcePixelIndex = @@ -830,11 +831,11 @@ internal class GamePrebakedFontHandle : FontHandle sourcePixelIndex *= 4; sourcePixelIndex += sourceBufferDelta; var blend1 = horzBlend[fdtGlyph.CurrentOffsetY + y]; - + var targetOffset = ((rc.Y + y) * width) + rc.X; for (var x = 0; x < rc.Width; x++) pixels8[targetOffset + x] = 0; - + targetOffset += horzShift[fdtGlyph.CurrentOffsetY + y]; if (blend1 == 0) { diff --git a/Dalamud/Interface/ManagedFontAtlas/Internals/IFontHandleSubstance.cs b/Dalamud/Interface/ManagedFontAtlas/Internals/IFontHandleSubstance.cs index ef4150e33..75d06bd7e 100644 --- a/Dalamud/Interface/ManagedFontAtlas/Internals/IFontHandleSubstance.cs +++ b/Dalamud/Interface/ManagedFontAtlas/Internals/IFontHandleSubstance.cs @@ -1,9 +1,8 @@ using System.Collections.Generic; +using Dalamud.Bindings.ImGui; using Dalamud.Utility; -using ImGuiNET; - namespace Dalamud.Interface.ManagedFontAtlas.Internals; /// @@ -45,7 +44,7 @@ internal interface IFontHandleSubstance : IDisposable /// /// The toolkit. void OnPreBuild(IFontAtlasBuildToolkitPreBuild toolkitPreBuild); - + /// /// Called between and calls.
/// Any further modification to will result in undefined behavior. diff --git a/Dalamud/Interface/ManagedFontAtlas/Internals/LockedImFont.cs b/Dalamud/Interface/ManagedFontAtlas/Internals/LockedImFont.cs index bd50502c8..b7f5ad12b 100644 --- a/Dalamud/Interface/ManagedFontAtlas/Internals/LockedImFont.cs +++ b/Dalamud/Interface/ManagedFontAtlas/Internals/LockedImFont.cs @@ -1,7 +1,6 @@ +using Dalamud.Bindings.ImGui; using Dalamud.Utility; -using ImGuiNET; - namespace Dalamud.Interface.ManagedFontAtlas.Internals; /// diff --git a/Dalamud/Interface/ManagedFontAtlas/Internals/SimplePushedFont.cs b/Dalamud/Interface/ManagedFontAtlas/Internals/SimplePushedFont.cs index 0c96025ac..0d6ad5c7c 100644 --- a/Dalamud/Interface/ManagedFontAtlas/Internals/SimplePushedFont.cs +++ b/Dalamud/Interface/ManagedFontAtlas/Internals/SimplePushedFont.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using System.Diagnostics; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Utility; -using ImGuiNET; - using Microsoft.Extensions.ObjectPool; using Serilog; @@ -32,10 +31,10 @@ internal sealed class SimplePushedFont : IDisposable public static SimplePushedFont Rent(List stack, ImFontPtr fontPtr) { var rented = Pool.Get(); - Debug.Assert(rented.font.IsNull(), "Rented object must not have its font set"); + Debug.Assert(rented.font.IsNull, "Rented object must not have its font set"); rented.stack = stack; - if (fontPtr.IsNotNullAndLoaded()) + if (!fontPtr.IsNull && fontPtr.IsLoaded()) { rented.font = fontPtr; ImGui.PushFont(fontPtr); @@ -54,9 +53,9 @@ internal sealed class SimplePushedFont : IDisposable this.stack.RemoveAt(this.stack.Count - 1); - if (!this.font.IsNull()) + if (!this.font.IsNull) { - if (ImGui.GetFont().NativePtr == this.font.NativePtr) + if (ImGui.GetFont().Handle == this.font.Handle) { ImGui.PopFont(); } diff --git a/Dalamud/Interface/ManagedFontAtlas/Internals/TrueType.cs b/Dalamud/Interface/ManagedFontAtlas/Internals/TrueType.cs index 1d437d56d..3c566e756 100644 --- a/Dalamud/Interface/ManagedFontAtlas/Internals/TrueType.cs +++ b/Dalamud/Interface/ManagedFontAtlas/Internals/TrueType.cs @@ -2,10 +2,9 @@ using System.Buffers.Binary; using System.Collections.Generic; using System.Linq; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Utility; -using ImGuiNET; - namespace Dalamud.Interface.ManagedFontAtlas.Internals; /// @@ -18,7 +17,7 @@ internal static partial class TrueTypeUtils /// and throws an appropriate exception if it is the case. /// /// The font config. - public static unsafe void CheckImGuiCompatibleOrThrow(in ImFontConfig fontConfig) + public static unsafe void CheckImGuiCompatibleOrThrow(in ImFontConfigPtr fontConfig) { var ranges = fontConfig.GlyphRanges; var sfnt = AsSfntFile(fontConfig); @@ -35,7 +34,7 @@ internal static partial class TrueTypeUtils /// The font config. /// The enumerable of pair adjustments. Distance values need to be multiplied by font size in pixels. public static IEnumerable<(char Left, char Right, float Distance)> ExtractHorizontalPairAdjustments( - ImFontConfig fontConfig) + ImFontConfigPtr fontConfig) { float multiplier; Dictionary glyphToCodepoints; @@ -107,7 +106,7 @@ internal static partial class TrueTypeUtils } } - private static unsafe SfntFile AsSfntFile(in ImFontConfig fontConfig) + private static unsafe SfntFile AsSfntFile(in ImFontConfigPtr fontConfig) { var memory = new PointerSpan((byte*)fontConfig.FontData, fontConfig.FontDataSize); if (memory.Length < 4) diff --git a/Dalamud/Interface/ManagedFontAtlas/SafeFontConfig.cs b/Dalamud/Interface/ManagedFontAtlas/SafeFontConfig.cs index caa686856..484c3540b 100644 --- a/Dalamud/Interface/ManagedFontAtlas/SafeFontConfig.cs +++ b/Dalamud/Interface/ManagedFontAtlas/SafeFontConfig.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Text; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.ManagedFontAtlas; @@ -14,13 +14,14 @@ public struct SafeFontConfig /// /// The raw config. /// - public ImFontConfig Raw; + public ImFontConfigPtr Raw; /// /// Initializes a new instance of the struct. /// - public SafeFontConfig() + public unsafe SafeFontConfig() { + this.Raw.Handle = ImGui.ImFontConfig(); this.OversampleH = 1; this.OversampleV = 1; this.PixelSnapH = true; @@ -28,7 +29,7 @@ public struct SafeFontConfig this.RasterizerMultiply = 1f; this.RasterizerGamma = 1.7f; this.EllipsisChar = unchecked((char)-1); - this.Raw.FontDataOwnedByAtlas = 1; + this.Raw.FontDataOwnedByAtlas = true; } /// @@ -39,9 +40,9 @@ public struct SafeFontConfig public unsafe SafeFontConfig(ImFontConfigPtr config) : this() { - if (config.NativePtr is not null) + if (config.Handle is not null) { - this.Raw = *config.NativePtr; + this.Raw = config.Handle; this.Raw.GlyphRanges = null; } } @@ -107,8 +108,8 @@ public struct SafeFontConfig /// public bool PixelSnapH { - get => this.Raw.PixelSnapH != 0; - set => this.Raw.PixelSnapH = value ? (byte)1 : (byte)0; + get => this.Raw.PixelSnapH; + set => this.Raw.PixelSnapH = value; } /// @@ -237,11 +238,11 @@ public struct SafeFontConfig /// public unsafe ImFontPtr MergeFont { - get => this.Raw.DstFont is not null ? this.Raw.DstFont : default; + get => this.Raw.DstFont.Handle != null ? this.Raw.DstFont : default; set { - this.Raw.MergeMode = value.NativePtr is null ? (byte)0 : (byte)1; - this.Raw.DstFont = value.NativePtr is null ? default : value.NativePtr; + this.Raw.MergeMode = value.Handle != null; + this.Raw.DstFont = value.Handle == null ? ImFontPtr.Null : value.Handle; } } diff --git a/Dalamud/Interface/Style/StyleModel.cs b/Dalamud/Interface/Style/StyleModel.cs index 643fe463d..0dad9a47e 100644 --- a/Dalamud/Interface/Style/StyleModel.cs +++ b/Dalamud/Interface/Style/StyleModel.cs @@ -5,7 +5,7 @@ using System.Numerics; using Dalamud.Configuration.Internal; using Dalamud.Interface.Colors; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using Serilog; diff --git a/Dalamud/Interface/Style/StyleModelV1.cs b/Dalamud/Interface/Style/StyleModelV1.cs index 43341126e..4fc413f5d 100644 --- a/Dalamud/Interface/Style/StyleModelV1.cs +++ b/Dalamud/Interface/Style/StyleModelV1.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Numerics; using Dalamud.Interface.Colors; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; namespace Dalamud.Interface.Style; @@ -400,7 +400,7 @@ public class StyleModelV1 : StyleModel foreach (var imGuiCol in Enum.GetValues()) { - if (imGuiCol == ImGuiCol.COUNT) + if (imGuiCol == ImGuiCol.Count) { continue; } @@ -472,7 +472,7 @@ public class StyleModelV1 : StyleModel foreach (var imGuiCol in Enum.GetValues()) { - if (imGuiCol == ImGuiCol.COUNT) + if (imGuiCol == ImGuiCol.Count) { continue; } @@ -512,7 +512,7 @@ public class StyleModelV1 : StyleModel foreach (var imGuiCol in Enum.GetValues()) { - if (imGuiCol == ImGuiCol.COUNT) + if (imGuiCol == ImGuiCol.Count) { continue; } diff --git a/Dalamud/Interface/Textures/ImGuiViewportTextureArgs.cs b/Dalamud/Interface/Textures/ImGuiViewportTextureArgs.cs index c48d8c73e..c5274daaa 100644 --- a/Dalamud/Interface/Textures/ImGuiViewportTextureArgs.cs +++ b/Dalamud/Interface/Textures/ImGuiViewportTextureArgs.cs @@ -4,7 +4,7 @@ using System.Text; using Dalamud.Interface.Internal; using Dalamud.Interface.Textures.TextureWraps; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using TerraFX.Interop.DirectX; diff --git a/Dalamud/Interface/Textures/Internal/TextureManager.BlameTracker.cs b/Dalamud/Interface/Textures/Internal/TextureManager.BlameTracker.cs index ffdc17d58..ada5affc4 100644 --- a/Dalamud/Interface/Textures/Internal/TextureManager.BlameTracker.cs +++ b/Dalamud/Interface/Textures/Internal/TextureManager.BlameTracker.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Internal; using Dalamud.Interface.Textures.TextureWraps; using Dalamud.Plugin.Internal.Types; @@ -252,7 +253,7 @@ internal sealed partial class TextureManager 0); /// - public IntPtr ImGuiHandle + public ImTextureID ImGuiHandle { get { @@ -261,7 +262,7 @@ internal sealed partial class TextureManager this.srvDebugPreviewExpiryTick = Environment.TickCount64 + 1000; if (!this.srvDebugPreview.IsEmpty()) - return (nint)this.srvDebugPreview.Get(); + return new ImTextureID(this.srvDebugPreview.Get()); var srvDesc = new D3D11_SHADER_RESOURCE_VIEW_DESC( this.tex2D, D3D_SRV_DIMENSION.D3D11_SRV_DIMENSION_TEXTURE2D); @@ -275,7 +276,7 @@ internal sealed partial class TextureManager return Service.Get().Empty4X4.ImGuiHandle; srv.Swap(ref this.srvDebugPreview); - return (nint)this.srvDebugPreview.Get(); + return new ImTextureID(this.srvDebugPreview.Get()); } } diff --git a/Dalamud/Interface/Textures/Internal/TextureManager.Drawer.cs b/Dalamud/Interface/Textures/Internal/TextureManager.Drawer.cs index d1b017197..27cf68b32 100644 --- a/Dalamud/Interface/Textures/Internal/TextureManager.Drawer.cs +++ b/Dalamud/Interface/Textures/Internal/TextureManager.Drawer.cs @@ -5,7 +5,7 @@ using System.Numerics; using Dalamud.Storage.Assets; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; @@ -214,10 +214,10 @@ internal sealed partial class TextureManager { var data = stackalloc ImDrawVert[] { - new() { col = uint.MaxValue, pos = new(-1, 1), uv = new(0, 0) }, - new() { col = uint.MaxValue, pos = new(-1, -1), uv = new(0, 1) }, - new() { col = uint.MaxValue, pos = new(1, 1), uv = new(1, 0) }, - new() { col = uint.MaxValue, pos = new(1, -1), uv = new(1, 1) }, + new() { Col = uint.MaxValue, Pos = new(-1, 1), Uv = new(0, 0) }, + new() { Col = uint.MaxValue, Pos = new(-1, -1), Uv = new(0, 1) }, + new() { Col = uint.MaxValue, Pos = new(1, 1), Uv = new(1, 0) }, + new() { Col = uint.MaxValue, Pos = new(1, -1), Uv = new(1, 1) }, }; var desc = new D3D11_BUFFER_DESC( (uint)(sizeof(ImDrawVert) * 4), @@ -295,10 +295,10 @@ internal sealed partial class TextureManager return; _ = new Span(mapped.pData, 4) { - [0] = new() { col = uint.MaxValue, pos = new(-1, 1), uv = uv0 }, - [1] = new() { col = uint.MaxValue, pos = new(-1, -1), uv = new(uv0.X, uv1.Y) }, - [2] = new() { col = uint.MaxValue, pos = new(1, 1), uv = new(uv1.X, uv0.Y) }, - [3] = new() { col = uint.MaxValue, pos = new(1, -1), uv = uv1 }, + [0] = new() { Col = uint.MaxValue, Pos = new(-1, 1), Uv = uv0 }, + [1] = new() { Col = uint.MaxValue, Pos = new(-1, -1), Uv = new(uv0.X, uv1.Y) }, + [2] = new() { Col = uint.MaxValue, Pos = new(1, 1), Uv = new(uv1.X, uv0.Y) }, + [3] = new() { Col = uint.MaxValue, Pos = new(1, -1), Uv = uv1 }, }; ctx->Unmap((ID3D11Resource*)buffer, 0u); } @@ -382,7 +382,7 @@ internal sealed partial class TextureManager ctx->PSSetShader(this.pixelShader, null, 0); var simp = this.sampler.Get(); ctx->PSSetSamplers(0, 1, &simp); - var ppn = (ID3D11ShaderResourceView*)Service.Get().White4X4.ImGuiHandle; + var ppn = (ID3D11ShaderResourceView*)Service.Get().White4X4.ImGuiHandle.Handle; ctx->PSSetShaderResources(0, 1, &ppn); ctx->GSSetShader(null, null, 0); diff --git a/Dalamud/Interface/Textures/Internal/TextureManager.FromExistingTexture.cs b/Dalamud/Interface/Textures/Internal/TextureManager.FromExistingTexture.cs index 829b8d0c5..24358ab1d 100644 --- a/Dalamud/Interface/Textures/Internal/TextureManager.FromExistingTexture.cs +++ b/Dalamud/Interface/Textures/Internal/TextureManager.FromExistingTexture.cs @@ -320,7 +320,7 @@ internal sealed partial class TextureManager { this.wrapToClose = leaveWrapOpen ? null : wrap; - using var unk = new ComPtr((IUnknown*)wrap.ImGuiHandle); + using var unk = new ComPtr((IUnknown*)wrap.ImGuiHandle.Handle); using var srvTemp = default(ComPtr); unk.As(&srvTemp).ThrowOnError(); diff --git a/Dalamud/Interface/Textures/TextureWraps/ForwardingTextureWrap.cs b/Dalamud/Interface/Textures/TextureWraps/ForwardingTextureWrap.cs index 7d6ff8580..8dcbc8cad 100644 --- a/Dalamud/Interface/Textures/TextureWraps/ForwardingTextureWrap.cs +++ b/Dalamud/Interface/Textures/TextureWraps/ForwardingTextureWrap.cs @@ -2,6 +2,7 @@ using System.Diagnostics.CodeAnalysis; using System.Numerics; using System.Runtime.CompilerServices; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Internal; using Dalamud.Interface.Textures.TextureWraps.Internal; @@ -13,7 +14,7 @@ namespace Dalamud.Interface.Textures.TextureWraps; public abstract class ForwardingTextureWrap : IDalamudTextureWrap { /// - public IntPtr ImGuiHandle + public ImTextureID ImGuiHandle { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => this.GetWrap().ImGuiHandle; @@ -55,7 +56,7 @@ public abstract class ForwardingTextureWrap : IDalamudTextureWrap public virtual unsafe IDalamudTextureWrap CreateWrapSharingLowLevelResource() { // Dalamud specific: IDalamudTextureWrap always points to an ID3D11ShaderResourceView. - var handle = (IUnknown*)this.ImGuiHandle; + var handle = (IUnknown*)this.ImGuiHandle.Handle; return new UnknownTextureWrap(handle, this.Width, this.Height, true); } diff --git a/Dalamud/Interface/Textures/TextureWraps/IDalamudTextureWrap.cs b/Dalamud/Interface/Textures/TextureWraps/IDalamudTextureWrap.cs index 88f2dd718..d57851de0 100644 --- a/Dalamud/Interface/Textures/TextureWraps/IDalamudTextureWrap.cs +++ b/Dalamud/Interface/Textures/TextureWraps/IDalamudTextureWrap.cs @@ -1,5 +1,6 @@ using System.Numerics; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Textures.TextureWraps.Internal; using TerraFX.Interop.Windows; @@ -15,7 +16,7 @@ namespace Dalamud.Interface.Textures.TextureWraps; public interface IDalamudTextureWrap : IDisposable { /// Gets a texture handle suitable for direct use with ImGui functions. - IntPtr ImGuiHandle { get; } + ImTextureID ImGuiHandle { get; } /// Gets the width of the texture. int Width { get; } @@ -45,7 +46,7 @@ public interface IDalamudTextureWrap : IDisposable unsafe IDalamudTextureWrap CreateWrapSharingLowLevelResource() { // Dalamud specific: IDalamudTextureWrap always points to an ID3D11ShaderResourceView. - var handle = (IUnknown*)this.ImGuiHandle; + var handle = (IUnknown*)this.ImGuiHandle.Handle; return new UnknownTextureWrap(handle, this.Width, this.Height, true); } } diff --git a/Dalamud/Interface/Textures/TextureWraps/Internal/UnknownTextureWrap.cs b/Dalamud/Interface/Textures/TextureWraps/Internal/UnknownTextureWrap.cs index ec23d7d03..69117bb29 100644 --- a/Dalamud/Interface/Textures/TextureWraps/Internal/UnknownTextureWrap.cs +++ b/Dalamud/Interface/Textures/TextureWraps/Internal/UnknownTextureWrap.cs @@ -1,5 +1,6 @@ using System.Threading; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Internal; using Dalamud.Interface.Textures.Internal; using Dalamud.Utility; @@ -33,10 +34,10 @@ internal sealed unsafe class UnknownTextureWrap : IDalamudTextureWrap, IDeferred ~UnknownTextureWrap() => this.Dispose(false); /// - public nint ImGuiHandle => + public ImTextureID ImGuiHandle => this.imGuiHandle == nint.Zero ? throw new ObjectDisposedException(nameof(UnknownTextureWrap)) - : this.imGuiHandle; + : new ImTextureID(this.imGuiHandle); /// public int Width { get; } diff --git a/Dalamud/Interface/Textures/TextureWraps/Internal/ViewportTextureWrap.cs b/Dalamud/Interface/Textures/TextureWraps/Internal/ViewportTextureWrap.cs index 6e21bc0e8..998668f45 100644 --- a/Dalamud/Interface/Textures/TextureWraps/Internal/ViewportTextureWrap.cs +++ b/Dalamud/Interface/Textures/TextureWraps/Internal/ViewportTextureWrap.cs @@ -9,7 +9,7 @@ using Dalamud.Plugin.Internal.Types; using Dalamud.Storage.Assets; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; @@ -53,12 +53,12 @@ internal sealed class ViewportTextureWrap : IDalamudTextureWrap, IDeferredDispos ~ViewportTextureWrap() => this.Dispose(false); /// - public unsafe nint ImGuiHandle + public unsafe ImTextureID ImGuiHandle { get { var t = (nint)this.srv.Get(); - return t == nint.Zero ? Service.Get().Empty4X4.ImGuiHandle : t; + return t == nint.Zero ? Service.Get().Empty4X4.ImGuiHandle : ImTextureID.Null; } } diff --git a/Dalamud/Interface/UiBuilder.cs b/Dalamud/Interface/UiBuilder.cs index 801253003..6bc4d9a37 100644 --- a/Dalamud/Interface/UiBuilder.cs +++ b/Dalamud/Interface/UiBuilder.cs @@ -14,7 +14,7 @@ using Dalamud.Interface.ManagedFontAtlas.Internals; using Dalamud.Plugin.Internal.Types; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; diff --git a/Dalamud/Interface/Utility/ImGuiClip.cs b/Dalamud/Interface/Utility/ImGuiClip.cs index c9321fe4c..261f235b4 100644 --- a/Dalamud/Interface/Utility/ImGuiClip.cs +++ b/Dalamud/Interface/Utility/ImGuiClip.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Numerics; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility; @@ -37,7 +37,7 @@ public static class ImGuiClip ImGuiListClipperPtr clipper; unsafe { - clipper = new ImGuiListClipperPtr(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); + clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper()); } clipper.Begin(data.Count, lineHeight); @@ -72,11 +72,11 @@ public static class ImGuiClip ImGuiListClipperPtr clipper; unsafe { - clipper = new ImGuiListClipperPtr(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); + clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper()); } - + var maxRows = (int)MathF.Ceiling((float)data.Count / itemsPerLine); - + clipper.Begin(maxRows, lineHeight); while (clipper.Step()) { @@ -91,7 +91,7 @@ public static class ImGuiClip var itemsForRow = data .Skip(actualRow * itemsPerLine) .Take(itemsPerLine); - + var currentIndex = 0; foreach (var item in itemsForRow) { @@ -99,7 +99,7 @@ public static class ImGuiClip { ImGui.SameLine(); } - + draw(item); } } @@ -116,7 +116,7 @@ public static class ImGuiClip ImGuiListClipperPtr clipper; unsafe { - clipper = new ImGuiListClipperPtr(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); + clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper()); } clipper.Begin(data.Count, lineHeight); diff --git a/Dalamud/Interface/Utility/ImGuiExtensions.cs b/Dalamud/Interface/Utility/ImGuiExtensions.cs index 21a0d3747..8aad48fab 100644 --- a/Dalamud/Interface/Utility/ImGuiExtensions.cs +++ b/Dalamud/Interface/Utility/ImGuiExtensions.cs @@ -1,7 +1,7 @@ using System.Numerics; using System.Text; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility; @@ -20,7 +20,7 @@ public static class ImGuiExtensions /// Size of the text, if known. /// Alignment. /// Clip rect to use. - public static void AddTextClippedEx(this ImDrawListPtr drawListPtr, Vector2 posMin, Vector2 posMax, string text, Vector2? textSizeIfKnown, Vector2 align, Vector4? clipRect) + public static unsafe void AddTextClippedEx(this ImDrawListPtr drawListPtr, Vector2 posMin, Vector2 posMax, string text, Vector2? textSizeIfKnown, Vector2 align, Vector4? clipRect) { var pos = posMin; var textSize = textSizeIfKnown ?? ImGui.CalcTextSize(text, false, 0); @@ -66,7 +66,7 @@ public static class ImGuiExtensions // TODO: This should go into ImDrawList.Manual.cs in ImGui.NET... public static unsafe void AddText(this ImDrawListPtr drawListPtr, ImFontPtr font, float fontSize, Vector2 pos, uint col, string textBegin, ref Vector4 cpuFineClipRect) { - var nativeFont = font.NativePtr; + var nativeFont = font.Handle; var textBeginByteCount = Encoding.UTF8.GetByteCount(textBegin); var nativeTextBegin = stackalloc byte[textBeginByteCount + 1]; @@ -81,7 +81,7 @@ public static class ImGuiExtensions fixed (Vector4* nativeCpuFineClipRect = &cpuFineClipRect) { - ImGuiNative.ImDrawList_AddText_FontPtr(drawListPtr.NativePtr, nativeFont, fontSize, pos, col, nativeTextBegin, nativeTextEnd, wrapWidth, nativeCpuFineClipRect); + drawListPtr.AddText(nativeFont, fontSize, pos, col, nativeTextBegin, nativeTextEnd, wrapWidth, nativeCpuFineClipRect); } } } diff --git a/Dalamud/Interface/Utility/ImGuiHelpers.cs b/Dalamud/Interface/Utility/ImGuiHelpers.cs index 37237438e..18a15a5e0 100644 --- a/Dalamud/Interface/Utility/ImGuiHelpers.cs +++ b/Dalamud/Interface/Utility/ImGuiHelpers.cs @@ -3,10 +3,12 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Numerics; using System.Reactive.Disposables; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using System.Text.Unicode; +using Dalamud.Bindings.ImGui; using Dalamud.Configuration.Internal; using Dalamud.Game.ClientState.Keys; using Dalamud.Game.Text.SeStringHandling.Payloads; @@ -17,8 +19,6 @@ using Dalamud.Interface.ManagedFontAtlas; using Dalamud.Interface.ManagedFontAtlas.Internals; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; - using VirtualKey = Dalamud.Game.ClientState.Keys.VirtualKey; namespace Dalamud.Interface.Utility; @@ -43,7 +43,7 @@ public static partial class ImGuiHelpers /// This does not necessarily mean you can call drawing functions. /// public static unsafe bool IsImGuiInitialized => - ImGui.GetCurrentContext() != nint.Zero && ImGui.GetIO().NativePtr is not null; + ImGui.GetCurrentContext().Handle is not null && ImGui.GetIO().Handle is not null; /// /// Gets the global Dalamud scale; even available before drawing is ready.
@@ -145,12 +145,13 @@ public static partial class ImGuiHelpers ///
/// The total number of swatches to use. /// Default color palette. - public static List DefaultColorPalette(int swatchCount = 32) + public static unsafe List DefaultColorPalette(int swatchCount = 32) { var colorPalette = new List(); for (var i = 0; i < swatchCount; i++) { - ImGui.ColorConvertHSVtoRGB(i / 31.0f, 0.7f, 0.8f, out var r, out var g, out var b); + float r = 0f, g = 0f, b = 0f; + ImGui.ColorConvertHSVtoRGB(i / 31.0f, 0.7f, 0.8f, ref r, ref g, ref b); colorPalette.Add(new Vector4(r, g, b, 1.0f)); } @@ -262,7 +263,7 @@ public static partial class ImGuiHelpers { Func rounder = round > 0 ? x => MathF.Round(x / round) * round : x => x; - var font = fontPtr.NativePtr; + var font = fontPtr.Handle; font->FontSize = rounder(font->FontSize * scale); font->Ascent = rounder(font->Ascent * scale); font->Descent = font->FontSize - font->Ascent; @@ -355,7 +356,7 @@ public static partial class ImGuiHelpers if (glyph->Codepoint < rangeLow || glyph->Codepoint > rangeHigh) continue; - var prevGlyphPtr = (ImFontGlyphReal*)target.FindGlyphNoFallback((ushort)glyph->Codepoint).NativePtr; + var prevGlyphPtr = (ImFontGlyphReal*)target.FindGlyphNoFallback((ushort)glyph->Codepoint); if ((IntPtr)prevGlyphPtr == IntPtr.Zero) { addedCodepoints.Add(glyph->Codepoint); @@ -397,9 +398,9 @@ public static partial class ImGuiHelpers var kernPairs = source.KerningPairs; for (int j = 0, k = kernPairs.Size; j < k; j++) { - if (!addedCodepoints.Contains(kernPairs[j].Left)) + if (!addedCodepoints.Contains((int)kernPairs[j].Left)) continue; - if (!addedCodepoints.Contains(kernPairs[j].Right)) + if (!addedCodepoints.Contains((int)kernPairs[j].Right)) continue; target.AddKerningPair(kernPairs[j].Left, kernPairs[j].Right, kernPairs[j].AdvanceXAdjustment); changed = true; @@ -414,7 +415,7 @@ public static partial class ImGuiHelpers // On our secondary calls of BuildLookupTable, FallbackGlyph is set to some value that is not null, // making ImGui attempt to treat whatever was there as a ' '. // This may cause random glyphs to be sized randomly, if not an access violation exception. - target.NativePtr->FallbackGlyph = null; + target.Handle->FallbackGlyph = null; target.BuildLookupTable(); } @@ -486,11 +487,11 @@ public static partial class ImGuiHelpers length, $"{nameof(length)} cannot be a negative number."); default: - var memory = ImGuiNative.igMemAlloc((uint)length); + var memory = ImGui.MemAlloc((uint)length); if (memory is null) { throw new OutOfMemoryException( - $"Failed to allocate {length} bytes using {nameof(ImGuiNative.igMemAlloc)}"); + $"Failed to allocate {length} bytes using {nameof(ImGui.MemAlloc)}"); } return memory; @@ -504,12 +505,12 @@ public static partial class ImGuiHelpers /// Disposable you can call. public static unsafe IDisposable NewFontGlyphRangeBuilderPtrScoped(out ImFontGlyphRangesBuilderPtr builder) { - builder = new(ImGuiNative.ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder()); - var ptr = builder.NativePtr; + builder = new(ImGui.ImFontGlyphRangesBuilder()); + var ptr = builder.Handle; return Disposable.Create(() => { if (ptr != null) - ImGuiNative.ImFontGlyphRangesBuilder_destroy(ptr); + new ImFontGlyphRangesBuilderPtr(ptr).Destroy(); ptr = null; }); } @@ -534,8 +535,9 @@ public static partial class ImGuiHelpers builder.AddChar('.'); } - builder.BuildRanges(out var vec); - return new ReadOnlySpan((void*)vec.Data, vec.Size).ToArray(); + ImVector outRanges = default; + builder.BuildRanges(&outRanges); + return new ReadOnlySpan((void*)outRanges.Data, outRanges.Size).ToArray(); } /// @@ -566,21 +568,21 @@ public static partial class ImGuiHelpers ///
/// The pointer. /// Whether it is empty. - public static unsafe bool IsNull(this ImFontPtr ptr) => ptr.NativePtr == null; + public static unsafe bool IsNull(this ImFontPtr ptr) => ptr.Handle == null; /// /// Determines whether is empty. /// /// The pointer. /// Whether it is empty. - public static unsafe bool IsNotNullAndLoaded(this ImFontPtr ptr) => ptr.NativePtr != null && ptr.IsLoaded(); + public static unsafe bool IsNotNullAndLoaded(this ImFontPtr ptr) => ptr.Handle != null && ptr.IsLoaded(); /// /// Determines whether is empty. /// /// The pointer. /// Whether it is empty. - public static unsafe bool IsNull(this ImFontAtlasPtr ptr) => ptr.NativePtr == null; + public static unsafe bool IsNull(this ImFontAtlasPtr ptr) => ptr.Handle == null; /// /// If is default, then returns . @@ -589,18 +591,18 @@ public static partial class ImGuiHelpers /// The other. /// if it is not default; otherwise, . public static unsafe ImFontPtr OrElse(this ImFontPtr self, ImFontPtr other) => - self.NativePtr is null ? other : self; + self.Handle is null ? other : self; /// /// Mark 4K page as used, after adding a codepoint to a font. /// /// The font. /// The codepoint. - internal static unsafe void Mark4KPageUsedAfterGlyphAdd(this ImFontPtr font, ushort codepoint) + internal static void Mark4KPageUsedAfterGlyphAdd(this ImFontPtr font, ushort codepoint) { // Mark 4K page as used var pageIndex = unchecked((ushort)(codepoint / 4096)); - font.NativePtr->Used4kPagesMap[pageIndex >> 3] |= unchecked((byte)(1 << (pageIndex & 7))); + font.Used4kPagesMap[pageIndex >> 3] |= unchecked((byte)(1 << (pageIndex & 7))); } /// @@ -611,14 +613,14 @@ public static partial class ImGuiHelpers internal static unsafe void SetTextFromCallback(ImGuiInputTextCallbackData* data, string s) { if (data->BufTextLen != 0) - ImGuiNative.ImGuiInputTextCallbackData_DeleteChars(data, 0, data->BufTextLen); + data->DeleteChars(0, data->BufTextLen); var len = Encoding.UTF8.GetByteCount(s); var buf = len < 1024 ? stackalloc byte[len] : new byte[len]; Encoding.UTF8.GetBytes(s, buf); fixed (byte* pBuf = buf) - ImGuiNative.ImGuiInputTextCallbackData_InsertChars(data, 0, pBuf, pBuf + len); - ImGuiNative.ImGuiInputTextCallbackData_SelectAll(data); + data->InsertChars(0, pBuf, pBuf + len); + data->SelectAll(); } /// @@ -631,10 +633,10 @@ public static partial class ImGuiHelpers if (!IsImGuiInitialized) return -1; - var viewports = new ImVectorWrapper(&ImGui.GetPlatformIO().NativePtr->Viewports); + var viewports = new ImVectorWrapper((ImVector*)Unsafe.AsPointer(ref ImGui.GetPlatformIO().Handle->Viewports)); for (var i = 0; i < viewports.LengthUnsafe; i++) { - if (viewports.DataUnsafe[i].PlatformHandle == hwnd) + if (viewports.DataUnsafe[i].PlatformHandle == hwnd.ToPointer()) return i; } @@ -656,27 +658,28 @@ public static partial class ImGuiHelpers { try { - var font = fontPtr.NativePtr; + var font = fontPtr.Handle; if (font is null) throw new NullReferenceException("The font is null."); _ = Marshal.ReadIntPtr((nint)font); - if (font->IndexedHotData.Data != 0) - _ = Marshal.ReadIntPtr(font->IndexedHotData.Data); - if (font->FrequentKerningPairs.Data != 0) - _ = Marshal.ReadIntPtr(font->FrequentKerningPairs.Data); - if (font->IndexLookup.Data != 0) - _ = Marshal.ReadIntPtr(font->IndexLookup.Data); - if (font->Glyphs.Data != 0) - _ = Marshal.ReadIntPtr(font->Glyphs.Data); - if (font->KerningPairs.Data != 0) - _ = Marshal.ReadIntPtr(font->KerningPairs.Data); + if (font->IndexedHotData.Data != null) + _ = *font->IndexedHotData.Front; + if (font->FrequentKerningPairs.Data != null) + _ = font->FrequentKerningPairs.Data; + if (font->IndexLookup.Data != null) + _ = *font->IndexLookup.Data; + if (font->Glyphs.Data != null) + _ = *font->Glyphs.Data; + if (font->KerningPairs.Data != null) + _ = *font->KerningPairs.Data; if (font->ConfigDataCount == 0 && font->ConfigData is not null) throw new InvalidOperationException("ConfigDataCount == 0 but ConfigData is not null?"); if (font->ConfigDataCount != 0 && font->ConfigData is null) throw new InvalidOperationException("ConfigDataCount != 0 but ConfigData is null?"); if (font->ConfigData is not null) _ = Marshal.ReadIntPtr((nint)font->ConfigData); + /* if (font->FallbackGlyph is not null && ((nint)font->FallbackGlyph < font->Glyphs.Data || (nint)font->FallbackGlyph >= font->Glyphs.Data)) throw new InvalidOperationException("FallbackGlyph is not in range of Glyphs.Data"); @@ -684,6 +687,7 @@ public static partial class ImGuiHelpers && ((nint)font->FallbackHotData < font->IndexedHotData.Data || (nint)font->FallbackHotData >= font->IndexedHotData.Data)) throw new InvalidOperationException("FallbackGlyph is not in range of Glyphs.Data"); + */ if (font->ContainerAtlas is not null) _ = Marshal.ReadIntPtr((nint)font->ContainerAtlas); } @@ -703,7 +707,7 @@ public static partial class ImGuiHelpers internal static unsafe void UpdateFallbackChar(this ImFontPtr font, char c) { font.FallbackChar = c; - font.NativePtr->FallbackHotData = + font.Handle->FallbackHotData = (ImFontGlyphHotData*)((ImFontGlyphHotDataReal*)font.IndexedHotData.Data + font.FallbackChar); } diff --git a/Dalamud/Interface/Utility/ImGuiId.cs b/Dalamud/Interface/Utility/ImGuiId.cs index 0231f3749..a5739afa9 100644 --- a/Dalamud/Interface/Utility/ImGuiId.cs +++ b/Dalamud/Interface/Utility/ImGuiId.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility; @@ -158,15 +158,15 @@ public readonly ref struct ImGuiId switch (this.IdType) { case Type.Numeric: - ImGuiNative.igPushID_Ptr((void*)this.Numeric); + ImGui.PushID((void*)this.Numeric); return true; case Type.U16: fixed (void* p = this.U16) - ImGuiNative.igPushID_StrStr((byte*)p, (byte*)p + (this.U16.Length * 2)); + ImGui.PushID((byte*)p, (byte*)p + (this.U16.Length * 2)); return true; case Type.U8: fixed (void* p = this.U8) - ImGuiNative.igPushID_StrStr((byte*)p, (byte*)p + this.U8.Length); + ImGui.PushID((byte*)p, (byte*)p + this.U8.Length); return true; case Type.None: default: diff --git a/Dalamud/Interface/Utility/ImGuiTable.cs b/Dalamud/Interface/Utility/ImGuiTable.cs index c74bc0a2f..40040a9b5 100644 --- a/Dalamud/Interface/Utility/ImGuiTable.cs +++ b/Dalamud/Interface/Utility/ImGuiTable.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility; diff --git a/Dalamud/Interface/Utility/ImVectorWrapper.cs b/Dalamud/Interface/Utility/ImVectorWrapper.cs index f350a6436..66e7fa070 100644 --- a/Dalamud/Interface/Utility/ImVectorWrapper.cs +++ b/Dalamud/Interface/Utility/ImVectorWrapper.cs @@ -3,8 +3,9 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Numerics; +using System.Runtime.CompilerServices; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using JetBrains.Annotations; @@ -58,7 +59,7 @@ public unsafe struct ImVectorWrapper : IList, IList, IReadOnlyList, IDi $"{nameof(initialCapacity)} cannot be a negative number."); } - this.vector = (ImVector*)ImGuiNative.igMemAlloc((uint)sizeof(ImVector)); + this.vector = (ImVector*)ImGui.MemAlloc((uint)sizeof(ImVector)); if (this.vector is null) throw new OutOfMemoryException(); *this.vector = default; @@ -71,7 +72,7 @@ public unsafe struct ImVectorWrapper : IList, IList, IReadOnlyList, IDi } catch { - ImGuiNative.igMemFree(this.vector); + ImGui.MemFree(this.vector); this.vector = null; this.HasOwnership = false; this.destroyer = null; @@ -200,8 +201,8 @@ public unsafe struct ImVectorWrapper : IList, IList, IReadOnlyList, IDi { this.Clear(); this.SetCapacity(0); - Debug.Assert(this.vector->Data == 0, "SetCapacity(0) did not free the data"); - ImGuiNative.igMemFree(this.vector); + Debug.Assert(this.vector->Data == null, "SetCapacity(0) did not free the data"); + ImGui.MemFree(this.vector); } this.vector = null; @@ -492,7 +493,7 @@ public unsafe struct ImVectorWrapper : IList, IList, IReadOnlyList, IDi { if (capacity == 0 && this.DataUnsafe is not null) { - ImGuiNative.igMemFree(this.DataUnsafe); + ImGui.MemFree(this.DataUnsafe); this.DataUnsafe = null; } @@ -504,7 +505,7 @@ public unsafe struct ImVectorWrapper : IList, IList, IReadOnlyList, IDi var newAlloc = (T*)(capacity == 0 ? null - : ImGuiNative.igMemAlloc(checked((uint)(capacity * sizeof(T))))); + : ImGui.MemAlloc(checked((uint)(capacity * sizeof(T))))); if (newAlloc is null && capacity > 0) throw new OutOfMemoryException(); @@ -515,7 +516,7 @@ public unsafe struct ImVectorWrapper : IList, IList, IReadOnlyList, IDi oldSpan[..this.LengthUnsafe].CopyTo(newSpan); if (oldAlloc != null) - ImGuiNative.igMemFree(oldAlloc); + ImGui.MemFree(oldAlloc); this.DataUnsafe = newAlloc; this.CapacityUnsafe = capacity; @@ -685,9 +686,9 @@ public static class ImVectorWrapper /// The owner object. /// The wrapped vector. public static unsafe ImVectorWrapper ConfigDataWrapped(this ImFontAtlasPtr obj) => - obj.NativePtr is null + obj.Handle is null ? throw new NullReferenceException() - : new(&obj.NativePtr->ConfigData, ImGuiNative.ImFontConfig_destroy); + : new((ImVector*)Unsafe.AsPointer(ref obj.ConfigData), x => x->Destroy()); /// /// Wraps into a .
@@ -696,9 +697,9 @@ public static class ImVectorWrapper /// The owner object. /// The wrapped vector. public static unsafe ImVectorWrapper FontsWrapped(this ImFontAtlasPtr obj) => - obj.NativePtr is null + obj.Handle is null ? throw new NullReferenceException() - : new(&obj.NativePtr->Fonts, x => ImGuiNative.ImFont_destroy(x->NativePtr)); + : new((ImVector*)Unsafe.AsPointer(ref obj.Fonts), x => x->Destroy()); /// /// Wraps into a .
@@ -707,9 +708,9 @@ public static class ImVectorWrapper /// The owner object. /// The wrapped vector. public static unsafe ImVectorWrapper TexturesWrapped(this ImFontAtlasPtr obj) => - obj.NativePtr is null + obj.Handle is null ? throw new NullReferenceException() - : new(&obj.NativePtr->Textures); + : new((ImVector*)Unsafe.AsPointer(ref obj.Textures)); /// /// Wraps into a .
@@ -718,9 +719,9 @@ public static class ImVectorWrapper /// The owner object. /// The wrapped vector. public static unsafe ImVectorWrapper GlyphsWrapped(this ImFontPtr obj) => - obj.NativePtr is null + obj.Handle is null ? throw new NullReferenceException() - : new(&obj.NativePtr->Glyphs); + : new((ImVector*)Unsafe.AsPointer(ref obj.Glyphs)); /// /// Wraps into a .
@@ -729,9 +730,9 @@ public static class ImVectorWrapper /// The owner object. /// The wrapped vector. public static unsafe ImVectorWrapper IndexedHotDataWrapped(this ImFontPtr obj) - => obj.NativePtr is null + => obj.Handle is null ? throw new NullReferenceException() - : new(&obj.NativePtr->IndexedHotData); + : new((ImVector*)Unsafe.AsPointer(ref obj.IndexedHotData)); /// /// Wraps into a .
@@ -740,7 +741,7 @@ public static class ImVectorWrapper /// The owner object. /// The wrapped vector. public static unsafe ImVectorWrapper IndexLookupWrapped(this ImFontPtr obj) => - obj.NativePtr is null + obj.Handle is null ? throw new NullReferenceException() - : new(&obj.NativePtr->IndexLookup); + : new((ImVector*)Unsafe.AsPointer(ref obj.IndexLookup)); } diff --git a/Dalamud/Interface/Utility/Internal/DevTextureSaveMenu.cs b/Dalamud/Interface/Utility/Internal/DevTextureSaveMenu.cs index a6584f9aa..2c4bb3799 100644 --- a/Dalamud/Interface/Utility/Internal/DevTextureSaveMenu.cs +++ b/Dalamud/Interface/Utility/Internal/DevTextureSaveMenu.cs @@ -11,7 +11,7 @@ using Dalamud.Interface.Internal; using Dalamud.Interface.Textures.Internal; using Dalamud.Interface.Textures.TextureWraps; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; diff --git a/Dalamud/Interface/Utility/Raii/Color.cs b/Dalamud/Interface/Utility/Raii/Color.cs index 3cf93b65c..98a09d4f8 100644 --- a/Dalamud/Interface/Utility/Raii/Color.cs +++ b/Dalamud/Interface/Utility/Raii/Color.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Numerics; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility.Raii; diff --git a/Dalamud/Interface/Utility/Raii/EndObjects.cs b/Dalamud/Interface/Utility/Raii/EndObjects.cs index 261c071c3..df0339a17 100644 --- a/Dalamud/Interface/Utility/Raii/EndObjects.cs +++ b/Dalamud/Interface/Utility/Raii/EndObjects.cs @@ -1,7 +1,7 @@ using System.Numerics; using System.Text; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility.Raii; @@ -129,7 +129,7 @@ public static partial class ImRaii => new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label)); public static unsafe IEndObject TabItem(byte* label, ImGuiTabItemFlags flags) - => new EndConditionally(ImGuiNative.igEndTabItem, ImGuiNative.igBeginTabItem(label, null, flags) != 0); + => new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, null, flags)); public static unsafe IEndObject TabItem(string label, ImGuiTabItemFlags flags) { @@ -155,9 +155,9 @@ public static partial class ImRaii nativeLabelStackBytes[nativeLabelOffset] = 0; - var ret = ImGuiNative.igBeginTabItem(nativeLabelStackBytes, null, flags); + var ret = ImGui.BeginTabItem(nativeLabelStackBytes, null, flags); - return new EndConditionally(ImGuiNative.igEndTabItem, ret != 0); + return new EndConditionally(ImGui.EndTabItem, true); } public static IEndObject TabItem(string label, ref bool open) diff --git a/Dalamud/Interface/Utility/Raii/Font.cs b/Dalamud/Interface/Utility/Raii/Font.cs index 2d11bb071..1b5e8cc58 100644 --- a/Dalamud/Interface/Utility/Raii/Font.cs +++ b/Dalamud/Interface/Utility/Raii/Font.cs @@ -1,4 +1,4 @@ -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility.Raii; diff --git a/Dalamud/Interface/Utility/Raii/Id.cs b/Dalamud/Interface/Utility/Raii/Id.cs index 51c6438c4..e3ab0bfcd 100644 --- a/Dalamud/Interface/Utility/Raii/Id.cs +++ b/Dalamud/Interface/Utility/Raii/Id.cs @@ -1,4 +1,4 @@ -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility.Raii; @@ -41,11 +41,11 @@ public static partial class ImRaii return this; } - public Id Push(IntPtr id, bool condition = true) + public unsafe Id Push(IntPtr id, bool condition = true) { if (condition) { - ImGui.PushID(id); + ImGui.PushID(id.ToPointer()); ++this.count; } diff --git a/Dalamud/Interface/Utility/Raii/Indent.cs b/Dalamud/Interface/Utility/Raii/Indent.cs index 3c8f0f1da..5057cebf1 100644 --- a/Dalamud/Interface/Utility/Raii/Indent.cs +++ b/Dalamud/Interface/Utility/Raii/Indent.cs @@ -1,4 +1,4 @@ -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility.Raii; diff --git a/Dalamud/Interface/Utility/Raii/Plot.cs b/Dalamud/Interface/Utility/Raii/Plot.cs index fdf8ddf5a..a811282ea 100644 --- a/Dalamud/Interface/Utility/Raii/Plot.cs +++ b/Dalamud/Interface/Utility/Raii/Plot.cs @@ -2,9 +2,8 @@ using System.Collections.Generic; using System.Linq; using System.Numerics; -using ImGuiNET; - -using ImPlotNET; +using Dalamud.Bindings.ImGui; +using Dalamud.Bindings.ImPlot; namespace Dalamud.Interface.Utility.Raii; @@ -13,26 +12,26 @@ public static partial class ImRaii { #region EndObjects - public static IEndObject Plot(string title_id, Vector2 size, ImPlotFlags flags) - => new EndConditionally(ImPlot.EndPlot, ImPlot.BeginPlot(title_id, size, flags)); + public static IEndObject Plot(string titleId, Vector2 size, ImPlotFlags flags) + => new EndConditionally(ImPlot.EndPlot, ImPlot.BeginPlot(titleId, size, flags)); - public static IEndObject AlignedPlots(string group_id, bool vertical = true) - => new EndConditionally(ImPlot.EndAlignedPlots, ImPlot.BeginAlignedPlots(group_id, vertical)); + public static IEndObject AlignedPlots(string groupId, bool vertical = true) + => new EndConditionally(ImPlot.EndAlignedPlots, ImPlot.BeginAlignedPlots(groupId, vertical)); - public static IEndObject LegendPopup(string label_id, ImGuiMouseButton mouse_button = ImGuiMouseButton.Right) - => new EndConditionally(ImPlot.EndLegendPopup, ImPlot.BeginLegendPopup(label_id, mouse_button)); + public static IEndObject LegendPopup(string labelId, ImGuiMouseButton mouseButton = ImGuiMouseButton.Right) + => new EndConditionally(ImPlot.EndLegendPopup, ImPlot.BeginLegendPopup(labelId, mouseButton)); - public static IEndObject Subplots(string title_id, int rows, int cols, Vector2 size, ImPlotSubplotFlags flags = ImPlotSubplotFlags.None) - => new EndConditionally(ImPlot.EndSubplots, ImPlot.BeginSubplots(title_id, rows, cols, size, flags)); + public static IEndObject Subplots(string titleId, int rows, int cols, Vector2 size, ImPlotSubplotFlags flags = ImPlotSubplotFlags.None) + => new EndConditionally(ImPlot.EndSubplots, ImPlot.BeginSubplots(titleId, rows, cols, size, flags)); - public static IEndObject Subplots(string title_id, int rows, int cols, Vector2 size, ImPlotSubplotFlags flags, ref float row_ratios, ref float col_ratios) - => new EndConditionally(ImPlot.EndSubplots, ImPlot.BeginSubplots(title_id, rows, cols, size, flags, ref row_ratios, ref col_ratios)); + public static IEndObject Subplots(string titleId, int rows, int cols, Vector2 size, ImPlotSubplotFlags flags, ref float rowRatios, ref float colRatios) + => new EndConditionally(ImPlot.EndSubplots, ImPlot.BeginSubplots(titleId, rows, cols, size, flags, ref rowRatios, ref colRatios)); public static IEndObject DragDropSourceAxis(ImAxis axis, ImGuiDragDropFlags flags = ImGuiDragDropFlags.None) => new EndConditionally(ImPlot.EndDragDropSource, ImPlot.BeginDragDropSourceAxis(axis, flags)); - - public static IEndObject DragDropSourceItem(string label_id, ImGuiDragDropFlags flags = ImGuiDragDropFlags.None) - => new EndConditionally(ImPlot.EndDragDropSource, ImPlot.BeginDragDropSourceItem(label_id, flags)); + + public static IEndObject DragDropSourceItem(string labelId, ImGuiDragDropFlags flags = ImGuiDragDropFlags.None) + => new EndConditionally(ImPlot.EndDragDropSource, ImPlot.BeginDragDropSourceItem(labelId, flags)); public static IEndObject DragDropSourcePlot(ImGuiDragDropFlags flags = ImGuiDragDropFlags.None) => new EndConditionally(ImPlot.EndDragDropSource, ImPlot.BeginDragDropSourcePlot(flags)); @@ -94,9 +93,9 @@ public static partial class ImRaii ImPlotStyleVar.FillAlpha => type != typeof(float), ImPlotStyleVar.ErrorBarSize => type != typeof(float), ImPlotStyleVar.ErrorBarWeight => type != typeof(float), - ImPlotStyleVar.DigitalBitHeight => type != typeof(float), - ImPlotStyleVar.DigitalBitGap => type != typeof(float), - ImPlotStyleVar.PlotBorderSize => type != typeof(float), + // ImPlotStyleVar.DigitalBitHeight => type != typeof(float), + // ImPlotStyleVar.DigitalBitGap => type != typeof(float), + // ImPlotStyleVar.PlotBorderSize => type != typeof(float), ImPlotStyleVar.MinorAlpha => type != typeof(float), ImPlotStyleVar.MajorTickLen => type != typeof(Vector2), ImPlotStyleVar.MinorTickLen => type != typeof(Vector2), @@ -104,7 +103,7 @@ public static partial class ImRaii ImPlotStyleVar.MinorTickSize => type != typeof(Vector2), ImPlotStyleVar.MajorGridSize => type != typeof(Vector2), ImPlotStyleVar.MinorGridSize => type != typeof(Vector2), - ImPlotStyleVar.PlotPadding => type != typeof(Vector2), + // ImPlotStyleVar.PlotPadding => type != typeof(Vector2), ImPlotStyleVar.LabelPadding => type != typeof(Vector2), ImPlotStyleVar.LegendPadding => type != typeof(Vector2), ImPlotStyleVar.LegendInnerPadding => type != typeof(Vector2), @@ -112,8 +111,8 @@ public static partial class ImRaii ImPlotStyleVar.MousePosPadding => type != typeof(Vector2), ImPlotStyleVar.AnnotationPadding => type != typeof(Vector2), ImPlotStyleVar.FitPadding => type != typeof(Vector2), - ImPlotStyleVar.PlotDefaultSize => type != typeof(Vector2), - ImPlotStyleVar.PlotMinSize => type != typeof(Vector2), + // ImPlotStyleVar.PlotDefaultSize => type != typeof(Vector2), + // ImPlotStyleVar.PlotMinSize => type != typeof(Vector2), _ => throw new ArgumentOutOfRangeException(nameof(idx), idx, null), }; @@ -133,9 +132,9 @@ public static partial class ImRaii ImPlotStyleVar.FillAlpha => new Vector2(style.FillAlpha, float.NaN), ImPlotStyleVar.ErrorBarSize => new Vector2(style.ErrorBarSize, float.NaN), ImPlotStyleVar.ErrorBarWeight => new Vector2(style.ErrorBarWeight, float.NaN), - ImPlotStyleVar.DigitalBitHeight => new Vector2(style.DigitalBitHeight, float.NaN), - ImPlotStyleVar.DigitalBitGap => new Vector2(style.DigitalBitGap, float.NaN), - ImPlotStyleVar.PlotBorderSize => new Vector2(style.PlotBorderSize, float.NaN), + // ImPlotStyleVar.DigitalBitHeight => new Vector2(style.DigitalBitHeight, float.NaN), + // ImPlotStyleVar.DigitalBitGap => new Vector2(style.DigitalBitGap, float.NaN), + // ImPlotStyleVar.PlotBorderSize => new Vector2(style.PlotBorderSize, float.NaN), ImPlotStyleVar.MinorAlpha => new Vector2(style.MinorAlpha, float.NaN), ImPlotStyleVar.MajorTickLen => style.MajorTickLen, ImPlotStyleVar.MinorTickLen => style.MinorTickLen, @@ -143,7 +142,7 @@ public static partial class ImRaii ImPlotStyleVar.MinorTickSize => style.MinorTickSize, ImPlotStyleVar.MajorGridSize => style.MajorGridSize, ImPlotStyleVar.MinorGridSize => style.MinorGridSize, - ImPlotStyleVar.PlotPadding => style.PlotPadding, + // ImPlotStyleVar.PlotPadding => style.PlotPadding, ImPlotStyleVar.LabelPadding => style.LabelPadding, ImPlotStyleVar.LegendPadding => style.LegendPadding, ImPlotStyleVar.LegendInnerPadding => style.LegendInnerPadding, @@ -151,8 +150,8 @@ public static partial class ImRaii ImPlotStyleVar.MousePosPadding => style.MousePosPadding, ImPlotStyleVar.AnnotationPadding => style.AnnotationPadding, ImPlotStyleVar.FitPadding => style.FitPadding, - ImPlotStyleVar.PlotDefaultSize => style.PlotDefaultSize, - ImPlotStyleVar.PlotMinSize => style.PlotMinSize, + // ImPlotStyleVar.PlotDefaultSize => style.PlotDefaultSize, + // ImPlotStyleVar.PlotMinSize => style.PlotMinSize, _ => throw new ArgumentOutOfRangeException(nameof(idx), idx, null), }; } diff --git a/Dalamud/Interface/Utility/Raii/Style.cs b/Dalamud/Interface/Utility/Raii/Style.cs index 6a8db074b..bfd04ea3c 100644 --- a/Dalamud/Interface/Utility/Raii/Style.cs +++ b/Dalamud/Interface/Utility/Raii/Style.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Numerics; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility.Raii; diff --git a/Dalamud/Interface/Utility/Table/Column.cs b/Dalamud/Interface/Utility/Table/Column.cs index 412ba87dc..0f6633b46 100644 --- a/Dalamud/Interface/Utility/Table/Column.cs +++ b/Dalamud/Interface/Utility/Table/Column.cs @@ -1,4 +1,4 @@ -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility.Table; diff --git a/Dalamud/Interface/Utility/Table/ColumnFlags.cs b/Dalamud/Interface/Utility/Table/ColumnFlags.cs index 24670adfc..cc22e17c9 100644 --- a/Dalamud/Interface/Utility/Table/ColumnFlags.cs +++ b/Dalamud/Interface/Utility/Table/ColumnFlags.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility.Table; diff --git a/Dalamud/Interface/Utility/Table/ColumnSelect.cs b/Dalamud/Interface/Utility/Table/ColumnSelect.cs index fb463700c..fd796be60 100644 --- a/Dalamud/Interface/Utility/Table/ColumnSelect.cs +++ b/Dalamud/Interface/Utility/Table/ColumnSelect.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; namespace Dalamud.Interface.Utility.Table; diff --git a/Dalamud/Interface/Utility/Table/ColumnString.cs b/Dalamud/Interface/Utility/Table/ColumnString.cs index 3f9d2df91..587e3beaf 100644 --- a/Dalamud/Interface/Utility/Table/ColumnString.cs +++ b/Dalamud/Interface/Utility/Table/ColumnString.cs @@ -1,7 +1,7 @@ using System.Text.RegularExpressions; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility.Table; diff --git a/Dalamud/Interface/Utility/Table/Table.cs b/Dalamud/Interface/Utility/Table/Table.cs index 86653e834..5b8e867e7 100644 --- a/Dalamud/Interface/Utility/Table/Table.cs +++ b/Dalamud/Interface/Utility/Table/Table.cs @@ -4,7 +4,7 @@ using System.Numerics; using Dalamud.Interface.Utility.Raii; using Dalamud.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Utility.Table; diff --git a/Dalamud/Interface/Windowing/Window.cs b/Dalamud/Interface/Windowing/Window.cs index b3a505c1d..e0dfd01a1 100644 --- a/Dalamud/Interface/Windowing/Window.cs +++ b/Dalamud/Interface/Windowing/Window.cs @@ -17,7 +17,7 @@ using Dalamud.Logging.Internal; using FFXIVClientStructs.FFXIV.Client.UI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using PInvoke; @@ -379,7 +379,11 @@ public abstract class Window if (this.CanShowCloseButton ? ImGui.Begin(this.WindowName, ref this.internalIsOpen, flags) : ImGui.Begin(this.WindowName, flags)) { - ImGuiNativeAdditions.igCustom_WindowSetInheritNoInputs(this.internalIsClickthrough); + var context = ImGui.GetCurrentContext(); + if (!context.IsNull) + { + //ImGuiNativeAdditions.igCustom_WindowSetInheritNoInputs(this.internalIsClickthrough); + } // Not supported yet on non-main viewports if ((this.internalIsPinned || this.internalIsClickthrough || this.internalAlpha.HasValue) && @@ -491,6 +495,7 @@ public abstract class Window var titleBarRect = Vector4.Zero; unsafe { + /* var window = ImGuiNativeAdditions.igGetCurrentWindow(); ImGuiNativeAdditions.ImGuiWindow_TitleBarRect(&titleBarRect, window); @@ -515,6 +520,7 @@ public abstract class Window ? this.TitleBarButtons.Append(additionsButton) : this.TitleBarButtons); } + */ } if (wasFocused) diff --git a/Dalamud/Interface/Windowing/WindowSystem.cs b/Dalamud/Interface/Windowing/WindowSystem.cs index f79eea025..ca602b001 100644 --- a/Dalamud/Interface/Windowing/WindowSystem.cs +++ b/Dalamud/Interface/Windowing/WindowSystem.cs @@ -4,7 +4,7 @@ using System.Linq; using Dalamud.Configuration.Internal; using Dalamud.Interface.Windowing.Persistence; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Serilog; namespace Dalamud.Interface.Windowing; diff --git a/Dalamud/Memory/MemoryHelper.cs b/Dalamud/Memory/MemoryHelper.cs index 212feb128..a5497898f 100644 --- a/Dalamud/Memory/MemoryHelper.cs +++ b/Dalamud/Memory/MemoryHelper.cs @@ -3,6 +3,8 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; +using Windows.Win32.System.Memory; + using Dalamud.Game.Text.SeStringHandling; using Dalamud.Memory.Exceptions; using Dalamud.Utility; @@ -743,16 +745,16 @@ public static unsafe class MemoryHelper [MethodImpl(MethodImplOptions.AggressiveInlining)] public static nint Allocate(int length) { - var address = VirtualAlloc( - nint.Zero, + var address = Windows.Win32.PInvoke.VirtualAlloc( + null, (nuint)length, - AllocationType.Commit | AllocationType.Reserve, - MemoryProtection.ExecuteReadWrite); + VIRTUAL_ALLOCATION_TYPE.MEM_COMMIT | VIRTUAL_ALLOCATION_TYPE.MEM_RESERVE, + PAGE_PROTECTION_FLAGS.PAGE_EXECUTE_READWRITE); - if (address == nint.Zero) + if (address == null) throw new MemoryAllocationException($"Unable to allocate {length} bytes."); - return address; + return new IntPtr(address); } /// @@ -773,7 +775,7 @@ public static unsafe class MemoryHelper [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool Free(nint memoryAddress) { - return VirtualFree(memoryAddress, nuint.Zero, AllocationType.Release); + return Windows.Win32.PInvoke.VirtualFree(memoryAddress.ToPointer(), nuint.Zero, VIRTUAL_FREE_TYPE.MEM_RELEASE); } /// @@ -785,7 +787,11 @@ public static unsafe class MemoryHelper /// The old page permissions. public static MemoryProtection ChangePermission(nint memoryAddress, int length, MemoryProtection newPermissions) { - var result = VirtualProtect(memoryAddress, (nuint)length, newPermissions, out var oldPermissions); + var result = Windows.Win32.PInvoke.VirtualProtect( + memoryAddress.ToPointer(), + (nuint)length, + (PAGE_PROTECTION_FLAGS)newPermissions, + out var oldPermissions); if (!result) throw new MemoryPermissionException($"Unable to change permissions at {Util.DescribeAddress(memoryAddress)} of length {length} and permission {newPermissions} (result={result})"); @@ -794,7 +800,7 @@ public static unsafe class MemoryHelper if (last > 0) throw new MemoryPermissionException($"Unable to change permissions at {Util.DescribeAddress(memoryAddress)} of length {length} and permission {newPermissions} (error={last})"); - return oldPermissions; + return (MemoryProtection)oldPermissions; } /// diff --git a/Dalamud/NativeFunctions.cs b/Dalamud/NativeFunctions.cs index 32ab99372..ef415137d 100644 --- a/Dalamud/NativeFunctions.cs +++ b/Dalamud/NativeFunctions.cs @@ -133,194 +133,6 @@ internal static partial class NativeFunctions Wait = 32514, } - /// - /// MB_* from winuser. - /// - [Flags] - public enum MessageBoxType : uint - { - /// - /// The default value for any of the various subtypes. - /// - DefaultValue = 0x0, - - // To indicate the buttons displayed in the message box, specify one of the following values. - - /// - /// The message box contains three push buttons: Abort, Retry, and Ignore. - /// - AbortRetryIgnore = 0x2, - - /// - /// The message box contains three push buttons: Cancel, Try Again, Continue. Use this message box type instead - /// of MB_ABORTRETRYIGNORE. - /// - CancelTryContinue = 0x6, - - /// - /// Adds a Help button to the message box. When the user clicks the Help button or presses F1, the system sends - /// a WM_HELP message to the owner. - /// - Help = 0x4000, - - /// - /// The message box contains one push button: OK. This is the default. - /// - Ok = DefaultValue, - - /// - /// The message box contains two push buttons: OK and Cancel. - /// - OkCancel = 0x1, - - /// - /// The message box contains two push buttons: Retry and Cancel. - /// - RetryCancel = 0x5, - - /// - /// The message box contains two push buttons: Yes and No. - /// - YesNo = 0x4, - - /// - /// The message box contains three push buttons: Yes, No, and Cancel. - /// - YesNoCancel = 0x3, - - // To display an icon in the message box, specify one of the following values. - - /// - /// An exclamation-point icon appears in the message box. - /// - IconExclamation = 0x30, - - /// - /// An exclamation-point icon appears in the message box. - /// - IconWarning = IconExclamation, - - /// - /// An icon consisting of a lowercase letter i in a circle appears in the message box. - /// - IconInformation = 0x40, - - /// - /// An icon consisting of a lowercase letter i in a circle appears in the message box. - /// - IconAsterisk = IconInformation, - - /// - /// A question-mark icon appears in the message box. - /// The question-mark message icon is no longer recommended because it does not clearly represent a specific type - /// of message and because the phrasing of a message as a question could apply to any message type. In addition, - /// users can confuse the message symbol question mark with Help information. Therefore, do not use this question - /// mark message symbol in your message boxes. The system continues to support its inclusion only for backward - /// compatibility. - /// - IconQuestion = 0x20, - - /// - /// A stop-sign icon appears in the message box. - /// - IconStop = 0x10, - - /// - /// A stop-sign icon appears in the message box. - /// - IconError = IconStop, - - /// - /// A stop-sign icon appears in the message box. - /// - IconHand = IconStop, - - // To indicate the default button, specify one of the following values. - - /// - /// The first button is the default button. - /// MB_DEFBUTTON1 is the default unless MB_DEFBUTTON2, MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified. - /// - DefButton1 = DefaultValue, - - /// - /// The second button is the default button. - /// - DefButton2 = 0x100, - - /// - /// The third button is the default button. - /// - DefButton3 = 0x200, - - /// - /// The fourth button is the default button. - /// - DefButton4 = 0x300, - - // To indicate the modality of the dialog box, specify one of the following values. - - /// - /// The user must respond to the message box before continuing work in the window identified by the hWnd parameter. - /// However, the user can move to the windows of other threads and work in those windows. Depending on the hierarchy - /// of windows in the application, the user may be able to move to other windows within the thread. All child windows - /// of the parent of the message box are automatically disabled, but pop-up windows are not. MB_APPLMODAL is the - /// default if neither MB_SYSTEMMODAL nor MB_TASKMODAL is specified. - /// - ApplModal = DefaultValue, - - /// - /// Same as MB_APPLMODAL except that the message box has the WS_EX_TOPMOST style. - /// Use system-modal message boxes to notify the user of serious, potentially damaging errors that require immediate - /// attention (for example, running out of memory). This flag has no effect on the user's ability to interact with - /// windows other than those associated with hWnd. - /// - SystemModal = 0x1000, - - /// - /// Same as MB_APPLMODAL except that all the top-level windows belonging to the current thread are disabled if the - /// hWnd parameter is NULL. Use this flag when the calling application or library does not have a window handle - /// available but still needs to prevent input to other windows in the calling thread without suspending other threads. - /// - TaskModal = 0x2000, - - // To specify other options, use one or more of the following values. - - /// - /// Same as desktop of the interactive window station. For more information, see Window Stations. If the current - /// input desktop is not the default desktop, MessageBox does not return until the user switches to the default - /// desktop. - /// - DefaultDesktopOnly = 0x20000, - - /// - /// The text is right-justified. - /// - Right = 0x80000, - - /// - /// Displays message and caption text using right-to-left reading order on Hebrew and Arabic systems. - /// - RtlReading = 0x100000, - - /// - /// The message box becomes the foreground window. Internally, the system calls the SetForegroundWindow function - /// for the message box. - /// - SetForeground = 0x10000, - - /// - /// The message box is created with the WS_EX_TOPMOST window style. - /// - Topmost = 0x40000, - - /// - /// The caller is a service notifying the user of an event. The function displays a message box on the current active - /// desktop, even if there is no user logged on to the computer. - /// - ServiceNotification = 0x200000, - } - /// /// GWL_* from winuser. /// @@ -735,38 +547,9 @@ internal static partial class NativeFunctions /// /// The return value is the identifier of the thread that created the window. /// - [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] + [DllImport("user32.dll", CharSet = CharSet.Auto)] public static extern int GetWindowThreadProcessId(IntPtr handle, out int processId); - /// - /// Displays a modal dialog box that contains a system icon, a set of buttons, and a brief application-specific message, - /// such as status or error information. The message box returns an integer value that indicates which button the user - /// clicked. - /// - /// - /// A handle to the owner window of the message box to be created. If this parameter is NULL, the message box has no - /// owner window. - /// - /// - /// The message to be displayed. If the string consists of more than one line, you can separate the lines using a carriage - /// return and/or linefeed character between each line. - /// - /// - /// The dialog box title. If this parameter is NULL, the default title is Error. - /// - /// The contents and behavior of the dialog box. This parameter can be a combination of flags from the following groups - /// of flags. - /// - /// - /// If a message box has a Cancel button, the function returns the IDCANCEL value if either the ESC key is pressed or - /// the Cancel button is selected. If the message box has no Cancel button, pressing ESC will no effect - unless an - /// MB_OK button is present. If an MB_OK button is displayed and the user presses ESC, the return value will be IDOK. - /// If the function fails, the return value is zero.To get extended error information, call GetLastError. If the function - /// succeeds, the return value is one of the ID* enum values. - /// - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - public static extern int MessageBoxW(IntPtr hWnd, string text, string caption, MessageBoxType type); - /// /// Changes an attribute of the specified window. The function also sets a value at the specified offset in the extra window memory. /// @@ -789,7 +572,7 @@ internal static partial class NativeFunctions /// the last error information by calling SetLastError with 0, then call SetWindowLongPtr.Function failure will be indicated by /// a return value of zero and a GetLastError result that is nonzero. /// - [DllImport("user32.dll", SetLastError = true)] + [DllImport("user32.dll")] public static extern IntPtr SetWindowLongPtrW(IntPtr hWnd, WindowLongType nIndex, IntPtr dwNewLong); /// @@ -835,7 +618,7 @@ internal static partial class NativeFunctions SPI_GETCLIENTAREAANIMATION = 0x1042, #pragma warning restore SA1602 } - + /// /// Retrieves or sets the value of one of the system-wide parameters. This function can also update the user profile while setting a parameter. /// @@ -844,7 +627,7 @@ internal static partial class NativeFunctions /// A parameter whose usage and format depends on the system parameter being queried or set. If not otherwise indicated, you must specify zero for this parameter. /// If a system parameter is being set, specifies whether the user profile is to be updated, and if so, whether the WM_SETTINGCHANGE message is to be broadcast to all top-level windows to notify them of the change. /// If the function succeeds, the return value is a nonzero value. - [DllImport("user32.dll", SetLastError = true)] + [DllImport("user32.dll")] public static extern bool SystemParametersInfo(uint uiAction, uint uiParam, ref int pvParam, uint fWinIni); } @@ -1156,117 +939,6 @@ internal static partial class NativeFunctions [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1629:Documentation text should end with a period", Justification = "Stupid rule")] internal static partial class NativeFunctions { - /// - /// MEM_* from memoryapi. - /// - [Flags] - public enum AllocationType - { - /// - /// To coalesce two adjacent placeholders, specify MEM_RELEASE | MEM_COALESCE_PLACEHOLDERS. When you coalesce - /// placeholders, lpAddress and dwSize must exactly match those of the placeholder. - /// - CoalescePlaceholders = 0x1, - - /// - /// Frees an allocation back to a placeholder (after you've replaced a placeholder with a private allocation using - /// VirtualAlloc2 or Virtual2AllocFromApp). To split a placeholder into two placeholders, specify - /// MEM_RELEASE | MEM_PRESERVE_PLACEHOLDER. - /// - PreservePlaceholder = 0x2, - - /// - /// Allocates memory charges (from the overall size of memory and the paging files on disk) for the specified reserved - /// memory pages. The function also guarantees that when the caller later initially accesses the memory, the contents - /// will be zero. Actual physical pages are not allocated unless/until the virtual addresses are actually accessed. - /// To reserve and commit pages in one step, call VirtualAllocEx with MEM_COMMIT | MEM_RESERVE. Attempting to commit - /// a specific address range by specifying MEM_COMMIT without MEM_RESERVE and a non-NULL lpAddress fails unless the - /// entire range has already been reserved. The resulting error code is ERROR_INVALID_ADDRESS. An attempt to commit - /// a page that is already committed does not cause the function to fail. This means that you can commit pages without - /// first determining the current commitment state of each page. If lpAddress specifies an address within an enclave, - /// flAllocationType must be MEM_COMMIT. - /// - Commit = 0x1000, - - /// - /// Reserves a range of the process's virtual address space without allocating any actual physical storage in memory - /// or in the paging file on disk. You commit reserved pages by calling VirtualAllocEx again with MEM_COMMIT. To - /// reserve and commit pages in one step, call VirtualAllocEx with MEM_COMMIT | MEM_RESERVE. Other memory allocation - /// functions, such as malloc and LocalAlloc, cannot use reserved memory until it has been released. - /// - Reserve = 0x2000, - - /// - /// Decommits the specified region of committed pages. After the operation, the pages are in the reserved state. - /// The function does not fail if you attempt to decommit an uncommitted page. This means that you can decommit - /// a range of pages without first determining the current commitment state. The MEM_DECOMMIT value is not supported - /// when the lpAddress parameter provides the base address for an enclave. - /// - Decommit = 0x4000, - - /// - /// Releases the specified region of pages, or placeholder (for a placeholder, the address space is released and - /// available for other allocations). After this operation, the pages are in the free state. If you specify this - /// value, dwSize must be 0 (zero), and lpAddress must point to the base address returned by the VirtualAlloc function - /// when the region is reserved. The function fails if either of these conditions is not met. If any pages in the - /// region are committed currently, the function first decommits, and then releases them. The function does not - /// fail if you attempt to release pages that are in different states, some reserved and some committed. This means - /// that you can release a range of pages without first determining the current commitment state. - /// - Release = 0x8000, - - /// - /// Indicates that data in the memory range specified by lpAddress and dwSize is no longer of interest. The pages - /// should not be read from or written to the paging file. However, the memory block will be used again later, so - /// it should not be decommitted. This value cannot be used with any other value. Using this value does not guarantee - /// that the range operated on with MEM_RESET will contain zeros. If you want the range to contain zeros, decommit - /// the memory and then recommit it. When you use MEM_RESET, the VirtualAllocEx function ignores the value of fProtect. - /// However, you must still set fProtect to a valid protection value, such as PAGE_NOACCESS. VirtualAllocEx returns - /// an error if you use MEM_RESET and the range of memory is mapped to a file. A shared view is only acceptable - /// if it is mapped to a paging file. - /// - Reset = 0x80000, - - /// - /// MEM_RESET_UNDO should only be called on an address range to which MEM_RESET was successfully applied earlier. - /// It indicates that the data in the specified memory range specified by lpAddress and dwSize is of interest to - /// the caller and attempts to reverse the effects of MEM_RESET. If the function succeeds, that means all data in - /// the specified address range is intact. If the function fails, at least some of the data in the address range - /// has been replaced with zeroes. This value cannot be used with any other value. If MEM_RESET_UNDO is called on - /// an address range which was not MEM_RESET earlier, the behavior is undefined. When you specify MEM_RESET, the - /// VirtualAllocEx function ignores the value of flProtect. However, you must still set flProtect to a valid - /// protection value, such as PAGE_NOACCESS. - /// - ResetUndo = 0x1000000, - - /// - /// Reserves an address range that can be used to map Address Windowing Extensions (AWE) pages. This value must - /// be used with MEM_RESERVE and no other values. - /// - Physical = 0x400000, - - /// - /// Allocates memory at the highest possible address. This can be slower than regular allocations, especially when - /// there are many allocations. - /// - TopDown = 0x100000, - - /// - /// Causes the system to track pages that are written to in the allocated region. If you specify this value, you - /// must also specify MEM_RESERVE. To retrieve the addresses of the pages that have been written to since the region - /// was allocated or the write-tracking state was reset, call the GetWriteWatch function. To reset the write-tracking - /// state, call GetWriteWatch or ResetWriteWatch. The write-tracking feature remains enabled for the memory region - /// until the region is freed. - /// - WriteWatch = 0x200000, - - /// - /// Allocates memory using large page support. The size and alignment must be a multiple of the large-page minimum. - /// To obtain this value, use the GetLargePageMinimum function. If you specify this value, you must also specify - /// MEM_RESERVE and MEM_COMMIT. - /// - LargePages = 0x20000000, - } /// /// SEM_* from errhandlingapi. @@ -1428,18 +1100,18 @@ internal static partial class NativeFunctions /// created with this option cannot be locked. /// NoSerialize = 0x00000001, - + /// /// The system raises an exception to indicate failure (for example, an out-of-memory condition) for calls to /// HeapAlloc and HeapReAlloc instead of returning NULL. /// GenerateExceptions = 0x00000004, - + /// /// The allocated memory will be initialized to zero. Otherwise, the memory is not initialized to zero. /// ZeroMemory = 0x00000008, - + /// /// All memory blocks that are allocated from this heap allow code execution, if the hardware enforces data /// execution prevention. Use this flag heap in applications that run code from the heap. If @@ -1475,7 +1147,7 @@ internal static partial class NativeFunctions /// If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended /// error information, call the GetLastError function. /// - [DllImport("kernel32.dll", SetLastError = true)] + [DllImport("kernel32.dll")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool FreeLibrary(IntPtr hModule); @@ -1507,7 +1179,7 @@ internal static partial class NativeFunctions /// code is ERROR_SUCCESS. If the function fails, the return value is 0 (zero). To get extended error information, call /// GetLastError. /// - [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] + [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] [PreserveSig] public static extern uint GetModuleFileNameW( [In] IntPtr hModule, @@ -1532,7 +1204,7 @@ internal static partial class NativeFunctions /// If the function succeeds, the return value is a handle to the specified module. If the function fails, the return /// value is NULL.To get extended error information, call GetLastError. /// - [DllImport("kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] + [DllImport("kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)] public static extern IntPtr GetModuleHandleW(string lpModuleName); /// @@ -1551,7 +1223,7 @@ internal static partial class NativeFunctions /// If the function succeeds, the return value is the address of the exported function or variable. If the function /// fails, the return value is NULL.To get extended error information, call GetLastError. /// - [DllImport("kernel32", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)] + [DllImport("kernel32", CharSet = CharSet.Ansi, ExactSpelling = true)] [SuppressMessage("Globalization", "CA2101:Specify marshaling for P/Invoke string arguments", Justification = "Ansi only")] public static extern IntPtr GetProcAddress(IntPtr hModule, string procName); @@ -1576,7 +1248,7 @@ internal static partial class NativeFunctions /// If the function succeeds, the return value is a handle to the module. If the function fails, the return value is /// NULL.To get extended error information, call GetLastError. /// - [DllImport("kernel32", SetLastError = true, CharSet = CharSet.Unicode)] + [DllImport("kernel32", CharSet = CharSet.Unicode)] public static extern IntPtr LoadLibraryW([MarshalAs(UnmanagedType.LPWStr)] string lpFileName); /// @@ -1607,7 +1279,7 @@ internal static partial class NativeFunctions /// extended error information, call GetLastError. The function fails if the requested read operation crosses into an /// area of the process that is inaccessible. /// - [DllImport("kernel32.dll", SetLastError = true)] + [DllImport("kernel32.dll")] public static extern bool ReadProcessMemory( IntPtr hProcess, IntPtr lpBaseAddress, @@ -1643,7 +1315,7 @@ internal static partial class NativeFunctions /// extended error information, call GetLastError. The function fails if the requested read operation crosses into an /// area of the process that is inaccessible. /// - [DllImport("kernel32.dll", SetLastError = true)] + [DllImport("kernel32.dll")] public static extern bool ReadProcessMemory( IntPtr hProcess, IntPtr lpBaseAddress, @@ -1662,7 +1334,7 @@ internal static partial class NativeFunctions /// /// The return value is the previous state of the error-mode bit flags. /// - [DllImport("kernel32.dll", SetLastError = true)] + [DllImport("kernel32.dll")] public static extern ErrorModes SetErrorMode(ErrorModes uMode); /// @@ -1701,7 +1373,7 @@ internal static partial class NativeFunctions /// /// This value determines the initial amount of memory that is committed for the heap. /// The value is rounded up to a multiple of the system page size. The value must be smaller than dwMaximumSize. - /// + /// /// If this parameter is 0, the function commits one page. To determine the size of a page on the host computer, /// use the GetSystemInfo function. /// @@ -1710,12 +1382,12 @@ internal static partial class NativeFunctions /// system page size and then reserves a block of that size in the process's virtual address space for the heap. /// If allocation requests made by the HeapAlloc or HeapReAlloc functions exceed the size specified by /// dwInitialSize, the system commits additional pages of memory for the heap, up to the heap's maximum size. - /// + /// /// If dwMaximumSize is not zero, the heap size is fixed and cannot grow beyond the maximum size. Also, the largest /// memory block that can be allocated from the heap is slightly less than 512 KB for a 32-bit process and slightly /// less than 1,024 KB for a 64-bit process. Requests to allocate larger blocks fail, even if the maximum size of /// the heap is large enough to contain the block. - /// + /// /// If dwMaximumSize is 0, the heap can grow in size. The heap's size is limited only by the available memory. /// Requests to allocate memory blocks larger than the limit for a fixed-size heap do not automatically fail; /// instead, the system calls the VirtualAlloc function to obtain the memory that is needed for large blocks. @@ -1723,12 +1395,12 @@ internal static partial class NativeFunctions /// /// /// If the function succeeds, the return value is a handle to the newly created heap. - /// + /// /// If the function fails, the return value is NULL. To get extended error information, call GetLastError. /// - [DllImport("kernel32.dll", SetLastError = true)] + [DllImport("kernel32.dll")] public static extern nint HeapCreate(HeapOptions flOptions, nuint dwInitialSize, nuint dwMaximumSize); - + /// /// Allocates a block of memory from a heap. The allocated memory is not movable. /// @@ -1756,131 +1428,6 @@ internal static partial class NativeFunctions /// [DllImport("kernel32.dll", SetLastError=false)] public static extern nint HeapAlloc(nint hHeap, HeapOptions dwFlags, nuint dwBytes); - - /// - /// See https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc. - /// Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process. - /// Memory allocated by this function is automatically initialized to zero. To allocate memory in the address space - /// of another process, use the VirtualAllocEx function. - /// - /// - /// The starting address of the region to allocate. If the memory is being reserved, the specified address is rounded - /// down to the nearest multiple of the allocation granularity. If the memory is already reserved and is being committed, - /// the address is rounded down to the next page boundary. To determine the size of a page and the allocation granularity - /// on the host computer, use the GetSystemInfo function. If this parameter is NULL, the system determines where to - /// allocate the region. If this address is within an enclave that you have not initialized by calling InitializeEnclave, - /// VirtualAlloc allocates a page of zeros for the enclave at that address. The page must be previously uncommitted, - /// and will not be measured with the EEXTEND instruction of the Intel Software Guard Extensions programming model. - /// If the address in within an enclave that you initialized, then the allocation operation fails with the - /// ERROR_INVALID_ADDRESS error. - /// - /// - /// The size of the region, in bytes. If the lpAddress parameter is NULL, this value is rounded up to the next page - /// boundary. Otherwise, the allocated pages include all pages containing one or more bytes in the range from lpAddress - /// to lpAddress+dwSize. This means that a 2-byte range straddling a page boundary causes both pages to be included - /// in the allocated region. - /// - /// - /// The type of memory allocation. This parameter must contain one of the MEM_* enum values. - /// - /// - /// The memory protection for the region of pages to be allocated. If the pages are being committed, you can specify - /// any one of the memory protection constants. - /// - /// - /// If the function succeeds, the return value is the base address of the allocated region of pages. If the function - /// fails, the return value is NULL.To get extended error information, call GetLastError. - /// - [DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)] - public static extern IntPtr VirtualAlloc( - IntPtr lpAddress, - UIntPtr dwSize, - AllocationType flAllocationType, - MemoryProtection flProtect); - - /// - [DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)] - public static extern IntPtr VirtualAlloc( - IntPtr lpAddress, - UIntPtr dwSize, - AllocationType flAllocationType, - Memory.MemoryProtection flProtect); - - /// - /// See https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualfree. - /// Releases, decommits, or releases and decommits a region of pages within the virtual address space of the calling - /// process. - /// process. - /// - /// - /// A pointer to the base address of the region of pages to be freed. If the dwFreeType parameter is MEM_RELEASE, this - /// parameter must be the base address returned by the VirtualAlloc function when the region of pages is reserved. - /// - /// - /// The size of the region of memory to be freed, in bytes. If the dwFreeType parameter is MEM_RELEASE, this parameter - /// must be 0 (zero). The function frees the entire region that is reserved in the initial allocation call to VirtualAlloc. - /// If the dwFreeType parameter is MEM_DECOMMIT, the function decommits all memory pages that contain one or more bytes - /// in the range from the lpAddress parameter to (lpAddress+dwSize). This means, for example, that a 2-byte region of - /// memory that straddles a page boundary causes both pages to be decommitted.If lpAddress is the base address returned - /// by VirtualAlloc and dwSize is 0 (zero), the function decommits the entire region that is allocated by VirtualAlloc. - /// After that, the entire region is in the reserved state. - /// - /// - /// The type of free operation. This parameter must be one of the MEM_* enum values. - /// - /// - /// If the function succeeds, the return value is a nonzero value. If the function fails, the return value is 0 (zero). - /// To get extended error information, call GetLastError. - /// - [DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)] - public static extern bool VirtualFree( - IntPtr lpAddress, - UIntPtr dwSize, - AllocationType dwFreeType); - - /// - /// See https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualprotect. - /// Changes the protection on a region of committed pages in the virtual address space of the calling process. - /// - /// - /// The address of the starting page of the region of pages whose access protection attributes are to be changed. All - /// pages in the specified region must be within the same reserved region allocated when calling the VirtualAlloc or - /// VirtualAllocEx function using MEM_RESERVE. The pages cannot span adjacent reserved regions that were allocated by - /// separate calls to VirtualAlloc or VirtualAllocEx using MEM_RESERVE. - /// - /// - /// The size of the region whose access protection attributes are to be changed, in bytes. The region of affected pages - /// includes all pages containing one or more bytes in the range from the lpAddress parameter to (lpAddress+dwSize). - /// This means that a 2-byte range straddling a page boundary causes the protection attributes of both pages to be changed. - /// - /// - /// The memory protection option. This parameter can be one of the memory protection constants. For mapped views, this - /// value must be compatible with the access protection specified when the view was mapped (see MapViewOfFile, - /// MapViewOfFileEx, and MapViewOfFileExNuma). - /// - /// - /// A pointer to a variable that receives the previous access protection value of the first page in the specified region - /// of pages. If this parameter is NULL or does not point to a valid variable, the function fails. - /// - /// - /// If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. - /// To get extended error information, call GetLastError. - /// - [DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)] - public static extern bool VirtualProtect( - IntPtr lpAddress, - UIntPtr dwSize, - MemoryProtection flNewProtection, - out MemoryProtection lpflOldProtect); - - /// - [DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)] - public static extern bool VirtualProtect( - IntPtr lpAddress, - UIntPtr dwSize, - Memory.MemoryProtection flNewProtection, - out Memory.MemoryProtection lpflOldProtect); - /// /// Writes data to an area of memory in a specified process. The entire area to be written to must be accessible or /// the operation fails. @@ -1909,7 +1456,7 @@ internal static partial class NativeFunctions /// extended error information, call GetLastError.The function fails if the requested write operation crosses into an /// area of the process that is inaccessible. /// - [DllImport("kernel32.dll", SetLastError = true)] + [DllImport("kernel32.dll")] public static extern bool WriteProcessMemory( IntPtr hProcess, IntPtr lpBaseAddress, @@ -1988,7 +1535,7 @@ internal static partial class NativeFunctions /// If this value is , enumerates the loaded modules for the process and effectively calls the SymLoadModule64 function for each module. /// /// Whether or not the function succeeded. - [DllImport("dbghelp.dll", SetLastError = true, CharSet = CharSet.Auto)] + [DllImport("dbghelp.dll", CharSet = CharSet.Auto)] public static extern bool SymInitialize(IntPtr hProcess, string userSearchPath, bool fInvadeProcess); /// @@ -1996,7 +1543,7 @@ internal static partial class NativeFunctions /// /// A handle to the process that was originally passed to the function. /// Whether or not the function succeeded. - [DllImport("dbghelp.dll", SetLastError = true, CharSet = CharSet.Auto)] + [DllImport("dbghelp.dll", CharSet = CharSet.Auto)] public static extern bool SymCleanup(IntPtr hProcess); /// @@ -2043,7 +1590,7 @@ internal static partial class NativeFunctions /// Name of class. /// Name of window. /// Found window, or null. - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] + [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern IntPtr FindWindowEx( IntPtr parentHandle, IntPtr childAfter, diff --git a/Dalamud/NativeMethods.json b/Dalamud/NativeMethods.json new file mode 100644 index 000000000..6001e3abc --- /dev/null +++ b/Dalamud/NativeMethods.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://aka.ms/CsWin32.schema.json", + "allowMarshaling": false, + "public": true +} diff --git a/Dalamud/NativeMethods.txt b/Dalamud/NativeMethods.txt index d9d05e472..d0d8e3dc0 100644 --- a/Dalamud/NativeMethods.txt +++ b/Dalamud/NativeMethods.txt @@ -21,3 +21,15 @@ GlobalAlloc GlobalLock GlobalUnlock GLOBAL_ALLOC_FLAGS + +MEM_ALLOCATION_TYPE +VirtualAlloc +VirtualProtect +VirtualFree + +ReadProcessMemory +WriteProcessMemory + +GetCurrentProcess + +MessageBoxW diff --git a/Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs b/Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs index ce135b947..d19af5efa 100644 --- a/Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs +++ b/Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs @@ -24,7 +24,7 @@ using Dalamud.Logging.Internal; using Dalamud.Plugin.Internal.Types; using Dalamud.Plugin.Services; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Plugin.Internal.AutoUpdate; diff --git a/Dalamud/Plugin/Services/IGamepadState.cs b/Dalamud/Plugin/Services/IGamepadState.cs index c349923f3..e7d57df0b 100644 --- a/Dalamud/Plugin/Services/IGamepadState.cs +++ b/Dalamud/Plugin/Services/IGamepadState.cs @@ -1,7 +1,7 @@ using System.Numerics; using Dalamud.Game.ClientState.GamePad; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace Dalamud.Plugin.Services; @@ -16,12 +16,12 @@ public interface IGamepadState /// Gets the pointer to the current instance of the GamepadInput struct. /// public nint GamepadInputAddress { get; } - + /// /// Gets the left analogue sticks tilt vector. /// public Vector2 LeftStick { get; } - + /// /// Gets the right analogue sticks tilt vector. /// diff --git a/Dalamud/SafeMemory.cs b/Dalamud/SafeMemory.cs index 3365ff118..61f3cf82b 100644 --- a/Dalamud/SafeMemory.cs +++ b/Dalamud/SafeMemory.cs @@ -12,11 +12,11 @@ namespace Dalamud; /// public static class SafeMemory { - private static readonly IntPtr Handle; + private static readonly SafeHandle Handle; static SafeMemory() { - Handle = Imports.GetCurrentProcess(); + Handle = Windows.Win32.PInvoke.GetCurrentProcess_SafeHandle(); } /// @@ -26,10 +26,24 @@ public static class SafeMemory /// The amount of bytes to read. /// The result buffer. /// Whether or not the read succeeded. - public static bool ReadBytes(IntPtr address, int count, out byte[] buffer) + public static unsafe bool ReadBytes(IntPtr address, int count, out byte[] buffer) { buffer = new byte[count <= 0 ? 0 : count]; - return Imports.ReadProcessMemory(Handle, address, buffer, buffer.Length, out _); + fixed (byte* p = buffer) + { + UIntPtr bytesRead; + if (!Windows.Win32.PInvoke.ReadProcessMemory( + Handle, + address.ToPointer(), + p, + new UIntPtr((uint)count), + &bytesRead)) + { + return false; + } + } + + return true; } /// @@ -38,9 +52,26 @@ public static class SafeMemory /// The address to write to. /// The buffer to write. /// Whether or not the write succeeded. - public static bool WriteBytes(IntPtr address, byte[] buffer) + public static unsafe bool WriteBytes(IntPtr address, byte[] buffer) { - return Imports.WriteProcessMemory(Handle, address, buffer, buffer.Length, out _); + if (buffer.Length == 0) + return true; + + UIntPtr bytesWritten; + fixed (byte* p = buffer) + { + if (!Windows.Win32.PInvoke.WriteProcessMemory( + Handle, + address.ToPointer(), + p, + new UIntPtr((uint)buffer.Length), + &bytesWritten)) + { + return false; + } + } + + return true; } /// @@ -240,18 +271,6 @@ public static class SafeMemory } } - private static class Imports - { - [DllImport("kernel32", SetLastError = true)] - public static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [Out] byte[] lpBuffer, int nSize, out int lpNumberOfBytesRead); - - [DllImport("kernel32", SetLastError = true)] - public static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, int nSize, out int lpNumberOfBytesWritten); - - [DllImport("kernel32", SetLastError = false)] - public static extern IntPtr GetCurrentProcess(); - } - private sealed class LocalMemory : IDisposable { private readonly int size; diff --git a/Dalamud/Utility/DiagnosticUtil.cs b/Dalamud/Utility/DiagnosticUtil.cs index 9c9718c4e..155d5cda7 100644 --- a/Dalamud/Utility/DiagnosticUtil.cs +++ b/Dalamud/Utility/DiagnosticUtil.cs @@ -1,6 +1,8 @@ using System.Diagnostics; using System.Linq; +using Dalamud.Bindings.ImGui; + namespace Dalamud.Utility; /// @@ -10,7 +12,6 @@ public static class DiagnosticUtil { private static readonly string[] IgnoredNamespaces = [ nameof(System), - nameof(ImGuiNET.ImGuiNative) ]; /// diff --git a/Dalamud/Utility/TypeExtensions.cs b/Dalamud/Utility/TypeExtensions.cs new file mode 100644 index 000000000..10ae049d4 --- /dev/null +++ b/Dalamud/Utility/TypeExtensions.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text.RegularExpressions; + +using InteropGenerator.Runtime; +using InteropGenerator.Runtime.Attributes; +// ReSharper disable LoopCanBeConvertedToQuery +// Linq can be a performance hit in most cases +namespace Dalamud.Utility; + +public static partial class TypeExtensions { + private static readonly BindingFlags BindingFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; + + [GeneratedRegex(@"^`[1-9]\+Node", RegexOptions.Compiled)] + public static partial Regex StdNodeRegex(); + + public static bool IsFixedBuffer(this Type type) { + return type.Name.EndsWith("e__FixedBuffer"); + } + + public static bool IsStruct(this Type type) { + return type != typeof(decimal) && type is { IsValueType: true, IsPrimitive: false, IsEnum: false }; + } + + public static bool IsBaseType(this Type type) { + while (true) { + if (type.IsPointer) { + type = type.GetElementType()!; + continue; + } + return type == typeof(void) || type == typeof(bool) || type == typeof(char) || + type == typeof(sbyte) || type == typeof(byte) || type == typeof(short) || + type == typeof(ushort) || type == typeof(int) || type == typeof(uint) || + type == typeof(long) || type == typeof(ulong) || type == typeof(float) || + type == typeof(double) || type == typeof(decimal) || type == typeof(nint) || + type == typeof(nuint) || type == typeof(Half) || type == typeof(CStringPointer); + } + } + + public static Type[] GetInheritsTypes(this Type type) { + const string inheritsAttribute = "InheritsAttribute`1"; + Type[] inheritances = []; + foreach (var attr in type.GetCustomAttributes()) { + if (attr.GetType().Name.Contains(inheritsAttribute)) { + inheritances = [.. inheritances, attr.GetType().GetGenericArguments()[0]]; + } + } + return inheritances; + } + + public static bool IsInheritance(this Type type, FieldInfo field) { + var inheritances = type.GetInheritsTypes(); + if (inheritances.Length == 0) return false; + foreach (var inheritance in inheritances) { + if (inheritance.IsFieldInType(field)) return true; + if (IsInheritance(inheritance, field)) return true; + } + return false; + } + + public static bool IsFieldInType(this Type type, FieldInfo field) { + var nameStrings = field.Name.Split('_'); + var index = Array.IndexOf(nameStrings, type.Name); + if (index <= 0) return type.GetFields(BindingFlags).Any(f => f.Name == field.Name && f.FieldType == field.FieldType); + var name = string.Join("_", nameStrings[(index + 1)..]); + return type.GetFields(BindingFlags).Any(f => f.Name == name && f.FieldType == field.FieldType) || type.GetFields(BindingFlags).Any(f => f.Name == field.Name && f.FieldType == field.FieldType); + } + + public static bool IsDirectBase(this FieldInfo field) { + var bases = field.DeclaringType?.GetInheritsTypes() ?? []; + return bases.Any(b => field.FieldType == b && field.Name == (b.Name == field.DeclaringType?.Name ? b.Name + "Base" : b.Name)); + } + + public static int SizeOf(this Type type) { + return type switch { + _ when type == typeof(sbyte) || type == typeof(byte) || type == typeof(bool) => 1, + _ when type == typeof(char) || type == typeof(short) || type == typeof(ushort) || type == typeof(Half) => 2, + _ when type == typeof(int) || type == typeof(uint) || type == typeof(float) => 4, + _ when type == typeof(long) || type == typeof(ulong) || type == typeof(double) || type.IsPointer || type.IsFunctionPointer || type.IsUnmanagedFunctionPointer || type == typeof(CStringPointer) => 8, + _ when type.Name.StartsWith("FixedSizeArray") => type.GetGenericArguments()[0].SizeOf() * int.Parse(type.Name[14..type.Name.IndexOf('`')]), + _ when type.GetCustomAttribute() is { Length: var length } => type.GetGenericArguments()[0].SizeOf() * length, + _ when type.IsStruct() && !type.IsGenericType && (type.StructLayoutAttribute?.Value ?? LayoutKind.Sequential) != LayoutKind.Sequential => type.StructLayoutAttribute?.Size ?? (int?)typeof(Unsafe).GetMethod("SizeOf")?.MakeGenericMethod(type).Invoke(null, null) ?? 0, + _ when type.IsEnum => Enum.GetUnderlyingType(type).SizeOf(), + _ when type.IsGenericType => Marshal.SizeOf(Activator.CreateInstance(type)!), + _ => GetSizeOf(type) + }; + } + + private static int GetSizeOf(this Type type) { + try { + return Marshal.SizeOf(Activator.CreateInstance(type)!); + } catch { + return 0; + } + } + + public static string GetNamespace(this Type type) { + var ns = type.Namespace!; + var offset = ns.IndexOf('.', ns.IndexOf('.') + 1) + 1; + return offset == 0 ? "" : ns[offset..]; + } + + public static string GetFullname(this Type type) { + return type.Namespace + "." + type.Name; + } + + public static Type GetPointerType(this Type type) { + while (type.IsPointer()) { + if (type.IsPointer) type = type.GetElementType()!; + else if (type.IsFunctionPointer) type = type.GetFunctionPointerReturnType(); + else if (type.IsUnmanagedFunctionPointer) type = type.GetFunctionPointerReturnType(); + } + return type; + } + + public static bool IsPointer(this Type type) { + return type.IsPointer || type.IsFunctionPointer || type.IsUnmanagedFunctionPointer; + } + + public static int PackSize(this Type type) { + if (type.GetCustomAttribute() != null) return 1; // FixedSizeArrayAttribute is always packed to 1 as the generated struct gets generated with Pack = 1 + if (!type.IsStruct()) return type.SizeOf(); + var pack = type.StructLayoutAttribute?.Pack ?? 8; + if (pack == 0) pack = 8; + var fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + return fields.Max(t => Math.Min(pack, t.FieldType.PackSize())); + } +} + +public static class FieldInfoExtensions { + public static int GetFieldOffset(this FieldInfo info) { + var attrs = info.GetCustomAttributes(typeof(FieldOffsetAttribute), false); + return attrs.Length != 0 ? attrs.Cast().Single().Value : GetFieldOffsetSequential(info); + } + + public static int GetFieldOffsetSequential(this FieldInfo info) { + if (info.DeclaringType is not { } declaring) + throw new Exception($"Unable to access declaring type of field {info.Name}"); + var pack = declaring.StructLayoutAttribute?.Pack ?? 0; // Default to 0 if no pack is specified + var fields = declaring.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + var offset = 0; + foreach (var field in fields) { + if (pack != 0) { + var actualPack = Math.Min(pack, field.FieldType.PackSize()); + offset = (offset + actualPack - 1) / actualPack * actualPack; + } + if (field == info) { + return offset; + } + offset += field.FieldType.SizeOf(); + } + throw new Exception("Field not found"); + } +} +public static class Extensions { + public static void WriteFile(this FileInfo file, string content) { + using var stream = file.CreateText(); + stream.Write(content); + } +} diff --git a/Dalamud/Utility/Util.cs b/Dalamud/Utility/Util.cs index 966fa1e11..e893cc8b9 100644 --- a/Dalamud/Utility/Util.cs +++ b/Dalamud/Utility/Util.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics; using System.IO; using System.IO.Compression; @@ -20,16 +19,18 @@ using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Support; -using ImGuiNET; using Lumina.Excel.Sheets; using Serilog; using TerraFX.Interop.Windows; -using Windows.Win32.Storage.FileSystem; using Windows.Win32.System.Memory; using Windows.Win32.System.Ole; +using Windows.Win32.UI.WindowsAndMessaging; + +using Dalamud.Bindings.ImGui; using static TerraFX.Interop.Windows.Windows; +using HWND = Windows.Win32.Foundation.HWND; using Win32_PInvoke = Windows.Win32.PInvoke; namespace Dalamud.Utility; @@ -402,9 +403,9 @@ public static class Util /// Specify whether to exit immediately. public static void Fatal(string message, string caption, bool exit = true) { - var flags = NativeFunctions.MessageBoxType.Ok | NativeFunctions.MessageBoxType.IconError | - NativeFunctions.MessageBoxType.Topmost; - _ = NativeFunctions.MessageBoxW(Process.GetCurrentProcess().MainWindowHandle, message, caption, flags); + var flags = MESSAGEBOX_STYLE.MB_OK | MESSAGEBOX_STYLE.MB_ICONERROR | + MESSAGEBOX_STYLE.MB_TOPMOST; + _ = Windows.Win32.PInvoke.MessageBox(new HWND(Process.GetCurrentProcess().MainWindowHandle), message, caption, flags); if (exit) { diff --git a/external/cimgui/cimgui.vcxproj b/external/cimgui/cimgui.vcxproj index 55e737595..cdb2fa7ab 100644 --- a/external/cimgui/cimgui.vcxproj +++ b/external/cimgui/cimgui.vcxproj @@ -21,6 +21,8 @@ + + 17.0 diff --git a/generate_imgui_bindings.ps1 b/generate_imgui_bindings.ps1 new file mode 100644 index 000000000..782657023 --- /dev/null +++ b/generate_imgui_bindings.ps1 @@ -0,0 +1,73 @@ +# Store initial directory +$initialDirectory = Get-Location + +# CD to the directory of this script +Set-Location -Path $PSScriptRoot + +# Copy cimgui files from the cimgui repository to Hexa.NET.ImGui +Copy-Item -Path "lib/cimgui/cimgui.h" -Destination "lib/Hexa.NET.ImGui/Generator/cimgui" -Force +Copy-Item -Path "lib/cimgui/generator/output/definitions.json" -Destination "lib/Hexa.NET.ImGui/Generator/cimgui" -Force + +# Copy cimplot.h and cimguizmo.h +Copy-Item -Path "lib/cimplot/cimplot.h" -Destination "lib/Hexa.NET.ImGui/Generator/cimplot" -Force +Copy-Item -Path "lib/cimplot/generator/output/definitions.json" -Destination "lib/Hexa.NET.ImGui/Generator/cimplot" -Force + +Copy-Item -Path "lib/cimguizmo/cimguizmo.h" -Destination "lib/Hexa.NET.ImGui/Generator/cimguizmo" -Force +Copy-Item -Path "lib/cimguizmo/generator/output/definitions.json" -Destination "lib/Hexa.NET.ImGui/Generator/cimguizmo" -Force + + +# Find the first `#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS` in cimgui.h and insert `#define CIMGUI_DEFINE_ENUMS_AND_STRUCTS` before it +function InsertDefine { + param ( + [string]$filePath + ) + + $lines = Get-Content $filePath + $inserted = $false + + foreach ($line in $lines) { + if ($line -match "#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS") { + $index = [Array]::IndexOf($lines, $line) + if ($index -gt 0 -and $lines[$index - 1] -ne "#define CIMGUI_DEFINE_ENUMS_AND_STRUCTS") { + $lines = $lines[0..($index - 1)] + "#define CIMGUI_DEFINE_ENUMS_AND_STRUCTS" + "`r`n" + $lines[$index..($lines.Length - 1)] + $inserted = $true + } + break + } + } + + if (-not $inserted) { + Write-Host "CIMGUI_DEFINE_ENUMS_AND_STRUCTS not found in $filePath. Exiting." + exit 1 + } + + # Write the modified lines back to the file + Set-Content -Path $filePath -Value $lines +} + +# Insert the define line into all relevant header files +InsertDefine -filePath "lib/Hexa.NET.ImGui/Generator/cimgui/cimgui.h" +InsertDefine -filePath "lib/Hexa.NET.ImGui/Generator/cimplot/cimplot.h" +InsertDefine -filePath "lib/Hexa.NET.ImGui/Generator/cimguizmo/cimguizmo.h" + +# Copy modified cimgui.h to cimplot and cimguizmo directories +Copy-Item -Path "lib/Hexa.NET.ImGui/Generator/cimgui/cimgui.h" -Destination "lib/Hexa.NET.ImGui/Generator/cimplot/cimgui.h" -Force +Copy-Item -Path "lib/Hexa.NET.ImGui/Generator/cimgui/cimgui.h" -Destination "lib/Hexa.NET.ImGui/Generator/cimguizmo/cimgui.h" -Force + + +Set-Location -Path "lib/Hexa.NET.ImGui" +#dotnet workload restore +#dotnet restore + +# CD to generator directory +Set-Location -Path "Generator" + +# Build generator +dotnet build + +# Run generator +Set-Location -Path "bin/Debug/net9.0" +.\Generator.exe + +# Restore initial directory +Set-Location -Path $initialDirectory \ No newline at end of file diff --git a/imgui/Dalamud.ImGui/Dalamud.ImGui.csproj b/imgui/Dalamud.ImGui/Dalamud.ImGui.csproj new file mode 100644 index 000000000..9b1084ef0 --- /dev/null +++ b/imgui/Dalamud.ImGui/Dalamud.ImGui.csproj @@ -0,0 +1,15 @@ + + + + enable + enable + true + + true + + + + + + + diff --git a/imgui/Dalamud.ImGui/ImGui.cs b/imgui/Dalamud.ImGui/ImGui.cs new file mode 100644 index 000000000..460535cb1 --- /dev/null +++ b/imgui/Dalamud.ImGui/ImGui.cs @@ -0,0 +1,37 @@ +#nullable disable + +using System.Reflection; + +namespace Dalamud.Bindings.ImGui +{ + using HexaGen.Runtime; + using System.Diagnostics; + + public static class ImGuiConfig + { + public static bool AotStaticLink; + } + + public static unsafe partial class ImGui + { + static ImGui() + { + if (ImGuiConfig.AotStaticLink) + { + InitApi(new NativeLibraryContext(Process.GetCurrentProcess().MainModule!.BaseAddress)); + } + else + { + //InitApi(new NativeLibraryContext(LibraryLoader.LoadLibrary(GetLibraryName, null))); + InitApi(new NativeLibraryContext(Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location)!, GetLibraryName() + ".dll"))); + } + } + + public static string GetLibraryName() + { + return "cimgui"; + } + + public const nint ImDrawCallbackResetRenderState = -8; + } +} diff --git a/imgui/Dalamud.ImGui/ImGuiP.cs b/imgui/Dalamud.ImGui/ImGuiP.cs new file mode 100644 index 000000000..57a243397 --- /dev/null +++ b/imgui/Dalamud.ImGui/ImGuiP.cs @@ -0,0 +1,16 @@ +#nullable disable + +namespace Dalamud.Bindings.ImGui +{ + using HexaGen.Runtime; + + public static unsafe partial class ImGuiP + { + internal static FunctionTable funcTable; + + static ImGuiP() + { + funcTable = ImGui.funcTable; + } + } +} diff --git a/imgui/Dalamud.ImGui/ImTextureID.cs b/imgui/Dalamud.ImGui/ImTextureID.cs new file mode 100644 index 000000000..53643ab9f --- /dev/null +++ b/imgui/Dalamud.ImGui/ImTextureID.cs @@ -0,0 +1,48 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + /// + /// To be documented. + /// + #if NET5_0_OR_GREATER + [DebuggerDisplay("{DebuggerDisplay,nq}")] + #endif + public readonly unsafe partial struct ImTextureID : IEquatable + { + public ImTextureID(ulong handle) { Handle = handle; } + public ImTextureID(nint handle) { Handle = (ulong)handle; } + public ImTextureID(void* handle) { Handle = (ulong)handle; } + public ulong Handle { get; } + public bool IsNull => Handle == 0; + public static ImTextureID Null => new ImTextureID(0); + public static implicit operator ImTextureID(ulong handle) => new ImTextureID(handle); + public static bool operator ==(ImTextureID left, ImTextureID right) => left.Handle == right.Handle; + public static bool operator !=(ImTextureID left, ImTextureID right) => left.Handle != right.Handle; + public static bool operator ==(ImTextureID left, nint right) => left.Handle == (ulong)right; + public static bool operator !=(ImTextureID left, nint right) => left.Handle != (ulong)right; + public static bool operator ==(ImTextureID left, ulong right) => left.Handle == right; + public static bool operator !=(ImTextureID left, ulong right) => left.Handle != right; + public bool Equals(ImTextureID other) => Handle == other.Handle; + /// + public override bool Equals(object obj) => obj is ImTextureID handle && Equals(handle); + /// + public override int GetHashCode() => Handle.GetHashCode(); + #if NET5_0_OR_GREATER + private string DebuggerDisplay => string.Format("ImTextureID [0x{0}]", Handle.ToString("X")); + #endif + } +} diff --git a/imgui/Dalamud.ImGui/ImVector.cs b/imgui/Dalamud.ImGui/ImVector.cs new file mode 100644 index 000000000..7772871e8 --- /dev/null +++ b/imgui/Dalamud.ImGui/ImVector.cs @@ -0,0 +1,238 @@ +using System.Runtime.CompilerServices; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe struct ImVector + { + public readonly int Size; + public readonly int Capacity; + public readonly void* Data; + + public ImVector(int size, int capacity, void* data) + { + Size = size; + Capacity = capacity; + Data = data; + } + + public ref T Ref(int index) + { + return ref Unsafe.AsRef((byte*)Data + index * Unsafe.SizeOf()); + } + + public IntPtr Address(int index) + { + return (IntPtr)((byte*)Data + index * Unsafe.SizeOf()); + } + } + + /// + /// A structure representing a dynamic array for unmanaged types. + /// + /// The type of elements in the vector, must be unmanaged. + public unsafe struct ImVector where T : unmanaged + { + /// + /// Initializes a new instance of the struct with the specified size, capacity, and data pointer. + /// + /// The initial size of the vector. + /// The initial capacity of the vector. + /// Pointer to the initial data. + public ImVector(int size, int capacity, T* data) + { + this.size = size; + this.capacity = capacity; + this.data = data; + } + + private int size; + private int capacity; + private unsafe T* data; + + + /// + /// Gets or sets the element at the specified index. + /// + /// The zero-based index of the element to get or set. + /// The element at the specified index. + /// Thrown when the index is out of range. + public T this[int index] + { + get + { + if (index < 0 || index >= size) + { + throw new IndexOutOfRangeException(); + } + return data[index]; + } + set + { + if (index < 0 || index >= size) + { + throw new IndexOutOfRangeException(); + } + data[index] = value; + } + } + + /// + /// Gets a pointer to the first element of the vector. + /// + public readonly T* Data => data; + + /// + /// Gets a pointer to the first element of the vector. + /// + public readonly T* Front => data; + + /// + /// Gets a pointer to the last element of the vector. + /// + public readonly T* Back => size > 0 ? data + size - 1 : null; + + /// + /// Gets or sets the capacity of the vector. + /// + public int Capacity + { + readonly get => capacity; + set + { + if (capacity == value) + { + return; + } + + if (data == null) + { + data = (T*)ImGui.MemAlloc((nuint)(value * sizeof(T))); + } + else + { + int newSize = Math.Min(size, value); + T* newData = (T*)ImGui.MemAlloc((nuint)(value * sizeof(T))); + Buffer.MemoryCopy(data, newData, (nuint)(value * sizeof(T)), (nuint)(newSize * sizeof(T))); + ImGui.MemFree(data); + data = newData; + size = newSize; + } + + capacity = value; + + // Clear the rest of the data + for (int i = size; i < capacity; i++) + { + data[i] = default; + } + } + } + + /// + /// Gets the number of elements in the vector. + /// + public readonly int Size => size; + + /// + /// Grows the capacity of the vector to at least the specified value. + /// + /// The new capacity. + public void Grow(int newCapacity) + { + if (newCapacity > capacity) + { + Capacity = newCapacity * 2; + } + } + + /// + /// Ensures that the vector has at least the specified capacity. + /// + /// The minimum capacity required. + public void EnsureCapacity(int size) + { + if (size > capacity) + { + Grow(size); + } + } + + /// + /// Resizes the vector to the specified size. + /// + /// The new size of the vector. + public void Resize(int newSize) + { + EnsureCapacity(newSize); + size = newSize; + } + + /// + /// Clears all elements from the vector. + /// + public void Clear() + { + size = 0; + } + + /// + /// Adds an element to the end of the vector. + /// + /// The value to add. + public void PushBack(T value) + { + EnsureCapacity(size + 1); + data[size++] = value; + } + + /// + /// Removes the last element from the vector. + /// + public void PopBack() + { + if (size > 0) + { + size--; + } + } + + /// + /// Frees the memory allocated for the vector. + /// + public void Free() + { + if (data != null) + { + ImGui.MemFree(data); + data = null; + size = 0; + capacity = 0; + } + } + + public ref T Ref(int index) + { + return ref Unsafe.AsRef((byte*)Data + index * Unsafe.SizeOf()); + } + + public ref TCast Ref(int index) + { + return ref Unsafe.AsRef((byte*)Data + index * Unsafe.SizeOf()); + } + + public void* Address(int index) + { + return (byte*)Data + index * Unsafe.SizeOf(); + } + + public void* Address(int index) + { + return (byte*)Data + index * Unsafe.SizeOf(); + } + + public ImVector* ToUntyped() + { + return (ImVector*)Unsafe.AsPointer(ref this); + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.000.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.000.cs new file mode 100644 index 000000000..5f58cec41 --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.000.cs @@ -0,0 +1,5047 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint ImHashDataNative(void* data, ulong dataSize, uint seed) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[691])(data, dataSize, seed); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[691])((nint)data, dataSize, seed); + #endif + } + + /// + /// To be documented. + /// + public static uint ImHashData(void* data, ulong dataSize, uint seed) + { + uint ret = ImHashDataNative(data, dataSize, seed); + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashData(void* data, ulong dataSize) + { + uint ret = ImHashDataNative(data, dataSize, (uint)(0)); + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashData(void* data, nuint dataSize, uint seed) + { + uint ret = ImHashDataNative(data, dataSize, seed); + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashData(void* data, nuint dataSize) + { + uint ret = ImHashDataNative(data, dataSize, (uint)(0)); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint ImHashStrNative(byte* data, ulong dataSize, uint seed) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[692])(data, dataSize, seed); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[692])((nint)data, dataSize, seed); + #endif + } + + /// + /// To be documented. + /// + public static uint ImHashStr(byte* data, ulong dataSize, uint seed) + { + uint ret = ImHashStrNative(data, dataSize, seed); + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashStr(byte* data, ulong dataSize) + { + uint ret = ImHashStrNative(data, dataSize, (uint)(0)); + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashStr(byte* data) + { + uint ret = ImHashStrNative(data, (ulong)(0), (uint)(0)); + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashStr(byte* data, uint seed) + { + uint ret = ImHashStrNative(data, (ulong)(0), seed); + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashStr(ref byte data, ulong dataSize, uint seed) + { + fixed (byte* pdata = &data) + { + uint ret = ImHashStrNative((byte*)pdata, dataSize, seed); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint ImHashStr(ref byte data, ulong dataSize) + { + fixed (byte* pdata = &data) + { + uint ret = ImHashStrNative((byte*)pdata, dataSize, (uint)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint ImHashStr(ref byte data) + { + fixed (byte* pdata = &data) + { + uint ret = ImHashStrNative((byte*)pdata, (ulong)(0), (uint)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint ImHashStr(ref byte data, uint seed) + { + fixed (byte* pdata = &data) + { + uint ret = ImHashStrNative((byte*)pdata, (ulong)(0), seed); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint ImHashStr(ReadOnlySpan data, ulong dataSize, uint seed) + { + fixed (byte* pdata = data) + { + uint ret = ImHashStrNative((byte*)pdata, dataSize, seed); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint ImHashStr(ReadOnlySpan data, ulong dataSize) + { + fixed (byte* pdata = data) + { + uint ret = ImHashStrNative((byte*)pdata, dataSize, (uint)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint ImHashStr(ReadOnlySpan data) + { + fixed (byte* pdata = data) + { + uint ret = ImHashStrNative((byte*)pdata, (ulong)(0), (uint)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint ImHashStr(ReadOnlySpan data, uint seed) + { + fixed (byte* pdata = data) + { + uint ret = ImHashStrNative((byte*)pdata, (ulong)(0), seed); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint ImHashStr(string data, ulong dataSize, uint seed) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (data != null) + { + pStrSize0 = Utils.GetByteCountUTF8(data); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(data, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = ImHashStrNative(pStr0, dataSize, seed); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashStr(string data, ulong dataSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (data != null) + { + pStrSize0 = Utils.GetByteCountUTF8(data); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(data, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = ImHashStrNative(pStr0, dataSize, (uint)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashStr(string data) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (data != null) + { + pStrSize0 = Utils.GetByteCountUTF8(data); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(data, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = ImHashStrNative(pStr0, (ulong)(0), (uint)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashStr(string data, uint seed) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (data != null) + { + pStrSize0 = Utils.GetByteCountUTF8(data); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(data, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = ImHashStrNative(pStr0, (ulong)(0), seed); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashStr(byte* data, nuint dataSize, uint seed) + { + uint ret = ImHashStrNative(data, dataSize, seed); + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashStr(byte* data, nuint dataSize) + { + uint ret = ImHashStrNative(data, dataSize, (uint)(0)); + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashStr(ref byte data, nuint dataSize, uint seed) + { + fixed (byte* pdata = &data) + { + uint ret = ImHashStrNative((byte*)pdata, dataSize, seed); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint ImHashStr(ref byte data, nuint dataSize) + { + fixed (byte* pdata = &data) + { + uint ret = ImHashStrNative((byte*)pdata, dataSize, (uint)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint ImHashStr(ReadOnlySpan data, nuint dataSize, uint seed) + { + fixed (byte* pdata = data) + { + uint ret = ImHashStrNative((byte*)pdata, dataSize, seed); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint ImHashStr(ReadOnlySpan data, nuint dataSize) + { + fixed (byte* pdata = data) + { + uint ret = ImHashStrNative((byte*)pdata, dataSize, (uint)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint ImHashStr(string data, nuint dataSize, uint seed) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (data != null) + { + pStrSize0 = Utils.GetByteCountUTF8(data); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(data, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = ImHashStrNative(pStr0, dataSize, seed); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static uint ImHashStr(string data, nuint dataSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (data != null) + { + pStrSize0 = Utils.GetByteCountUTF8(data); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(data, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = ImHashStrNative(pStr0, dataSize, (uint)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImQsortNative(void* baseValue, ulong count, ulong sizeOfElement, delegate*, int> compareFunc) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl], int>, void>)funcTable[693])(baseValue, count, sizeOfElement, compareFunc); + #else + ((delegate* unmanaged[Cdecl])funcTable[693])((nint)baseValue, count, sizeOfElement, (nint)compareFunc); + #endif + } + + /// + /// To be documented. + /// + public static void ImQsort(void* baseValue, ulong count, ulong sizeOfElement, delegate*, int> compareFunc) + { + ImQsortNative(baseValue, count, sizeOfElement, compareFunc); + } + + /// + /// To be documented. + /// + public static void ImQsort(void* baseValue, nuint count, ulong sizeOfElement, delegate*, int> compareFunc) + { + ImQsortNative(baseValue, count, sizeOfElement, compareFunc); + } + + /// + /// To be documented. + /// + public static void ImQsort(void* baseValue, ulong count, nuint sizeOfElement, delegate*, int> compareFunc) + { + ImQsortNative(baseValue, count, sizeOfElement, compareFunc); + } + + /// + /// To be documented. + /// + public static void ImQsort(void* baseValue, nuint count, nuint sizeOfElement, delegate*, int> compareFunc) + { + ImQsortNative(baseValue, count, sizeOfElement, compareFunc); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint ImAlphaBlendColorsNative(uint colA, uint colB) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[694])(colA, colB); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[694])(colA, colB); + #endif + } + + /// + /// To be documented. + /// + public static uint ImAlphaBlendColors(uint colA, uint colB) + { + uint ret = ImAlphaBlendColorsNative(colA, colB); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ImIsPowerOfTwoNative(int v) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[695])(v); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[695])(v); + #endif + } + + /// + /// To be documented. + /// + public static bool ImIsPowerOfTwo(int v) + { + byte ret = ImIsPowerOfTwoNative(v); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ImIsPowerOfTwoNative(ulong v) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[696])(v); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[696])(v); + #endif + } + + /// + /// To be documented. + /// + public static bool ImIsPowerOfTwo(ulong v) + { + byte ret = ImIsPowerOfTwoNative(v); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImUpperPowerOfTwoNative(int v) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[697])(v); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[697])(v); + #endif + } + + /// + /// To be documented. + /// + public static int ImUpperPowerOfTwo(int v) + { + int ret = ImUpperPowerOfTwoNative(v); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImStricmpNative(byte* str1, byte* str2) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[698])(str1, str2); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[698])((nint)str1, (nint)str2); + #endif + } + + /// + /// To be documented. + /// + public static int ImStricmp(byte* str1, byte* str2) + { + int ret = ImStricmpNative(str1, str2); + return ret; + } + + /// + /// To be documented. + /// + public static int ImStricmp(ref byte str1, byte* str2) + { + fixed (byte* pstr1 = &str1) + { + int ret = ImStricmpNative((byte*)pstr1, str2); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStricmp(ReadOnlySpan str1, byte* str2) + { + fixed (byte* pstr1 = str1) + { + int ret = ImStricmpNative((byte*)pstr1, str2); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStricmpNative(pStr0, str2); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImStricmp(byte* str1, ref byte str2) + { + fixed (byte* pstr2 = &str2) + { + int ret = ImStricmpNative(str1, (byte*)pstr2); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStricmp(byte* str1, ReadOnlySpan str2) + { + fixed (byte* pstr2 = str2) + { + int ret = ImStricmpNative(str1, (byte*)pstr2); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStricmpNative(str1, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImStricmp(ref byte str1, ref byte str2) + { + fixed (byte* pstr1 = &str1) + { + fixed (byte* pstr2 = &str2) + { + int ret = ImStricmpNative((byte*)pstr1, (byte*)pstr2); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImStricmp(ReadOnlySpan str1, ReadOnlySpan str2) + { + fixed (byte* pstr1 = str1) + { + fixed (byte* pstr2 = str2) + { + int ret = ImStricmpNative((byte*)pstr1, (byte*)pstr2); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStricmpNative(pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImStricmp(ref byte str1, ReadOnlySpan str2) + { + fixed (byte* pstr1 = &str1) + { + fixed (byte* pstr2 = str2) + { + int ret = ImStricmpNative((byte*)pstr1, (byte*)pstr2); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStricmpNative((byte*)pstr1, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStricmp(ReadOnlySpan str1, ref byte str2) + { + fixed (byte* pstr1 = str1) + { + fixed (byte* pstr2 = &str2) + { + int ret = ImStricmpNative((byte*)pstr1, (byte*)pstr2); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStricmpNative((byte*)pstr1, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStricmpNative(pStr0, (byte*)pstr2); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStricmpNative(pStr0, (byte*)pstr2); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImStrnicmpNative(byte* str1, byte* str2, ulong count) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[699])(str1, str2, count); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[699])((nint)str1, (nint)str2, count); + #endif + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(byte* str1, byte* str2, ulong count) + { + int ret = ImStrnicmpNative(str1, str2, count); + return ret; + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ref byte str1, byte* str2, ulong count) + { + fixed (byte* pstr1 = &str1) + { + int ret = ImStrnicmpNative((byte*)pstr1, str2, count); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ReadOnlySpan str1, byte* str2, ulong count) + { + fixed (byte* pstr1 = str1) + { + int ret = ImStrnicmpNative((byte*)pstr1, str2, count); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(string str1, byte* str2, ulong 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 = ImStrnicmpNative(pStr0, str2, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(byte* str1, ref byte str2, ulong count) + { + fixed (byte* pstr2 = &str2) + { + int ret = ImStrnicmpNative(str1, (byte*)pstr2, count); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(byte* str1, ReadOnlySpan str2, ulong count) + { + fixed (byte* pstr2 = str2) + { + int ret = ImStrnicmpNative(str1, (byte*)pstr2, count); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(byte* str1, string str2, ulong 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 = ImStrnicmpNative(str1, pStr0, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ref byte str1, ref byte str2, ulong count) + { + fixed (byte* pstr1 = &str1) + { + fixed (byte* pstr2 = &str2) + { + int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ReadOnlySpan str1, ReadOnlySpan str2, ulong count) + { + fixed (byte* pstr1 = str1) + { + fixed (byte* pstr2 = str2) + { + int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(string str1, string str2, ulong 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 = ImStrnicmpNative(pStr0, pStr1, count); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ref byte str1, ReadOnlySpan str2, ulong count) + { + fixed (byte* pstr1 = &str1) + { + fixed (byte* pstr2 = str2) + { + int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ref byte str1, string str2, ulong 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 = ImStrnicmpNative((byte*)pstr1, pStr0, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ReadOnlySpan str1, ref byte str2, ulong count) + { + fixed (byte* pstr1 = str1) + { + fixed (byte* pstr2 = &str2) + { + int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ReadOnlySpan str1, string str2, ulong 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 = ImStrnicmpNative((byte*)pstr1, pStr0, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(string str1, ref byte str2, ulong 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 = ImStrnicmpNative(pStr0, (byte*)pstr2, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(string str1, ReadOnlySpan str2, ulong 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 = ImStrnicmpNative(pStr0, (byte*)pstr2, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(byte* str1, byte* str2, nuint count) + { + int ret = ImStrnicmpNative(str1, str2, count); + return ret; + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ref byte str1, byte* str2, nuint count) + { + fixed (byte* pstr1 = &str1) + { + int ret = ImStrnicmpNative((byte*)pstr1, str2, count); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ReadOnlySpan str1, byte* str2, nuint count) + { + fixed (byte* pstr1 = str1) + { + int ret = ImStrnicmpNative((byte*)pstr1, str2, count); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStrnicmpNative(pStr0, str2, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(byte* str1, ref byte str2, nuint count) + { + fixed (byte* pstr2 = &str2) + { + int ret = ImStrnicmpNative(str1, (byte*)pstr2, count); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(byte* str1, ReadOnlySpan str2, nuint count) + { + fixed (byte* pstr2 = str2) + { + int ret = ImStrnicmpNative(str1, (byte*)pstr2, count); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStrnicmpNative(str1, pStr0, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ref byte str1, ref byte str2, nuint count) + { + fixed (byte* pstr1 = &str1) + { + fixed (byte* pstr2 = &str2) + { + int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ReadOnlySpan str1, ReadOnlySpan str2, nuint count) + { + fixed (byte* pstr1 = str1) + { + fixed (byte* pstr2 = str2) + { + int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStrnicmpNative(pStr0, pStr1, count); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ref byte str1, ReadOnlySpan str2, nuint count) + { + fixed (byte* pstr1 = &str1) + { + fixed (byte* pstr2 = str2) + { + int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStrnicmpNative((byte*)pstr1, pStr0, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImStrnicmp(ReadOnlySpan str1, ref byte str2, nuint count) + { + fixed (byte* pstr1 = str1) + { + fixed (byte* pstr2 = &str2) + { + int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStrnicmpNative((byte*)pstr1, pStr0, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStrnicmpNative(pStr0, (byte*)pstr2, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStrnicmpNative(pStr0, (byte*)pstr2, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImStrncpyNative(byte* dst, byte* src, ulong count) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[700])(dst, src, count); + #else + ((delegate* unmanaged[Cdecl])funcTable[700])((nint)dst, (nint)src, count); + #endif + } + + /// + /// To be documented. + /// + public static void ImStrncpy(byte* dst, byte* src, ulong count) + { + ImStrncpyNative(dst, src, count); + } + + /// + /// To be documented. + /// + public static void ImStrncpy(ref byte dst, byte* src, ulong count) + { + fixed (byte* pdst = &dst) + { + ImStrncpyNative((byte*)pdst, src, count); + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(ref string dst, byte* src, ulong 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; + } + ImStrncpyNative(pStr0, src, count); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(byte* dst, ref byte src, ulong count) + { + fixed (byte* psrc = &src) + { + ImStrncpyNative(dst, (byte*)psrc, count); + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(byte* dst, ReadOnlySpan src, ulong count) + { + fixed (byte* psrc = src) + { + ImStrncpyNative(dst, (byte*)psrc, count); + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(byte* dst, string src, ulong 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; + } + ImStrncpyNative(dst, pStr0, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(ref byte dst, ref byte src, ulong count) + { + fixed (byte* pdst = &dst) + { + fixed (byte* psrc = &src) + { + ImStrncpyNative((byte*)pdst, (byte*)psrc, count); + } + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(ref byte dst, ReadOnlySpan src, ulong count) + { + fixed (byte* pdst = &dst) + { + fixed (byte* psrc = src) + { + ImStrncpyNative((byte*)pdst, (byte*)psrc, count); + } + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(ref string dst, string src, ulong 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; + } + ImStrncpyNative(pStr0, pStr1, count); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(ref byte dst, string src, ulong 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; + } + ImStrncpyNative((byte*)pdst, pStr0, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(ref string dst, ref byte src, ulong 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) + { + ImStrncpyNative(pStr0, (byte*)psrc, count); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(ref string dst, ReadOnlySpan src, ulong 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) + { + ImStrncpyNative(pStr0, (byte*)psrc, count); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(byte* dst, byte* src, nuint count) + { + ImStrncpyNative(dst, src, count); + } + + /// + /// To be documented. + /// + public static void ImStrncpy(ref byte dst, byte* src, nuint count) + { + fixed (byte* pdst = &dst) + { + ImStrncpyNative((byte*)pdst, src, count); + } + } + + /// + /// To be documented. + /// + 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; + } + ImStrncpyNative(pStr0, src, count); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(byte* dst, ref byte src, nuint count) + { + fixed (byte* psrc = &src) + { + ImStrncpyNative(dst, (byte*)psrc, count); + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(byte* dst, ReadOnlySpan src, nuint count) + { + fixed (byte* psrc = src) + { + ImStrncpyNative(dst, (byte*)psrc, count); + } + } + + /// + /// To be documented. + /// + 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; + } + ImStrncpyNative(dst, pStr0, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(ref byte dst, ref byte src, nuint count) + { + fixed (byte* pdst = &dst) + { + fixed (byte* psrc = &src) + { + ImStrncpyNative((byte*)pdst, (byte*)psrc, count); + } + } + } + + /// + /// To be documented. + /// + public static void ImStrncpy(ref byte dst, ReadOnlySpan src, nuint count) + { + fixed (byte* pdst = &dst) + { + fixed (byte* psrc = src) + { + ImStrncpyNative((byte*)pdst, (byte*)psrc, count); + } + } + } + + /// + /// To be documented. + /// + 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; + } + ImStrncpyNative(pStr0, pStr1, count); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + 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; + } + ImStrncpyNative((byte*)pdst, pStr0, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + 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) + { + ImStrncpyNative(pStr0, (byte*)psrc, count); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + 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) + { + ImStrncpyNative(pStr0, (byte*)psrc, count); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* ImStrdupNative(byte* str) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[701])(str); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[701])((nint)str); + #endif + } + + /// + /// To be documented. + /// + public static byte* ImStrdup(byte* str) + { + byte* ret = ImStrdupNative(str); + return ret; + } + + /// + /// To be documented. + /// + public static string ImStrdupS(byte* str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupNative(str)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStrdup(ref byte str) + { + fixed (byte* pstr = &str) + { + byte* ret = ImStrdupNative((byte*)pstr); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrdupS(ref byte str) + { + fixed (byte* pstr = &str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupNative((byte*)pstr)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdup(ReadOnlySpan str) + { + fixed (byte* pstr = str) + { + byte* ret = ImStrdupNative((byte*)pstr); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrdupS(ReadOnlySpan str) + { + fixed (byte* pstr = str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupNative((byte*)pstr)); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStrdupNative(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImStrdupNative(pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* ImStrdupcpyNative(byte* dst, ulong* pDstSize, byte* str) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[702])(dst, pDstSize, str); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[702])((nint)dst, (nint)pDstSize, (nint)str); + #endif + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(byte* dst, ulong* pDstSize, byte* str) + { + byte* ret = ImStrdupcpyNative(dst, pDstSize, str); + return ret; + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(byte* dst, ulong* pDstSize, byte* str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, pDstSize, str)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref byte dst, ulong* pDstSize, byte* str) + { + fixed (byte* pdst = &dst) + { + byte* ret = ImStrdupcpyNative((byte*)pdst, pDstSize, str); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref byte dst, ulong* pDstSize, byte* str) + { + fixed (byte* pdst = &dst) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, pDstSize, str)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref string dst, ulong* 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 = ImStrdupcpyNative(pStr0, pDstSize, str); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref string dst, ulong* 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(ImStrdupcpyNative(pStr0, pDstSize, str)); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(byte* dst, ref nuint pDstSize, byte* str) + { + fixed (nuint* ppDstSize = &pDstSize) + { + byte* ret = ImStrdupcpyNative(dst, (ulong*)ppDstSize, str); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(byte* dst, ref nuint pDstSize, byte* str) + { + fixed (nuint* ppDstSize = &pDstSize) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, (ulong*)ppDstSize, str)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref byte dst, ref nuint pDstSize, byte* str) + { + fixed (byte* pdst = &dst) + { + fixed (nuint* ppDstSize = &pDstSize) + { + byte* ret = ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, str); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref byte dst, ref nuint pDstSize, byte* str) + { + fixed (byte* pdst = &dst) + { + fixed (nuint* ppDstSize = &pDstSize) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, str)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref string dst, ref 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; + } + fixed (nuint* ppDstSize = &pDstSize) + { + byte* ret = ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, str); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref string dst, ref 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; + } + fixed (nuint* ppDstSize = &pDstSize) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, str)); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(byte* dst, ulong* pDstSize, ref byte str) + { + fixed (byte* pstr = &str) + { + byte* ret = ImStrdupcpyNative(dst, pDstSize, (byte*)pstr); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(byte* dst, ulong* pDstSize, ref byte str) + { + fixed (byte* pstr = &str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, pDstSize, (byte*)pstr)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(byte* dst, ulong* pDstSize, ReadOnlySpan str) + { + fixed (byte* pstr = str) + { + byte* ret = ImStrdupcpyNative(dst, pDstSize, (byte*)pstr); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(byte* dst, ulong* pDstSize, ReadOnlySpan str) + { + fixed (byte* pstr = str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, pDstSize, (byte*)pstr)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(byte* dst, ulong* 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 = ImStrdupcpyNative(dst, pDstSize, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(byte* dst, ulong* 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(ImStrdupcpyNative(dst, pDstSize, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref byte dst, ulong* pDstSize, ref byte str) + { + fixed (byte* pdst = &dst) + { + fixed (byte* pstr = &str) + { + byte* ret = ImStrdupcpyNative((byte*)pdst, pDstSize, (byte*)pstr); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref byte dst, ulong* pDstSize, ref byte str) + { + fixed (byte* pdst = &dst) + { + fixed (byte* pstr = &str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, pDstSize, (byte*)pstr)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref byte dst, ulong* pDstSize, ReadOnlySpan str) + { + fixed (byte* pdst = &dst) + { + fixed (byte* pstr = str) + { + byte* ret = ImStrdupcpyNative((byte*)pdst, pDstSize, (byte*)pstr); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref byte dst, ulong* pDstSize, ReadOnlySpan str) + { + fixed (byte* pdst = &dst) + { + fixed (byte* pstr = str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, pDstSize, (byte*)pstr)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref string dst, ulong* 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 = ImStrdupcpyNative(pStr0, pDstSize, pStr1); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref string dst, ulong* 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(ImStrdupcpyNative(pStr0, pDstSize, pStr1)); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref byte dst, ulong* 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 = ImStrdupcpyNative((byte*)pdst, pDstSize, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref byte dst, ulong* 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(ImStrdupcpyNative((byte*)pdst, pDstSize, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref string dst, ulong* 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 = ImStrdupcpyNative(pStr0, pDstSize, (byte*)pstr); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref string dst, ulong* 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(ImStrdupcpyNative(pStr0, pDstSize, (byte*)pstr)); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref string dst, ulong* 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 = ImStrdupcpyNative(pStr0, pDstSize, (byte*)pstr); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref string dst, ulong* 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(ImStrdupcpyNative(pStr0, pDstSize, (byte*)pstr)); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(byte* dst, ref nuint pDstSize, ref byte str) + { + fixed (nuint* ppDstSize = &pDstSize) + { + fixed (byte* pstr = &str) + { + byte* ret = ImStrdupcpyNative(dst, (ulong*)ppDstSize, (byte*)pstr); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(byte* dst, ref nuint pDstSize, ref byte str) + { + fixed (nuint* ppDstSize = &pDstSize) + { + fixed (byte* pstr = &str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, (ulong*)ppDstSize, (byte*)pstr)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(byte* dst, ref nuint pDstSize, ReadOnlySpan str) + { + fixed (nuint* ppDstSize = &pDstSize) + { + fixed (byte* pstr = str) + { + byte* ret = ImStrdupcpyNative(dst, (ulong*)ppDstSize, (byte*)pstr); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(byte* dst, ref nuint pDstSize, ReadOnlySpan str) + { + fixed (nuint* ppDstSize = &pDstSize) + { + fixed (byte* pstr = str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, (ulong*)ppDstSize, (byte*)pstr)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(byte* dst, ref nuint pDstSize, string str) + { + fixed (nuint* ppDstSize = &pDstSize) + { + 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 = ImStrdupcpyNative(dst, (ulong*)ppDstSize, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(byte* dst, ref nuint pDstSize, string str) + { + fixed (nuint* ppDstSize = &pDstSize) + { + 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(ImStrdupcpyNative(dst, (ulong*)ppDstSize, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref byte dst, ref nuint pDstSize, ref byte str) + { + fixed (byte* pdst = &dst) + { + fixed (nuint* ppDstSize = &pDstSize) + { + fixed (byte* pstr = &str) + { + byte* ret = ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, (byte*)pstr); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref byte dst, ref nuint pDstSize, ref byte str) + { + fixed (byte* pdst = &dst) + { + fixed (nuint* ppDstSize = &pDstSize) + { + fixed (byte* pstr = &str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, (byte*)pstr)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref byte dst, ref nuint pDstSize, ReadOnlySpan str) + { + fixed (byte* pdst = &dst) + { + fixed (nuint* ppDstSize = &pDstSize) + { + fixed (byte* pstr = str) + { + byte* ret = ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, (byte*)pstr); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref byte dst, ref nuint pDstSize, ReadOnlySpan str) + { + fixed (byte* pdst = &dst) + { + fixed (nuint* ppDstSize = &pDstSize) + { + fixed (byte* pstr = str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, (byte*)pstr)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref string dst, ref 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; + } + fixed (nuint* ppDstSize = &pDstSize) + { + 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 = ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, pStr1); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref string dst, ref 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; + } + fixed (nuint* ppDstSize = &pDstSize) + { + 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(ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, pStr1)); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref byte dst, ref nuint pDstSize, string str) + { + fixed (byte* pdst = &dst) + { + fixed (nuint* ppDstSize = &pDstSize) + { + 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 = ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref byte dst, ref nuint pDstSize, string str) + { + fixed (byte* pdst = &dst) + { + fixed (nuint* ppDstSize = &pDstSize) + { + 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(ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref string dst, ref 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 (nuint* ppDstSize = &pDstSize) + { + fixed (byte* pstr = &str) + { + byte* ret = ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, (byte*)pstr); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref string dst, ref 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 (nuint* ppDstSize = &pDstSize) + { + fixed (byte* pstr = &str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, (byte*)pstr)); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrdupcpy(ref string dst, ref 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 (nuint* ppDstSize = &pDstSize) + { + fixed (byte* pstr = str) + { + byte* ret = ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, (byte*)pstr); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStrdupcpyS(ref string dst, ref 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 (nuint* ppDstSize = &pDstSize) + { + fixed (byte* pstr = str) + { + string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, (byte*)pstr)); + dst = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* ImStrchrRangeNative(byte* strBegin, byte* strEnd, byte c) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[703])(strBegin, strEnd, c); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[703])((nint)strBegin, (nint)strEnd, c); + #endif + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(byte* strBegin, byte* strEnd, byte c) + { + byte* ret = ImStrchrRangeNative(strBegin, strEnd, c); + return ret; + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(byte* strBegin, byte* strEnd, byte c) + { + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(strBegin, strEnd, c)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(ref byte strBegin, byte* strEnd, byte c) + { + fixed (byte* pstrBegin = &strBegin) + { + byte* ret = ImStrchrRangeNative((byte*)pstrBegin, strEnd, c); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(ref byte strBegin, byte* strEnd, byte c) + { + fixed (byte* pstrBegin = &strBegin) + { + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, strEnd, c)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(ReadOnlySpan strBegin, byte* strEnd, byte c) + { + fixed (byte* pstrBegin = strBegin) + { + byte* ret = ImStrchrRangeNative((byte*)pstrBegin, strEnd, c); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(ReadOnlySpan strBegin, byte* strEnd, byte c) + { + fixed (byte* pstrBegin = strBegin) + { + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, strEnd, c)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(string strBegin, byte* strEnd, byte c) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strBegin != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strBegin); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImStrchrRangeNative(pStr0, strEnd, c); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(string strBegin, byte* strEnd, byte c) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strBegin != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strBegin); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(pStr0, strEnd, c)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(byte* strBegin, ref byte strEnd, byte c) + { + fixed (byte* pstrEnd = &strEnd) + { + byte* ret = ImStrchrRangeNative(strBegin, (byte*)pstrEnd, c); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(byte* strBegin, ref byte strEnd, byte c) + { + fixed (byte* pstrEnd = &strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(strBegin, (byte*)pstrEnd, c)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(byte* strBegin, ReadOnlySpan strEnd, byte c) + { + fixed (byte* pstrEnd = strEnd) + { + byte* ret = ImStrchrRangeNative(strBegin, (byte*)pstrEnd, c); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(byte* strBegin, ReadOnlySpan strEnd, byte c) + { + fixed (byte* pstrEnd = strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(strBegin, (byte*)pstrEnd, c)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(byte* strBegin, string strEnd, byte c) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImStrchrRangeNative(strBegin, pStr0, c); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(byte* strBegin, string strEnd, byte c) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(strBegin, pStr0, c)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(ref byte strBegin, ref byte strEnd, byte c) + { + fixed (byte* pstrBegin = &strBegin) + { + fixed (byte* pstrEnd = &strEnd) + { + byte* ret = ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(ref byte strBegin, ref byte strEnd, byte c) + { + fixed (byte* pstrBegin = &strBegin) + { + fixed (byte* pstrEnd = &strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(ReadOnlySpan strBegin, ReadOnlySpan strEnd, byte c) + { + fixed (byte* pstrBegin = strBegin) + { + fixed (byte* pstrEnd = strEnd) + { + byte* ret = ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(ReadOnlySpan strBegin, ReadOnlySpan strEnd, byte c) + { + fixed (byte* pstrBegin = strBegin) + { + fixed (byte* pstrEnd = strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(string strBegin, string strEnd, byte c) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strBegin != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strBegin); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (strEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(strEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* ret = ImStrchrRangeNative(pStr0, pStr1, c); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(string strBegin, string strEnd, byte c) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strBegin != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strBegin); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (strEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(strEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(pStr0, pStr1, c)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(ref byte strBegin, ReadOnlySpan strEnd, byte c) + { + fixed (byte* pstrBegin = &strBegin) + { + fixed (byte* pstrEnd = strEnd) + { + byte* ret = ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(ref byte strBegin, ReadOnlySpan strEnd, byte c) + { + fixed (byte* pstrBegin = &strBegin) + { + fixed (byte* pstrEnd = strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(ref byte strBegin, string strEnd, byte c) + { + fixed (byte* pstrBegin = &strBegin) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImStrchrRangeNative((byte*)pstrBegin, pStr0, c); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(ref byte strBegin, string strEnd, byte c) + { + fixed (byte* pstrBegin = &strBegin) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, pStr0, c)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(ReadOnlySpan strBegin, ref byte strEnd, byte c) + { + fixed (byte* pstrBegin = strBegin) + { + fixed (byte* pstrEnd = &strEnd) + { + byte* ret = ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(ReadOnlySpan strBegin, ref byte strEnd, byte c) + { + fixed (byte* pstrBegin = strBegin) + { + fixed (byte* pstrEnd = &strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(ReadOnlySpan strBegin, string strEnd, byte c) + { + fixed (byte* pstrBegin = strBegin) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImStrchrRangeNative((byte*)pstrBegin, pStr0, c); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(ReadOnlySpan strBegin, string strEnd, byte c) + { + fixed (byte* pstrBegin = strBegin) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, pStr0, c)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(string strBegin, ref byte strEnd, byte c) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strBegin != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strBegin); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pstrEnd = &strEnd) + { + byte* ret = ImStrchrRangeNative(pStr0, (byte*)pstrEnd, c); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(string strBegin, ref byte strEnd, byte c) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strBegin != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strBegin); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pstrEnd = &strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(pStr0, (byte*)pstrEnd, c)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrchrRange(string strBegin, ReadOnlySpan strEnd, byte c) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strBegin != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strBegin); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pstrEnd = strEnd) + { + byte* ret = ImStrchrRangeNative(pStr0, (byte*)pstrEnd, c); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrchrRangeS(string strBegin, ReadOnlySpan strEnd, byte c) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strBegin != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strBegin); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pstrEnd = strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(pStr0, (byte*)pstrEnd, c)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImStrlenWNative(ushort* str) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[704])(str); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[704])((nint)str); + #endif + } + + /// + /// To be documented. + /// + public static int ImStrlenW(ushort* str) + { + int ret = ImStrlenWNative(str); + return ret; + } + + /// + /// To be documented. + /// + public static int ImStrlenW(ref ushort str) + { + fixed (ushort* pstr = &str) + { + int ret = ImStrlenWNative((ushort*)pstr); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* ImStreolRangeNative(byte* str, byte* strEnd) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[705])(str, strEnd); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[705])((nint)str, (nint)strEnd); + #endif + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(byte* str, byte* strEnd) + { + byte* ret = ImStreolRangeNative(str, strEnd); + return ret; + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(byte* str, byte* strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(str, strEnd)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(ref byte str, byte* strEnd) + { + fixed (byte* pstr = &str) + { + byte* ret = ImStreolRangeNative((byte*)pstr, strEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(ref byte str, byte* strEnd) + { + fixed (byte* pstr = &str) + { + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, strEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(ReadOnlySpan str, byte* strEnd) + { + fixed (byte* pstr = str) + { + byte* ret = ImStreolRangeNative((byte*)pstr, strEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(ReadOnlySpan str, byte* strEnd) + { + fixed (byte* pstr = str) + { + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, strEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(string str, byte* strEnd) + { + 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 = ImStreolRangeNative(pStr0, strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(string str, byte* strEnd) + { + 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(ImStreolRangeNative(pStr0, strEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(byte* str, ref byte strEnd) + { + fixed (byte* pstrEnd = &strEnd) + { + byte* ret = ImStreolRangeNative(str, (byte*)pstrEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(byte* str, ref byte strEnd) + { + fixed (byte* pstrEnd = &strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(str, (byte*)pstrEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(byte* str, ReadOnlySpan strEnd) + { + fixed (byte* pstrEnd = strEnd) + { + byte* ret = ImStreolRangeNative(str, (byte*)pstrEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(byte* str, ReadOnlySpan strEnd) + { + fixed (byte* pstrEnd = strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(str, (byte*)pstrEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(byte* str, string strEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImStreolRangeNative(str, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(byte* str, string strEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(str, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(ref byte str, ref byte strEnd) + { + fixed (byte* pstr = &str) + { + fixed (byte* pstrEnd = &strEnd) + { + byte* ret = ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(ref byte str, ref byte strEnd) + { + fixed (byte* pstr = &str) + { + fixed (byte* pstrEnd = &strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(ReadOnlySpan str, ReadOnlySpan strEnd) + { + fixed (byte* pstr = str) + { + fixed (byte* pstrEnd = strEnd) + { + byte* ret = ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(ReadOnlySpan str, ReadOnlySpan strEnd) + { + fixed (byte* pstr = str) + { + fixed (byte* pstrEnd = strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(string str, string strEnd) + { + 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* pStr1 = null; + int pStrSize1 = 0; + if (strEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(strEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* ret = ImStreolRangeNative(pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(string str, string strEnd) + { + 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* pStr1 = null; + int pStrSize1 = 0; + if (strEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(strEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(pStr0, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(ref byte str, ReadOnlySpan strEnd) + { + fixed (byte* pstr = &str) + { + fixed (byte* pstrEnd = strEnd) + { + byte* ret = ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(ref byte str, ReadOnlySpan strEnd) + { + fixed (byte* pstr = &str) + { + fixed (byte* pstrEnd = strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(ref byte str, string strEnd) + { + fixed (byte* pstr = &str) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImStreolRangeNative((byte*)pstr, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(ref byte str, string strEnd) + { + fixed (byte* pstr = &str) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(ReadOnlySpan str, ref byte strEnd) + { + fixed (byte* pstr = str) + { + fixed (byte* pstrEnd = &strEnd) + { + byte* ret = ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(ReadOnlySpan str, ref byte strEnd) + { + fixed (byte* pstr = str) + { + fixed (byte* pstrEnd = &strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(ReadOnlySpan str, string strEnd) + { + fixed (byte* pstr = str) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImStreolRangeNative((byte*)pstr, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(ReadOnlySpan str, string strEnd) + { + fixed (byte* pstr = str) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(string str, ref byte strEnd) + { + 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; + } + fixed (byte* pstrEnd = &strEnd) + { + byte* ret = ImStreolRangeNative(pStr0, (byte*)pstrEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.001.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.001.cs new file mode 100644 index 000000000..d568bcbcc --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.001.cs @@ -0,0 +1,5036 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + public static string ImStreolRangeS(string str, ref byte strEnd) + { + 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; + } + fixed (byte* pstrEnd = &strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(pStr0, (byte*)pstrEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStreolRange(string str, ReadOnlySpan strEnd) + { + 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; + } + fixed (byte* pstrEnd = strEnd) + { + byte* ret = ImStreolRangeNative(pStr0, (byte*)pstrEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStreolRangeS(string str, ReadOnlySpan strEnd) + { + 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; + } + fixed (byte* pstrEnd = strEnd) + { + string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(pStr0, (byte*)pstrEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ushort* ImStrbolWNative(ushort* bufMidLine, ushort* bufBegin) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[706])(bufMidLine, bufBegin); + #else + return (ushort*)((delegate* unmanaged[Cdecl])funcTable[706])((nint)bufMidLine, (nint)bufBegin); + #endif + } + + /// + /// To be documented. + /// + public static ushort* ImStrbolW(ushort* bufMidLine, ushort* bufBegin) + { + ushort* ret = ImStrbolWNative(bufMidLine, bufBegin); + return ret; + } + + /// + /// To be documented. + /// + public static ushort* ImStrbolW(ref ushort bufMidLine, ushort* bufBegin) + { + fixed (ushort* pbufMidLine = &bufMidLine) + { + ushort* ret = ImStrbolWNative((ushort*)pbufMidLine, bufBegin); + return ret; + } + } + + /// + /// To be documented. + /// + public static ushort* ImStrbolW(ushort* bufMidLine, ref ushort bufBegin) + { + fixed (ushort* pbufBegin = &bufBegin) + { + ushort* ret = ImStrbolWNative(bufMidLine, (ushort*)pbufBegin); + return ret; + } + } + + /// + /// To be documented. + /// + public static ushort* ImStrbolW(ref ushort bufMidLine, ref ushort bufBegin) + { + fixed (ushort* pbufMidLine = &bufMidLine) + { + fixed (ushort* pbufBegin = &bufBegin) + { + ushort* ret = ImStrbolWNative((ushort*)pbufMidLine, (ushort*)pbufBegin); + return ret; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* ImStristrNative(byte* haystack, byte* haystackEnd, byte* needle, byte* needleEnd) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[707])(haystack, haystackEnd, needle, needleEnd); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[707])((nint)haystack, (nint)haystackEnd, (nint)needle, (nint)needleEnd); + #endif + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, byte* haystackEnd, byte* needle, byte* needleEnd) + { + byte* ret = ImStristrNative(haystack, haystackEnd, needle, needleEnd); + return ret; + } + + /// + /// To be documented. + /// + public static string ImStristrS(byte* haystack, byte* haystackEnd, byte* needle, byte* needleEnd) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, haystackEnd, needle, needleEnd)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ref byte haystack, byte* haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystack = &haystack) + { + byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, needle, needleEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(ref byte haystack, byte* haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystack = &haystack) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, haystackEnd, needle, needleEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystack = haystack) + { + byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, needle, needleEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystack = haystack) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, haystackEnd, needle, needleEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, needle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, needle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystackEnd = &haystackEnd) + { + byte* ret = ImStristrNative(haystack, (byte*)phaystackEnd, needle, needleEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(byte* haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystackEnd = &haystackEnd) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, (byte*)phaystackEnd, needle, needleEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystackEnd = haystackEnd) + { + byte* ret = ImStristrNative(haystack, (byte*)phaystackEnd, needle, needleEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystackEnd = haystackEnd) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, (byte*)phaystackEnd, needle, needleEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, needle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, needle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystack = &haystack) + { + fixed (byte* phaystackEnd = &haystackEnd) + { + byte* ret = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystack = haystack) + { + fixed (byte* phaystackEnd = haystackEnd) + { + byte* ret = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystack = haystack) + { + fixed (byte* phaystackEnd = haystackEnd) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, pStr1, needle, needleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, pStr1, needle, needleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystack = &haystack) + { + fixed (byte* phaystackEnd = haystackEnd) + { + byte* ret = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, needle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, needle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) + { + fixed (byte* phaystack = haystack) + { + fixed (byte* phaystackEnd = &haystackEnd) + { + byte* ret = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, needle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, needle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, needle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, needle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, needle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, needle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) + { + fixed (byte* pneedle = &needle) + { + byte* ret = ImStristrNative(haystack, haystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(byte* haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) + { + fixed (byte* pneedle = &needle) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, haystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) + { + fixed (byte* pneedle = needle) + { + byte* ret = ImStristrNative(haystack, haystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) + { + fixed (byte* pneedle = needle) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, haystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, haystackEnd, pStr0, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, haystackEnd, pStr0, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ref byte haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) + { + fixed (byte* phaystack = &haystack) + { + fixed (byte* pneedle = &needle) + { + byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) + { + fixed (byte* phaystack = haystack) + { + fixed (byte* pneedle = needle) + { + byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) + { + fixed (byte* phaystack = haystack) + { + fixed (byte* pneedle = needle) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, pStr1, needleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, pStr1, needleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ref byte haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) + { + fixed (byte* phaystack = &haystack) + { + fixed (byte* pneedle = needle) + { + byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, pStr0, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, pStr0, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) + { + fixed (byte* phaystack = haystack) + { + fixed (byte* pneedle = &needle) + { + byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, pStr0, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, pStr0, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, ref byte haystackEnd, ref byte needle, byte* needleEnd) + { + fixed (byte* phaystackEnd = &haystackEnd) + { + fixed (byte* pneedle = &needle) + { + byte* ret = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, byte* needleEnd) + { + fixed (byte* phaystackEnd = haystackEnd) + { + fixed (byte* pneedle = needle) + { + byte* ret = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, byte* needleEnd) + { + fixed (byte* phaystackEnd = haystackEnd) + { + fixed (byte* pneedle = needle) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, pStr1, needleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, pStr1, needleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, ref byte haystackEnd, ReadOnlySpan needle, byte* needleEnd) + { + fixed (byte* phaystackEnd = &haystackEnd) + { + fixed (byte* pneedle = needle) + { + byte* ret = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, ref byte needle, byte* needleEnd) + { + fixed (byte* phaystackEnd = haystackEnd) + { + fixed (byte* pneedle = &needle) + { + byte* ret = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, (byte*)pneedle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, (byte*)pneedle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, (byte*)pneedle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, (byte*)pneedle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(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; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(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; + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, pStr1, needleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, pStr1, needleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, pStr1, needleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, pStr1, needleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, needleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, needleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, needleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, needleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, needleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, pStr1, (byte*)pneedle, needleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, pStr1, (byte*)pneedle, needleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, pStr1, (byte*)pneedle, needleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, pStr1, (byte*)pneedle, needleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, byte* haystackEnd, byte* needle, ref byte needleEnd) + { + fixed (byte* pneedleEnd = &needleEnd) + { + byte* ret = ImStristrNative(haystack, haystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(byte* haystack, byte* haystackEnd, byte* needle, ref byte needleEnd) + { + fixed (byte* pneedleEnd = &needleEnd) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, haystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) + { + fixed (byte* pneedleEnd = needleEnd) + { + byte* ret = ImStristrNative(haystack, haystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(byte* haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) + { + fixed (byte* pneedleEnd = needleEnd) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, haystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, haystackEnd, needle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, haystackEnd, needle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ref byte haystack, byte* haystackEnd, byte* needle, ref byte needleEnd) + { + fixed (byte* phaystack = &haystack) + { + fixed (byte* pneedleEnd = &needleEnd) + { + byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) + { + fixed (byte* phaystack = haystack) + { + fixed (byte* pneedleEnd = needleEnd) + { + byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) + { + fixed (byte* phaystack = haystack) + { + fixed (byte* pneedleEnd = needleEnd) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, needle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, needle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ref byte haystack, byte* haystackEnd, byte* needle, ReadOnlySpan needleEnd) + { + fixed (byte* phaystack = &haystack) + { + fixed (byte* pneedleEnd = needleEnd) + { + byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, needle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, needle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, ref byte needleEnd) + { + fixed (byte* phaystack = haystack) + { + fixed (byte* pneedleEnd = &needleEnd) + { + byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, needle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, needle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, needle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, needle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, needle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, needle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, ref byte haystackEnd, byte* needle, ref byte needleEnd) + { + fixed (byte* phaystackEnd = &haystackEnd) + { + fixed (byte* pneedleEnd = &needleEnd) + { + byte* ret = ImStristrNative(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, ReadOnlySpan needleEnd) + { + fixed (byte* phaystackEnd = haystackEnd) + { + fixed (byte* pneedleEnd = needleEnd) + { + byte* ret = ImStristrNative(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, ReadOnlySpan needleEnd) + { + fixed (byte* phaystackEnd = haystackEnd) + { + fixed (byte* pneedleEnd = needleEnd) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, needle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, needle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, ref byte haystackEnd, byte* needle, ReadOnlySpan needleEnd) + { + fixed (byte* phaystackEnd = &haystackEnd) + { + fixed (byte* pneedleEnd = needleEnd) + { + byte* ret = ImStristrNative(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, needle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, needle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, ref byte needleEnd) + { + fixed (byte* phaystackEnd = haystackEnd) + { + fixed (byte* pneedleEnd = &needleEnd) + { + byte* ret = ImStristrNative(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, needle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, needle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, needle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, needle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, needle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, needle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.002.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.002.cs new file mode 100644 index 000000000..95b9ba988 --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.002.cs @@ -0,0 +1,5043 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(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; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(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; + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, needle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, needle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, needle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, needle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, needle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, needle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, needle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, needle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, needle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, needle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, pStr1, needle, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, pStr1, needle, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, pStr1, needle, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, pStr1, needle, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, byte* haystackEnd, ref byte needle, ref byte needleEnd) + { + fixed (byte* pneedle = &needle) + { + fixed (byte* pneedleEnd = &needleEnd) + { + byte* ret = ImStristrNative(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) + { + fixed (byte* pneedle = needle) + { + fixed (byte* pneedleEnd = needleEnd) + { + byte* ret = ImStristrNative(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImStristrS(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, ReadOnlySpan needleEnd) + { + fixed (byte* pneedle = needle) + { + fixed (byte* pneedleEnd = needleEnd) + { + string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, haystackEnd, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, haystackEnd, pStr0, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, byte* haystackEnd, ref byte needle, ReadOnlySpan needleEnd) + { + fixed (byte* pneedle = &needle) + { + fixed (byte* pneedleEnd = needleEnd) + { + byte* ret = ImStristrNative(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, haystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, haystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStristr(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, ref byte needleEnd) + { + fixed (byte* pneedle = needle) + { + fixed (byte* pneedleEnd = &needleEnd) + { + byte* ret = ImStristrNative(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, haystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, haystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, haystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, haystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, haystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, haystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(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; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(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; + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, pStr0, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, haystackEnd, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, haystackEnd, pStr0, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, pStr1, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, pStr1, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, haystackEnd, pStr1, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, haystackEnd, pStr1, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(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; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(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; + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.003.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.003.cs new file mode 100644 index 000000000..a6384ecff --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.003.cs @@ -0,0 +1,5049 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, (byte*)phaystackEnd, pStr0, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, (byte*)pneedle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, (byte*)pneedle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, (byte*)pneedle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, (byte*)pneedle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, pStr1, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, pStr1, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(haystack, pStr0, pStr1, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(haystack, pStr0, pStr1, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(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; + } + + /// + /// To be documented. + /// + 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(ImStristrNative(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; + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((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; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((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; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, (byte*)pneedle, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, pStr0, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.004.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.004.cs new file mode 100644 index 000000000..d3eb36c8e --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.004.cs @@ -0,0 +1,5027 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative((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; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative((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; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(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; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(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; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(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; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(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; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(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; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(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; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(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; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(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; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(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; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(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; + } + } + + /// + /// To be documented. + /// + 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 = ImStristrNative(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; + } + } + + /// + /// To be documented. + /// + 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(ImStristrNative(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; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImStrTrimBlanksNative(byte* str) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[708])(str); + #else + ((delegate* unmanaged[Cdecl])funcTable[708])((nint)str); + #endif + } + + /// + /// To be documented. + /// + public static void ImStrTrimBlanks(byte* str) + { + ImStrTrimBlanksNative(str); + } + + /// + /// To be documented. + /// + public static void ImStrTrimBlanks(ref byte str) + { + fixed (byte* pstr = &str) + { + ImStrTrimBlanksNative((byte*)pstr); + } + } + + /// + /// To be documented. + /// + 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; + } + ImStrTrimBlanksNative(pStr0); + str = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* ImStrSkipBlankNative(byte* str) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[709])(str); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[709])((nint)str); + #endif + } + + /// + /// To be documented. + /// + public static byte* ImStrSkipBlank(byte* str) + { + byte* ret = ImStrSkipBlankNative(str); + return ret; + } + + /// + /// To be documented. + /// + public static string ImStrSkipBlankS(byte* str) + { + string ret = Utils.DecodeStringUTF8(ImStrSkipBlankNative(str)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImStrSkipBlank(ref byte str) + { + fixed (byte* pstr = &str) + { + byte* ret = ImStrSkipBlankNative((byte*)pstr); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrSkipBlankS(ref byte str) + { + fixed (byte* pstr = &str) + { + string ret = Utils.DecodeStringUTF8(ImStrSkipBlankNative((byte*)pstr)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImStrSkipBlank(ReadOnlySpan str) + { + fixed (byte* pstr = str) + { + byte* ret = ImStrSkipBlankNative((byte*)pstr); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImStrSkipBlankS(ReadOnlySpan str) + { + fixed (byte* pstr = str) + { + string ret = Utils.DecodeStringUTF8(ImStrSkipBlankNative((byte*)pstr)); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImStrSkipBlankNative(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImStrSkipBlankNative(pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ImCharIsBlankANative(byte c) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[710])(c); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[710])(c); + #endif + } + + /// + /// To be documented. + /// + public static bool ImCharIsBlankA(byte c) + { + byte ret = ImCharIsBlankANative(c); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ImCharIsBlankWNative(uint c) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[711])(c); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[711])(c); + #endif + } + + /// + /// To be documented. + /// + public static bool ImCharIsBlankW(uint c) + { + byte ret = ImCharIsBlankWNative(c); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImFormatStringToTempBufferNative(byte** outBuf, byte** outBufEnd, byte* fmt) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[712])(outBuf, outBufEnd, fmt); + #else + ((delegate* unmanaged[Cdecl])funcTable[712])((nint)outBuf, (nint)outBufEnd, (nint)fmt); + #endif + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(byte** outBuf, byte** outBufEnd, byte* fmt) + { + ImFormatStringToTempBufferNative(outBuf, outBufEnd, fmt); + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(ref byte* outBuf, byte** outBufEnd, byte* fmt) + { + fixed (byte** poutBuf = &outBuf) + { + ImFormatStringToTempBufferNative((byte**)poutBuf, outBufEnd, fmt); + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(byte** outBuf, ref byte* outBufEnd, byte* fmt) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + ImFormatStringToTempBufferNative(outBuf, (byte**)poutBufEnd, fmt); + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(ref byte* outBuf, ref byte* outBufEnd, byte* fmt) + { + fixed (byte** poutBuf = &outBuf) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + ImFormatStringToTempBufferNative((byte**)poutBuf, (byte**)poutBufEnd, fmt); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(byte** outBuf, byte** outBufEnd, ref byte fmt) + { + fixed (byte* pfmt = &fmt) + { + ImFormatStringToTempBufferNative(outBuf, outBufEnd, (byte*)pfmt); + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(byte** outBuf, byte** outBufEnd, ReadOnlySpan fmt) + { + fixed (byte* pfmt = fmt) + { + ImFormatStringToTempBufferNative(outBuf, outBufEnd, (byte*)pfmt); + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(byte** outBuf, byte** outBufEnd, string fmt) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImFormatStringToTempBufferNative(outBuf, outBufEnd, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(ref byte* outBuf, byte** outBufEnd, ref byte fmt) + { + fixed (byte** poutBuf = &outBuf) + { + fixed (byte* pfmt = &fmt) + { + ImFormatStringToTempBufferNative((byte**)poutBuf, outBufEnd, (byte*)pfmt); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(ref byte* outBuf, byte** outBufEnd, ReadOnlySpan fmt) + { + fixed (byte** poutBuf = &outBuf) + { + fixed (byte* pfmt = fmt) + { + ImFormatStringToTempBufferNative((byte**)poutBuf, outBufEnd, (byte*)pfmt); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(ref byte* outBuf, byte** outBufEnd, string fmt) + { + fixed (byte** poutBuf = &outBuf) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImFormatStringToTempBufferNative((byte**)poutBuf, outBufEnd, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(byte** outBuf, ref byte* outBufEnd, ref byte fmt) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + fixed (byte* pfmt = &fmt) + { + ImFormatStringToTempBufferNative(outBuf, (byte**)poutBufEnd, (byte*)pfmt); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(byte** outBuf, ref byte* outBufEnd, ReadOnlySpan fmt) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + fixed (byte* pfmt = fmt) + { + ImFormatStringToTempBufferNative(outBuf, (byte**)poutBufEnd, (byte*)pfmt); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(byte** outBuf, ref byte* outBufEnd, string fmt) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImFormatStringToTempBufferNative(outBuf, (byte**)poutBufEnd, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(ref byte* outBuf, ref byte* outBufEnd, ref byte fmt) + { + fixed (byte** poutBuf = &outBuf) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + fixed (byte* pfmt = &fmt) + { + ImFormatStringToTempBufferNative((byte**)poutBuf, (byte**)poutBufEnd, (byte*)pfmt); + } + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(ref byte* outBuf, ref byte* outBufEnd, ReadOnlySpan fmt) + { + fixed (byte** poutBuf = &outBuf) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + fixed (byte* pfmt = fmt) + { + ImFormatStringToTempBufferNative((byte**)poutBuf, (byte**)poutBufEnd, (byte*)pfmt); + } + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBuffer(ref byte* outBuf, ref byte* outBufEnd, string fmt) + { + fixed (byte** poutBuf = &outBuf) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImFormatStringToTempBufferNative((byte**)poutBuf, (byte**)poutBufEnd, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImFormatStringToTempBufferVNative(byte** outBuf, byte** outBufEnd, byte* fmt, nuint args) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[713])(outBuf, outBufEnd, fmt, args); + #else + ((delegate* unmanaged[Cdecl])funcTable[713])((nint)outBuf, (nint)outBufEnd, (nint)fmt, args); + #endif + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(byte** outBuf, byte** outBufEnd, byte* fmt, nuint args) + { + ImFormatStringToTempBufferVNative(outBuf, outBufEnd, fmt, args); + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(ref byte* outBuf, byte** outBufEnd, byte* fmt, nuint args) + { + fixed (byte** poutBuf = &outBuf) + { + ImFormatStringToTempBufferVNative((byte**)poutBuf, outBufEnd, fmt, args); + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(byte** outBuf, ref byte* outBufEnd, byte* fmt, nuint args) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + ImFormatStringToTempBufferVNative(outBuf, (byte**)poutBufEnd, fmt, args); + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(ref byte* outBuf, ref byte* outBufEnd, byte* fmt, nuint args) + { + fixed (byte** poutBuf = &outBuf) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + ImFormatStringToTempBufferVNative((byte**)poutBuf, (byte**)poutBufEnd, fmt, args); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(byte** outBuf, byte** outBufEnd, ref byte fmt, nuint args) + { + fixed (byte* pfmt = &fmt) + { + ImFormatStringToTempBufferVNative(outBuf, outBufEnd, (byte*)pfmt, args); + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(byte** outBuf, byte** outBufEnd, ReadOnlySpan fmt, nuint args) + { + fixed (byte* pfmt = fmt) + { + ImFormatStringToTempBufferVNative(outBuf, outBufEnd, (byte*)pfmt, args); + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(byte** outBuf, byte** outBufEnd, string fmt, nuint args) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImFormatStringToTempBufferVNative(outBuf, outBufEnd, pStr0, args); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(ref byte* outBuf, byte** outBufEnd, ref byte fmt, nuint args) + { + fixed (byte** poutBuf = &outBuf) + { + fixed (byte* pfmt = &fmt) + { + ImFormatStringToTempBufferVNative((byte**)poutBuf, outBufEnd, (byte*)pfmt, args); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(ref byte* outBuf, byte** outBufEnd, ReadOnlySpan fmt, nuint args) + { + fixed (byte** poutBuf = &outBuf) + { + fixed (byte* pfmt = fmt) + { + ImFormatStringToTempBufferVNative((byte**)poutBuf, outBufEnd, (byte*)pfmt, args); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(ref byte* outBuf, byte** outBufEnd, string fmt, nuint args) + { + fixed (byte** poutBuf = &outBuf) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImFormatStringToTempBufferVNative((byte**)poutBuf, outBufEnd, pStr0, args); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(byte** outBuf, ref byte* outBufEnd, ref byte fmt, nuint args) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + fixed (byte* pfmt = &fmt) + { + ImFormatStringToTempBufferVNative(outBuf, (byte**)poutBufEnd, (byte*)pfmt, args); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(byte** outBuf, ref byte* outBufEnd, ReadOnlySpan fmt, nuint args) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + fixed (byte* pfmt = fmt) + { + ImFormatStringToTempBufferVNative(outBuf, (byte**)poutBufEnd, (byte*)pfmt, args); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(byte** outBuf, ref byte* outBufEnd, string fmt, nuint args) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImFormatStringToTempBufferVNative(outBuf, (byte**)poutBufEnd, pStr0, args); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(ref byte* outBuf, ref byte* outBufEnd, ref byte fmt, nuint args) + { + fixed (byte** poutBuf = &outBuf) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + fixed (byte* pfmt = &fmt) + { + ImFormatStringToTempBufferVNative((byte**)poutBuf, (byte**)poutBufEnd, (byte*)pfmt, args); + } + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(ref byte* outBuf, ref byte* outBufEnd, ReadOnlySpan fmt, nuint args) + { + fixed (byte** poutBuf = &outBuf) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + fixed (byte* pfmt = fmt) + { + ImFormatStringToTempBufferVNative((byte**)poutBuf, (byte**)poutBufEnd, (byte*)pfmt, args); + } + } + } + } + + /// + /// To be documented. + /// + public static void ImFormatStringToTempBufferV(ref byte* outBuf, ref byte* outBufEnd, string fmt, nuint args) + { + fixed (byte** poutBuf = &outBuf) + { + fixed (byte** poutBufEnd = &outBufEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImFormatStringToTempBufferVNative((byte**)poutBuf, (byte**)poutBufEnd, pStr0, args); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* ImParseFormatFindStartNative(byte* format) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[714])(format); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[714])((nint)format); + #endif + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatFindStart(byte* format) + { + byte* ret = ImParseFormatFindStartNative(format); + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatFindStartS(byte* format) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatFindStartNative(format)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatFindStart(ref byte format) + { + fixed (byte* pformat = &format) + { + byte* ret = ImParseFormatFindStartNative((byte*)pformat); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatFindStartS(ref byte format) + { + fixed (byte* pformat = &format) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatFindStartNative((byte*)pformat)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatFindStart(ReadOnlySpan format) + { + fixed (byte* pformat = format) + { + byte* ret = ImParseFormatFindStartNative((byte*)pformat); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatFindStartS(ReadOnlySpan format) + { + fixed (byte* pformat = format) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatFindStartNative((byte*)pformat)); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImParseFormatFindStartNative(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImParseFormatFindStartNative(pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* ImParseFormatFindEndNative(byte* format) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[715])(format); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[715])((nint)format); + #endif + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatFindEnd(byte* format) + { + byte* ret = ImParseFormatFindEndNative(format); + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatFindEndS(byte* format) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatFindEndNative(format)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatFindEnd(ref byte format) + { + fixed (byte* pformat = &format) + { + byte* ret = ImParseFormatFindEndNative((byte*)pformat); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatFindEndS(ref byte format) + { + fixed (byte* pformat = &format) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatFindEndNative((byte*)pformat)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatFindEnd(ReadOnlySpan format) + { + fixed (byte* pformat = format) + { + byte* ret = ImParseFormatFindEndNative((byte*)pformat); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatFindEndS(ReadOnlySpan format) + { + fixed (byte* pformat = format) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatFindEndNative((byte*)pformat)); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImParseFormatFindEndNative(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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(ImParseFormatFindEndNative(pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImParseFormatSanitizeForPrintingNative(byte* fmtIn, byte* fmtOut, ulong fmtOutSize) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[716])(fmtIn, fmtOut, fmtOutSize); + #else + ((delegate* unmanaged[Cdecl])funcTable[716])((nint)fmtIn, (nint)fmtOut, fmtOutSize); + #endif + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(byte* fmtIn, byte* fmtOut, ulong fmtOutSize) + { + ImParseFormatSanitizeForPrintingNative(fmtIn, fmtOut, fmtOutSize); + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(ref byte fmtIn, byte* fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, fmtOut, fmtOutSize); + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(ReadOnlySpan fmtIn, byte* fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, fmtOut, fmtOutSize); + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(string fmtIn, byte* fmtOut, ulong fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImParseFormatSanitizeForPrintingNative(pStr0, fmtOut, fmtOutSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(byte* fmtIn, ref byte fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtOut = &fmtOut) + { + ImParseFormatSanitizeForPrintingNative(fmtIn, (byte*)pfmtOut, fmtOutSize); + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(byte* fmtIn, ref string fmtOut, ulong fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImParseFormatSanitizeForPrintingNative(fmtIn, pStr0, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(ref byte fmtIn, ref byte fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + fixed (byte* pfmtOut = &fmtOut) + { + ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize); + } + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(ReadOnlySpan fmtIn, ref byte fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + fixed (byte* pfmtOut = &fmtOut) + { + ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize); + } + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(string fmtIn, ref string fmtOut, ulong fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (fmtOut != null) + { + pStrSize1 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(fmtOut, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + ImParseFormatSanitizeForPrintingNative(pStr0, pStr1, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(ref byte fmtIn, ref string fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, pStr0, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(ReadOnlySpan fmtIn, ref string fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, pStr0, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(string fmtIn, ref byte fmtOut, ulong fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pfmtOut = &fmtOut) + { + ImParseFormatSanitizeForPrintingNative(pStr0, (byte*)pfmtOut, fmtOutSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(byte* fmtIn, byte* fmtOut, nuint fmtOutSize) + { + ImParseFormatSanitizeForPrintingNative(fmtIn, fmtOut, fmtOutSize); + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(ref byte fmtIn, byte* fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, fmtOut, fmtOutSize); + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(ReadOnlySpan fmtIn, byte* fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, fmtOut, fmtOutSize); + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(string fmtIn, byte* fmtOut, nuint fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImParseFormatSanitizeForPrintingNative(pStr0, fmtOut, fmtOutSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.005.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.005.cs new file mode 100644 index 000000000..735e813d5 --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.005.cs @@ -0,0 +1,5032 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(byte* fmtIn, ref byte fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtOut = &fmtOut) + { + ImParseFormatSanitizeForPrintingNative(fmtIn, (byte*)pfmtOut, fmtOutSize); + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(byte* fmtIn, ref string fmtOut, nuint fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImParseFormatSanitizeForPrintingNative(fmtIn, pStr0, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(ref byte fmtIn, ref byte fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + fixed (byte* pfmtOut = &fmtOut) + { + ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize); + } + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(ReadOnlySpan fmtIn, ref byte fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + fixed (byte* pfmtOut = &fmtOut) + { + ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize); + } + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(string fmtIn, ref string fmtOut, nuint fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (fmtOut != null) + { + pStrSize1 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(fmtOut, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + ImParseFormatSanitizeForPrintingNative(pStr0, pStr1, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(ref byte fmtIn, ref string fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, pStr0, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(ReadOnlySpan fmtIn, ref string fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, pStr0, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void ImParseFormatSanitizeForPrinting(string fmtIn, ref byte fmtOut, nuint fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pfmtOut = &fmtOut) + { + ImParseFormatSanitizeForPrintingNative(pStr0, (byte*)pfmtOut, fmtOutSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* ImParseFormatSanitizeForScanningNative(byte* fmtIn, byte* fmtOut, ulong fmtOutSize) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[717])(fmtIn, fmtOut, fmtOutSize); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[717])((nint)fmtIn, (nint)fmtOut, fmtOutSize); + #endif + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(byte* fmtIn, byte* fmtOut, ulong fmtOutSize) + { + byte* ret = ImParseFormatSanitizeForScanningNative(fmtIn, fmtOut, fmtOutSize); + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(byte* fmtIn, byte* fmtOut, ulong fmtOutSize) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(fmtIn, fmtOut, fmtOutSize)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(ref byte fmtIn, byte* fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, fmtOut, fmtOutSize); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(ref byte fmtIn, byte* fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, fmtOut, fmtOutSize)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(ReadOnlySpan fmtIn, byte* fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, fmtOut, fmtOutSize); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(ReadOnlySpan fmtIn, byte* fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, fmtOut, fmtOutSize)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(string fmtIn, byte* fmtOut, ulong fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImParseFormatSanitizeForScanningNative(pStr0, fmtOut, fmtOutSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(string fmtIn, byte* fmtOut, ulong fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(pStr0, fmtOut, fmtOutSize)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(byte* fmtIn, ref byte fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtOut = &fmtOut) + { + byte* ret = ImParseFormatSanitizeForScanningNative(fmtIn, (byte*)pfmtOut, fmtOutSize); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(byte* fmtIn, ref byte fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtOut = &fmtOut) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(fmtIn, (byte*)pfmtOut, fmtOutSize)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(byte* fmtIn, ref string fmtOut, ulong fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImParseFormatSanitizeForScanningNative(fmtIn, pStr0, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(byte* fmtIn, ref string fmtOut, ulong fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(fmtIn, pStr0, fmtOutSize)); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(ref byte fmtIn, ref byte fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + fixed (byte* pfmtOut = &fmtOut) + { + byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(ref byte fmtIn, ref byte fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + fixed (byte* pfmtOut = &fmtOut) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(ReadOnlySpan fmtIn, ref byte fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + fixed (byte* pfmtOut = &fmtOut) + { + byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(ReadOnlySpan fmtIn, ref byte fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + fixed (byte* pfmtOut = &fmtOut) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(string fmtIn, ref string fmtOut, ulong fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (fmtOut != null) + { + pStrSize1 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(fmtOut, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* ret = ImParseFormatSanitizeForScanningNative(pStr0, pStr1, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(string fmtIn, ref string fmtOut, ulong fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (fmtOut != null) + { + pStrSize1 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(fmtOut, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(pStr0, pStr1, fmtOutSize)); + fmtOut = Utils.DecodeStringUTF8(pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(ref byte fmtIn, ref string fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, pStr0, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(ref byte fmtIn, ref string fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, pStr0, fmtOutSize)); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(ReadOnlySpan fmtIn, ref string fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, pStr0, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(ReadOnlySpan fmtIn, ref string fmtOut, ulong fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, pStr0, fmtOutSize)); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(string fmtIn, ref byte fmtOut, ulong fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pfmtOut = &fmtOut) + { + byte* ret = ImParseFormatSanitizeForScanningNative(pStr0, (byte*)pfmtOut, fmtOutSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(string fmtIn, ref byte fmtOut, ulong fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pfmtOut = &fmtOut) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(pStr0, (byte*)pfmtOut, fmtOutSize)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(byte* fmtIn, byte* fmtOut, nuint fmtOutSize) + { + byte* ret = ImParseFormatSanitizeForScanningNative(fmtIn, fmtOut, fmtOutSize); + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(byte* fmtIn, byte* fmtOut, nuint fmtOutSize) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(fmtIn, fmtOut, fmtOutSize)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(ref byte fmtIn, byte* fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, fmtOut, fmtOutSize); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(ref byte fmtIn, byte* fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, fmtOut, fmtOutSize)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(ReadOnlySpan fmtIn, byte* fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, fmtOut, fmtOutSize); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(ReadOnlySpan fmtIn, byte* fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, fmtOut, fmtOutSize)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(string fmtIn, byte* fmtOut, nuint fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImParseFormatSanitizeForScanningNative(pStr0, fmtOut, fmtOutSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(string fmtIn, byte* fmtOut, nuint fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(pStr0, fmtOut, fmtOutSize)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(byte* fmtIn, ref byte fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtOut = &fmtOut) + { + byte* ret = ImParseFormatSanitizeForScanningNative(fmtIn, (byte*)pfmtOut, fmtOutSize); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(byte* fmtIn, ref byte fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtOut = &fmtOut) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(fmtIn, (byte*)pfmtOut, fmtOutSize)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(byte* fmtIn, ref string fmtOut, nuint fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImParseFormatSanitizeForScanningNative(fmtIn, pStr0, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(byte* fmtIn, ref string fmtOut, nuint fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(fmtIn, pStr0, fmtOutSize)); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(ref byte fmtIn, ref byte fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + fixed (byte* pfmtOut = &fmtOut) + { + byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(ref byte fmtIn, ref byte fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + fixed (byte* pfmtOut = &fmtOut) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(ReadOnlySpan fmtIn, ref byte fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + fixed (byte* pfmtOut = &fmtOut) + { + byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(ReadOnlySpan fmtIn, ref byte fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + fixed (byte* pfmtOut = &fmtOut) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(string fmtIn, ref string fmtOut, nuint fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (fmtOut != null) + { + pStrSize1 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(fmtOut, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* ret = ImParseFormatSanitizeForScanningNative(pStr0, pStr1, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(string fmtIn, ref string fmtOut, nuint fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (fmtOut != null) + { + pStrSize1 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(fmtOut, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(pStr0, pStr1, fmtOutSize)); + fmtOut = Utils.DecodeStringUTF8(pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(ref byte fmtIn, ref string fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, pStr0, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(ref byte fmtIn, ref string fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = &fmtIn) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, pStr0, fmtOutSize)); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(ReadOnlySpan fmtIn, ref string fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, pStr0, fmtOutSize); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(ReadOnlySpan fmtIn, ref string fmtOut, nuint fmtOutSize) + { + fixed (byte* pfmtIn = fmtIn) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtOut != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtOut); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, pStr0, fmtOutSize)); + fmtOut = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatSanitizeForScanning(string fmtIn, ref byte fmtOut, nuint fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pfmtOut = &fmtOut) + { + byte* ret = ImParseFormatSanitizeForScanningNative(pStr0, (byte*)pfmtOut, fmtOutSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatSanitizeForScanningS(string fmtIn, ref byte fmtOut, nuint fmtOutSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmtIn != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmtIn); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pfmtOut = &fmtOut) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(pStr0, (byte*)pfmtOut, fmtOutSize)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImParseFormatPrecisionNative(byte* format, int defaultValue) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[718])(format, defaultValue); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[718])((nint)format, defaultValue); + #endif + } + + /// + /// To be documented. + /// + public static int ImParseFormatPrecision(byte* format, int defaultValue) + { + int ret = ImParseFormatPrecisionNative(format, defaultValue); + return ret; + } + + /// + /// To be documented. + /// + public static int ImParseFormatPrecision(ref byte format, int defaultValue) + { + fixed (byte* pformat = &format) + { + int ret = ImParseFormatPrecisionNative((byte*)pformat, defaultValue); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImParseFormatPrecision(ReadOnlySpan format, int defaultValue) + { + fixed (byte* pformat = format) + { + int ret = ImParseFormatPrecisionNative((byte*)pformat, defaultValue); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImParseFormatPrecisionNative(pStr0, defaultValue); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* ImTextCharToUtf8Native(byte* outBuf, uint c) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[719])(outBuf, c); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[719])((nint)outBuf, c); + #endif + } + + /// + /// To be documented. + /// + public static byte* ImTextCharToUtf8(byte* outBuf, uint c) + { + byte* ret = ImTextCharToUtf8Native(outBuf, c); + return ret; + } + + /// + /// To be documented. + /// + public static string ImTextCharToUtf8S(byte* outBuf, uint c) + { + string ret = Utils.DecodeStringUTF8(ImTextCharToUtf8Native(outBuf, c)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImTextCharToUtf8(ref byte outBuf, uint c) + { + fixed (byte* poutBuf = &outBuf) + { + byte* ret = ImTextCharToUtf8Native((byte*)poutBuf, c); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImTextCharToUtf8S(ref byte outBuf, uint c) + { + fixed (byte* poutBuf = &outBuf) + { + string ret = Utils.DecodeStringUTF8(ImTextCharToUtf8Native((byte*)poutBuf, c)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImTextCharToUtf8(ReadOnlySpan outBuf, uint c) + { + fixed (byte* poutBuf = outBuf) + { + byte* ret = ImTextCharToUtf8Native((byte*)poutBuf, c); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImTextCharToUtf8S(ReadOnlySpan outBuf, uint c) + { + fixed (byte* poutBuf = outBuf) + { + string ret = Utils.DecodeStringUTF8(ImTextCharToUtf8Native((byte*)poutBuf, c)); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImTextCharFromUtf8Native(uint* outChar, byte* inText, byte* inTextEnd) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[720])(outChar, inText, inTextEnd); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[720])((nint)outChar, (nint)inText, (nint)inTextEnd); + #endif + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(uint* outChar, byte* inText, byte* inTextEnd) + { + int ret = ImTextCharFromUtf8Native(outChar, inText, inTextEnd); + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(ref uint outChar, byte* inText, byte* inTextEnd) + { + fixed (uint* poutChar = &outChar) + { + int ret = ImTextCharFromUtf8Native((uint*)poutChar, inText, inTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(uint* outChar, ref byte inText, byte* inTextEnd) + { + fixed (byte* pinText = &inText) + { + int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, inTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(uint* outChar, ReadOnlySpan inText, byte* inTextEnd) + { + fixed (byte* pinText = inText) + { + int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, inTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native(outChar, pStr0, inTextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(ref uint outChar, ref byte inText, byte* inTextEnd) + { + fixed (uint* poutChar = &outChar) + { + fixed (byte* pinText = &inText) + { + int ret = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, inTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(ref uint outChar, ReadOnlySpan inText, byte* inTextEnd) + { + fixed (uint* poutChar = &outChar) + { + fixed (byte* pinText = inText) + { + int ret = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, inTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native((uint*)poutChar, pStr0, inTextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(uint* outChar, byte* inText, ref byte inTextEnd) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextCharFromUtf8Native(outChar, inText, (byte*)pinTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(uint* outChar, byte* inText, ReadOnlySpan inTextEnd) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextCharFromUtf8Native(outChar, inText, (byte*)pinTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native(outChar, inText, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(ref uint outChar, byte* inText, ref byte inTextEnd) + { + fixed (uint* poutChar = &outChar) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextCharFromUtf8Native((uint*)poutChar, inText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(ref uint outChar, byte* inText, ReadOnlySpan inTextEnd) + { + fixed (uint* poutChar = &outChar) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextCharFromUtf8Native((uint*)poutChar, inText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native((uint*)poutChar, inText, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(uint* outChar, ref byte inText, ref byte inTextEnd) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(uint* outChar, ReadOnlySpan inText, ReadOnlySpan inTextEnd) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native(outChar, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(uint* outChar, ref byte inText, ReadOnlySpan inTextEnd) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native(outChar, (byte*)pinText, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCharFromUtf8(uint* outChar, ReadOnlySpan inText, ref byte inTextEnd) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native(outChar, (byte*)pinText, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native(outChar, pStr0, (byte*)pinTextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native(outChar, pStr0, (byte*)pinTextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native((uint*)poutChar, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native((uint*)poutChar, pStr0, (byte*)pinTextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCharFromUtf8Native((uint*)poutChar, pStr0, (byte*)pinTextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImTextCountCharsFromUtf8Native(byte* inText, byte* inTextEnd) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[721])(inText, inTextEnd); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[721])((nint)inText, (nint)inTextEnd); + #endif + } + + /// + /// To be documented. + /// + public static int ImTextCountCharsFromUtf8(byte* inText, byte* inTextEnd) + { + int ret = ImTextCountCharsFromUtf8Native(inText, inTextEnd); + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCountCharsFromUtf8(ref byte inText, byte* inTextEnd) + { + fixed (byte* pinText = &inText) + { + int ret = ImTextCountCharsFromUtf8Native((byte*)pinText, inTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCountCharsFromUtf8(ReadOnlySpan inText, byte* inTextEnd) + { + fixed (byte* pinText = inText) + { + int ret = ImTextCountCharsFromUtf8Native((byte*)pinText, inTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountCharsFromUtf8Native(pStr0, inTextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCountCharsFromUtf8(byte* inText, ref byte inTextEnd) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextCountCharsFromUtf8Native(inText, (byte*)pinTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCountCharsFromUtf8(byte* inText, ReadOnlySpan inTextEnd) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextCountCharsFromUtf8Native(inText, (byte*)pinTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountCharsFromUtf8Native(inText, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCountCharsFromUtf8(ref byte inText, ref byte inTextEnd) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextCountCharsFromUtf8Native((byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextCountCharsFromUtf8(ReadOnlySpan inText, ReadOnlySpan inTextEnd) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextCountCharsFromUtf8Native((byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountCharsFromUtf8Native(pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCountCharsFromUtf8(ref byte inText, ReadOnlySpan inTextEnd) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextCountCharsFromUtf8Native((byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountCharsFromUtf8Native((byte*)pinText, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCountCharsFromUtf8(ReadOnlySpan inText, ref byte inTextEnd) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextCountCharsFromUtf8Native((byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountCharsFromUtf8Native((byte*)pinText, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountCharsFromUtf8Native(pStr0, (byte*)pinTextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountCharsFromUtf8Native(pStr0, (byte*)pinTextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImTextCountUtf8BytesFromCharNative(byte* inText, byte* inTextEnd) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[722])(inText, inTextEnd); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[722])((nint)inText, (nint)inTextEnd); + #endif + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromChar(byte* inText, byte* inTextEnd) + { + int ret = ImTextCountUtf8BytesFromCharNative(inText, inTextEnd); + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromChar(ref byte inText, byte* inTextEnd) + { + fixed (byte* pinText = &inText) + { + int ret = ImTextCountUtf8BytesFromCharNative((byte*)pinText, inTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromChar(ReadOnlySpan inText, byte* inTextEnd) + { + fixed (byte* pinText = inText) + { + int ret = ImTextCountUtf8BytesFromCharNative((byte*)pinText, inTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountUtf8BytesFromCharNative(pStr0, inTextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromChar(byte* inText, ref byte inTextEnd) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextCountUtf8BytesFromCharNative(inText, (byte*)pinTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromChar(byte* inText, ReadOnlySpan inTextEnd) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextCountUtf8BytesFromCharNative(inText, (byte*)pinTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountUtf8BytesFromCharNative(inText, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromChar(ref byte inText, ref byte inTextEnd) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextCountUtf8BytesFromCharNative((byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromChar(ReadOnlySpan inText, ReadOnlySpan inTextEnd) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextCountUtf8BytesFromCharNative((byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountUtf8BytesFromCharNative(pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromChar(ref byte inText, ReadOnlySpan inTextEnd) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextCountUtf8BytesFromCharNative((byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountUtf8BytesFromCharNative((byte*)pinText, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromChar(ReadOnlySpan inText, ref byte inTextEnd) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextCountUtf8BytesFromCharNative((byte*)pinText, (byte*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountUtf8BytesFromCharNative((byte*)pinText, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountUtf8BytesFromCharNative(pStr0, (byte*)pinTextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImTextCountUtf8BytesFromCharNative(pStr0, (byte*)pinTextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImTextCountUtf8BytesFromStrNative(ushort* inText, ushort* inTextEnd) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[723])(inText, inTextEnd); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[723])((nint)inText, (nint)inTextEnd); + #endif + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromStr(ushort* inText, ushort* inTextEnd) + { + int ret = ImTextCountUtf8BytesFromStrNative(inText, inTextEnd); + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromStr(ref ushort inText, ushort* inTextEnd) + { + fixed (ushort* pinText = &inText) + { + int ret = ImTextCountUtf8BytesFromStrNative((ushort*)pinText, inTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromStr(ushort* inText, ref ushort inTextEnd) + { + fixed (ushort* pinTextEnd = &inTextEnd) + { + int ret = ImTextCountUtf8BytesFromStrNative(inText, (ushort*)pinTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextCountUtf8BytesFromStr(ref ushort inText, ref ushort inTextEnd) + { + fixed (ushort* pinText = &inText) + { + fixed (ushort* pinTextEnd = &inTextEnd) + { + int ret = ImTextCountUtf8BytesFromStrNative((ushort*)pinText, (ushort*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImFileHandle ImFileOpenNative(byte* filename, byte* mode) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[724])(filename, mode); + #else + return (ImFileHandle)((delegate* unmanaged[Cdecl])funcTable[724])((nint)filename, (nint)mode); + #endif + } + + /// + /// To be documented. + /// + public static ImFileHandle ImFileOpen(byte* filename, byte* mode) + { + ImFileHandle ret = ImFileOpenNative(filename, mode); + return ret; + } + + /// + /// To be documented. + /// + public static ImFileHandle ImFileOpen(ref byte filename, byte* mode) + { + fixed (byte* pfilename = &filename) + { + ImFileHandle ret = ImFileOpenNative((byte*)pfilename, mode); + return ret; + } + } + + /// + /// To be documented. + /// + public static ImFileHandle ImFileOpen(ReadOnlySpan filename, byte* mode) + { + fixed (byte* pfilename = filename) + { + ImFileHandle ret = ImFileOpenNative((byte*)pfilename, mode); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImFileOpenNative(pStr0, mode); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static ImFileHandle ImFileOpen(byte* filename, ref byte mode) + { + fixed (byte* pmode = &mode) + { + ImFileHandle ret = ImFileOpenNative(filename, (byte*)pmode); + return ret; + } + } + + /// + /// To be documented. + /// + public static ImFileHandle ImFileOpen(byte* filename, ReadOnlySpan mode) + { + fixed (byte* pmode = mode) + { + ImFileHandle ret = ImFileOpenNative(filename, (byte*)pmode); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImFileOpenNative(filename, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static ImFileHandle ImFileOpen(ref byte filename, ref byte mode) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = &mode) + { + ImFileHandle ret = ImFileOpenNative((byte*)pfilename, (byte*)pmode); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static ImFileHandle ImFileOpen(ReadOnlySpan filename, ReadOnlySpan mode) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = mode) + { + ImFileHandle ret = ImFileOpenNative((byte*)pfilename, (byte*)pmode); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImFileOpenNative(pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static ImFileHandle ImFileOpen(ref byte filename, ReadOnlySpan mode) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = mode) + { + ImFileHandle ret = ImFileOpenNative((byte*)pfilename, (byte*)pmode); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImFileOpenNative((byte*)pfilename, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static ImFileHandle ImFileOpen(ReadOnlySpan filename, ref byte mode) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = &mode) + { + ImFileHandle ret = ImFileOpenNative((byte*)pfilename, (byte*)pmode); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImFileOpenNative((byte*)pfilename, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImFileOpenNative(pStr0, (byte*)pmode); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImFileOpenNative(pStr0, (byte*)pmode); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ImFileCloseNative(ImFileHandle file) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[725])(file); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[725])(file); + #endif + } + + /// + /// To be documented. + /// + public static bool ImFileClose(ImFileHandle file) + { + byte ret = ImFileCloseNative(file); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ulong ImFileGetSizeNative(ImFileHandle file) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[726])(file); + #else + return (ulong)((delegate* unmanaged[Cdecl])funcTable[726])(file); + #endif + } + + /// + /// To be documented. + /// + public static ulong ImFileGetSize(ImFileHandle file) + { + ulong ret = ImFileGetSizeNative(file); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ulong ImFileReadNative(void* data, ulong size, ulong count, ImFileHandle file) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[727])(data, size, count, file); + #else + return (ulong)((delegate* unmanaged[Cdecl])funcTable[727])((nint)data, size, count, file); + #endif + } + + /// + /// To be documented. + /// + public static ulong ImFileRead(void* data, ulong size, ulong count, ImFileHandle file) + { + ulong ret = ImFileReadNative(data, size, count, file); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ulong ImFileWriteNative(void* data, ulong size, ulong count, ImFileHandle file) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[728])(data, size, count, file); + #else + return (ulong)((delegate* unmanaged[Cdecl])funcTable[728])((nint)data, size, count, file); + #endif + } + + /// + /// To be documented. + /// + public static ulong ImFileWrite(void* data, ulong size, ulong count, ImFileHandle file) + { + ulong ret = ImFileWriteNative(data, size, count, file); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void* ImFileLoadToMemoryNative(byte* filename, byte* mode, ulong* outFileSize, int paddingBytes) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[729])(filename, mode, outFileSize, paddingBytes); + #else + return (void*)((delegate* unmanaged[Cdecl])funcTable[729])((nint)filename, (nint)mode, (nint)outFileSize, paddingBytes); + #endif + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, byte* mode, ulong* outFileSize, int paddingBytes) + { + void* ret = ImFileLoadToMemoryNative(filename, mode, outFileSize, paddingBytes); + return ret; + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, byte* mode, ulong* outFileSize) + { + void* ret = ImFileLoadToMemoryNative(filename, mode, outFileSize, (int)(0)); + return ret; + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, byte* mode) + { + void* ret = ImFileLoadToMemoryNative(filename, mode, (ulong*)(default), (int)(0)); + return ret; + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, byte* mode, int paddingBytes) + { + void* ret = ImFileLoadToMemoryNative(filename, mode, (ulong*)(default), paddingBytes); + return ret; + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, byte* mode, ulong* outFileSize, int paddingBytes) + { + fixed (byte* pfilename = &filename) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, mode, outFileSize, paddingBytes); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, byte* mode, ulong* outFileSize) + { + fixed (byte* pfilename = &filename) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, mode, outFileSize, (int)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, byte* mode) + { + fixed (byte* pfilename = &filename) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, mode, (ulong*)(default), (int)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, byte* mode, int paddingBytes) + { + fixed (byte* pfilename = &filename) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, mode, (ulong*)(default), paddingBytes); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, byte* mode, ulong* outFileSize, int paddingBytes) + { + fixed (byte* pfilename = filename) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, mode, outFileSize, paddingBytes); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, byte* mode, ulong* outFileSize) + { + fixed (byte* pfilename = filename) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, mode, outFileSize, (int)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, byte* mode) + { + fixed (byte* pfilename = filename) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, mode, (ulong*)(default), (int)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, byte* mode, int paddingBytes) + { + fixed (byte* pfilename = filename) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, mode, (ulong*)(default), paddingBytes); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, byte* mode, ulong* 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 = ImFileLoadToMemoryNative(pStr0, mode, outFileSize, paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, byte* mode, ulong* 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 = ImFileLoadToMemoryNative(pStr0, mode, outFileSize, (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative(pStr0, mode, (ulong*)(default), (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative(pStr0, mode, (ulong*)(default), paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, ref byte mode, ulong* outFileSize, int paddingBytes) + { + fixed (byte* pmode = &mode) + { + void* ret = ImFileLoadToMemoryNative(filename, (byte*)pmode, outFileSize, paddingBytes); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, ref byte mode, ulong* outFileSize) + { + fixed (byte* pmode = &mode) + { + void* ret = ImFileLoadToMemoryNative(filename, (byte*)pmode, outFileSize, (int)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, ref byte mode) + { + fixed (byte* pmode = &mode) + { + void* ret = ImFileLoadToMemoryNative(filename, (byte*)pmode, (ulong*)(default), (int)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, ref byte mode, int paddingBytes) + { + fixed (byte* pmode = &mode) + { + void* ret = ImFileLoadToMemoryNative(filename, (byte*)pmode, (ulong*)(default), paddingBytes); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, ReadOnlySpan mode, ulong* outFileSize, int paddingBytes) + { + fixed (byte* pmode = mode) + { + void* ret = ImFileLoadToMemoryNative(filename, (byte*)pmode, outFileSize, paddingBytes); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, ReadOnlySpan mode, ulong* outFileSize) + { + fixed (byte* pmode = mode) + { + void* ret = ImFileLoadToMemoryNative(filename, (byte*)pmode, outFileSize, (int)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, ReadOnlySpan mode) + { + fixed (byte* pmode = mode) + { + void* ret = ImFileLoadToMemoryNative(filename, (byte*)pmode, (ulong*)(default), (int)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, ReadOnlySpan mode, int paddingBytes) + { + fixed (byte* pmode = mode) + { + void* ret = ImFileLoadToMemoryNative(filename, (byte*)pmode, (ulong*)(default), paddingBytes); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, string mode, ulong* 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 = ImFileLoadToMemoryNative(filename, pStr0, outFileSize, paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, string mode, ulong* 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 = ImFileLoadToMemoryNative(filename, pStr0, outFileSize, (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative(filename, pStr0, (ulong*)(default), (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative(filename, pStr0, (ulong*)(default), paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, ref byte mode, ulong* outFileSize, int paddingBytes) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = &mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, outFileSize, paddingBytes); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, ref byte mode, ulong* outFileSize) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = &mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, outFileSize, (int)(0)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, ref byte mode) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = &mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)(default), (int)(0)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, ref byte mode, int paddingBytes) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = &mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)(default), paddingBytes); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, ReadOnlySpan mode, ulong* outFileSize, int paddingBytes) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, outFileSize, paddingBytes); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, ReadOnlySpan mode, ulong* outFileSize) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, outFileSize, (int)(0)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, ReadOnlySpan mode) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)(default), (int)(0)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, ReadOnlySpan mode, int paddingBytes) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)(default), paddingBytes); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, string mode, ulong* 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 = ImFileLoadToMemoryNative(pStr0, pStr1, outFileSize, paddingBytes); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, string mode, ulong* 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 = ImFileLoadToMemoryNative(pStr0, pStr1, outFileSize, (int)(0)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative(pStr0, pStr1, (ulong*)(default), (int)(0)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative(pStr0, pStr1, (ulong*)(default), paddingBytes); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, ReadOnlySpan mode, ulong* outFileSize, int paddingBytes) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, outFileSize, paddingBytes); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, ReadOnlySpan mode, ulong* outFileSize) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, outFileSize, (int)(0)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, ReadOnlySpan mode) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)(default), (int)(0)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, ReadOnlySpan mode, int paddingBytes) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)(default), paddingBytes); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, string mode, ulong* 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 = ImFileLoadToMemoryNative((byte*)pfilename, pStr0, outFileSize, paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, string mode, ulong* 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 = ImFileLoadToMemoryNative((byte*)pfilename, pStr0, outFileSize, (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative((byte*)pfilename, pStr0, (ulong*)(default), (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative((byte*)pfilename, pStr0, (ulong*)(default), paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, ref byte mode, ulong* outFileSize, int paddingBytes) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = &mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, outFileSize, paddingBytes); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, ref byte mode, ulong* outFileSize) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = &mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, outFileSize, (int)(0)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, ref byte mode) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = &mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)(default), (int)(0)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, ref byte mode, int paddingBytes) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = &mode) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)(default), paddingBytes); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, string mode, ulong* 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 = ImFileLoadToMemoryNative((byte*)pfilename, pStr0, outFileSize, paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, string mode, ulong* 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 = ImFileLoadToMemoryNative((byte*)pfilename, pStr0, outFileSize, (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative((byte*)pfilename, pStr0, (ulong*)(default), (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative((byte*)pfilename, pStr0, (ulong*)(default), paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, ref byte mode, ulong* 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 = ImFileLoadToMemoryNative(pStr0, (byte*)pmode, outFileSize, paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, ref byte mode, ulong* 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 = ImFileLoadToMemoryNative(pStr0, (byte*)pmode, outFileSize, (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative(pStr0, (byte*)pmode, (ulong*)(default), (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative(pStr0, (byte*)pmode, (ulong*)(default), paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, ReadOnlySpan mode, ulong* 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 = ImFileLoadToMemoryNative(pStr0, (byte*)pmode, outFileSize, paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, ReadOnlySpan mode, ulong* 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 = ImFileLoadToMemoryNative(pStr0, (byte*)pmode, outFileSize, (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative(pStr0, (byte*)pmode, (ulong*)(default), (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.006.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.006.cs new file mode 100644 index 000000000..bdd203720 --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.006.cs @@ -0,0 +1,5028 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + 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 = ImFileLoadToMemoryNative(pStr0, (byte*)pmode, (ulong*)(default), paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, byte* mode, ref nuint outFileSize, int paddingBytes) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(filename, mode, (ulong*)poutFileSize, paddingBytes); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, byte* mode, ref nuint outFileSize) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(filename, mode, (ulong*)poutFileSize, (int)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, byte* mode, ref nuint outFileSize, int paddingBytes) + { + fixed (byte* pfilename = &filename) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, mode, (ulong*)poutFileSize, paddingBytes); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, byte* mode, ref nuint outFileSize) + { + fixed (byte* pfilename = &filename) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, mode, (ulong*)poutFileSize, (int)(0)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, byte* mode, ref nuint outFileSize, int paddingBytes) + { + fixed (byte* pfilename = filename) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, mode, (ulong*)poutFileSize, paddingBytes); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, byte* mode, ref nuint outFileSize) + { + fixed (byte* pfilename = filename) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, mode, (ulong*)poutFileSize, (int)(0)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, byte* mode, ref 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 (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(pStr0, mode, (ulong*)poutFileSize, paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, byte* mode, ref 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 (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(pStr0, mode, (ulong*)poutFileSize, (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, ref byte mode, ref nuint outFileSize, int paddingBytes) + { + fixed (byte* pmode = &mode) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(filename, (byte*)pmode, (ulong*)poutFileSize, paddingBytes); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, ref byte mode, ref nuint outFileSize) + { + fixed (byte* pmode = &mode) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(filename, (byte*)pmode, (ulong*)poutFileSize, (int)(0)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, ReadOnlySpan mode, ref nuint outFileSize, int paddingBytes) + { + fixed (byte* pmode = mode) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(filename, (byte*)pmode, (ulong*)poutFileSize, paddingBytes); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, ReadOnlySpan mode, ref nuint outFileSize) + { + fixed (byte* pmode = mode) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(filename, (byte*)pmode, (ulong*)poutFileSize, (int)(0)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, string mode, ref 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; + } + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(filename, pStr0, (ulong*)poutFileSize, paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(byte* filename, string mode, ref 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; + } + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(filename, pStr0, (ulong*)poutFileSize, (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, ref byte mode, ref nuint outFileSize, int paddingBytes) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = &mode) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)poutFileSize, paddingBytes); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, ref byte mode, ref nuint outFileSize) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = &mode) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)poutFileSize, (int)(0)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, ReadOnlySpan mode, ref nuint outFileSize, int paddingBytes) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = mode) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)poutFileSize, paddingBytes); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, ReadOnlySpan mode, ref nuint outFileSize) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = mode) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)poutFileSize, (int)(0)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, string mode, ref 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; + } + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(pStr0, pStr1, (ulong*)poutFileSize, paddingBytes); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, string mode, ref 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; + } + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(pStr0, pStr1, (ulong*)poutFileSize, (int)(0)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, ReadOnlySpan mode, ref nuint outFileSize, int paddingBytes) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = mode) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)poutFileSize, paddingBytes); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, ReadOnlySpan mode, ref nuint outFileSize) + { + fixed (byte* pfilename = &filename) + { + fixed (byte* pmode = mode) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)poutFileSize, (int)(0)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, string mode, ref 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; + } + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, pStr0, (ulong*)poutFileSize, paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ref byte filename, string mode, ref 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; + } + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, pStr0, (ulong*)poutFileSize, (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, ref byte mode, ref nuint outFileSize, int paddingBytes) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = &mode) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)poutFileSize, paddingBytes); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, ref byte mode, ref nuint outFileSize) + { + fixed (byte* pfilename = filename) + { + fixed (byte* pmode = &mode) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, (byte*)pmode, (ulong*)poutFileSize, (int)(0)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, string mode, ref 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; + } + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, pStr0, (ulong*)poutFileSize, paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(ReadOnlySpan filename, string mode, ref 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; + } + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative((byte*)pfilename, pStr0, (ulong*)poutFileSize, (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, ref byte mode, ref 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) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(pStr0, (byte*)pmode, (ulong*)poutFileSize, paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, ref byte mode, ref 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) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(pStr0, (byte*)pmode, (ulong*)poutFileSize, (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, ReadOnlySpan mode, ref 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) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(pStr0, (byte*)pmode, (ulong*)poutFileSize, paddingBytes); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static void* ImFileLoadToMemory(string filename, ReadOnlySpan mode, ref 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) + { + fixed (nuint* poutFileSize = &outFileSize) + { + void* ret = ImFileLoadToMemoryNative(pStr0, (byte*)pmode, (ulong*)poutFileSize, (int)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImPowNative(float x, float y) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[730])(x, y); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[730])(x, y); + #endif + } + + /// + /// To be documented. + /// + public static float ImPow(float x, float y) + { + float ret = ImPowNative(x, y); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static double ImPowNative(double x, double y) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[731])(x, y); + #else + return (double)((delegate* unmanaged[Cdecl])funcTable[731])(x, y); + #endif + } + + /// + /// To be documented. + /// + public static double ImPow(double x, double y) + { + double ret = ImPowNative(x, y); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImLogNative(float x) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[732])(x); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[732])(x); + #endif + } + + /// + /// To be documented. + /// + public static float ImLog(float x) + { + float ret = ImLogNative(x); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static double ImLogNative(double x) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[733])(x); + #else + return (double)((delegate* unmanaged[Cdecl])funcTable[733])(x); + #endif + } + + /// + /// To be documented. + /// + public static double ImLog(double x) + { + double ret = ImLogNative(x); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImAbsNative(int x) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[734])(x); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[734])(x); + #endif + } + + /// + /// To be documented. + /// + public static int ImAbs(int x) + { + int ret = ImAbsNative(x); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImAbsNative(float x) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[735])(x); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[735])(x); + #endif + } + + /// + /// To be documented. + /// + public static float ImAbs(float x) + { + float ret = ImAbsNative(x); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static double ImAbsNative(double x) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[736])(x); + #else + return (double)((delegate* unmanaged[Cdecl])funcTable[736])(x); + #endif + } + + /// + /// To be documented. + /// + public static double ImAbs(double x) + { + double ret = ImAbsNative(x); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImSignNative(float x) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[737])(x); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[737])(x); + #endif + } + + /// + /// To be documented. + /// + public static float ImSign(float x) + { + float ret = ImSignNative(x); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static double ImSignNative(double x) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[738])(x); + #else + return (double)((delegate* unmanaged[Cdecl])funcTable[738])(x); + #endif + } + + /// + /// To be documented. + /// + public static double ImSign(double x) + { + double ret = ImSignNative(x); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImRsqrtNative(float x) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[739])(x); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[739])(x); + #endif + } + + /// + /// To be documented. + /// + public static float ImRsqrt(float x) + { + float ret = ImRsqrtNative(x); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static double ImRsqrtNative(double x) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[740])(x); + #else + return (double)((delegate* unmanaged[Cdecl])funcTable[740])(x); + #endif + } + + /// + /// To be documented. + /// + public static double ImRsqrt(double x) + { + double ret = ImRsqrtNative(x); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImMinNative(Vector2* pOut, Vector2 lhs, Vector2 rhs) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[741])(pOut, lhs, rhs); + #else + ((delegate* unmanaged[Cdecl])funcTable[741])((nint)pOut, lhs, rhs); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImMin(Vector2 lhs, Vector2 rhs) + { + Vector2 ret; + ImMinNative(&ret, lhs, rhs); + return ret; + } + + /// + /// To be documented. + /// + public static void ImMin(Vector2* pOut, Vector2 lhs, Vector2 rhs) + { + ImMinNative(pOut, lhs, rhs); + } + + /// + /// To be documented. + /// + public static void ImMin(ref Vector2 pOut, Vector2 lhs, Vector2 rhs) + { + fixed (Vector2* ppOut = &pOut) + { + ImMinNative((Vector2*)ppOut, lhs, rhs); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImMaxNative(Vector2* pOut, Vector2 lhs, Vector2 rhs) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[742])(pOut, lhs, rhs); + #else + ((delegate* unmanaged[Cdecl])funcTable[742])((nint)pOut, lhs, rhs); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImMax(Vector2 lhs, Vector2 rhs) + { + Vector2 ret; + ImMaxNative(&ret, lhs, rhs); + return ret; + } + + /// + /// To be documented. + /// + public static void ImMax(Vector2* pOut, Vector2 lhs, Vector2 rhs) + { + ImMaxNative(pOut, lhs, rhs); + } + + /// + /// To be documented. + /// + public static void ImMax(ref Vector2 pOut, Vector2 lhs, Vector2 rhs) + { + fixed (Vector2* ppOut = &pOut) + { + ImMaxNative((Vector2*)ppOut, lhs, rhs); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImClampNative(Vector2* pOut, Vector2 v, Vector2 mn, Vector2 mx) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[743])(pOut, v, mn, mx); + #else + ((delegate* unmanaged[Cdecl])funcTable[743])((nint)pOut, v, mn, mx); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImClamp(Vector2 v, Vector2 mn, Vector2 mx) + { + Vector2 ret; + ImClampNative(&ret, v, mn, mx); + return ret; + } + + /// + /// To be documented. + /// + public static void ImClamp(Vector2* pOut, Vector2 v, Vector2 mn, Vector2 mx) + { + ImClampNative(pOut, v, mn, mx); + } + + /// + /// To be documented. + /// + public static void ImClamp(ref Vector2 pOut, Vector2 v, Vector2 mn, Vector2 mx) + { + fixed (Vector2* ppOut = &pOut) + { + ImClampNative((Vector2*)ppOut, v, mn, mx); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImLerpNative(Vector2* pOut, Vector2 a, Vector2 b, float t) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[744])(pOut, a, b, t); + #else + ((delegate* unmanaged[Cdecl])funcTable[744])((nint)pOut, a, b, t); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImLerp(Vector2 a, Vector2 b, float t) + { + Vector2 ret; + ImLerpNative(&ret, a, b, t); + return ret; + } + + /// + /// To be documented. + /// + public static void ImLerp(Vector2* pOut, Vector2 a, Vector2 b, float t) + { + ImLerpNative(pOut, a, b, t); + } + + /// + /// To be documented. + /// + public static void ImLerp(ref Vector2 pOut, Vector2 a, Vector2 b, float t) + { + fixed (Vector2* ppOut = &pOut) + { + ImLerpNative((Vector2*)ppOut, a, b, t); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImLerpNative(Vector2* pOut, Vector2 a, Vector2 b, Vector2 t) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[745])(pOut, a, b, t); + #else + ((delegate* unmanaged[Cdecl])funcTable[745])((nint)pOut, a, b, t); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImLerp(Vector2 a, Vector2 b, Vector2 t) + { + Vector2 ret; + ImLerpNative(&ret, a, b, t); + return ret; + } + + /// + /// To be documented. + /// + public static void ImLerp(Vector2* pOut, Vector2 a, Vector2 b, Vector2 t) + { + ImLerpNative(pOut, a, b, t); + } + + /// + /// To be documented. + /// + public static void ImLerp(ref Vector2 pOut, Vector2 a, Vector2 b, Vector2 t) + { + fixed (Vector2* ppOut = &pOut) + { + ImLerpNative((Vector2*)ppOut, a, b, t); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImLerpNative(Vector4* pOut, Vector4 a, Vector4 b, float t) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[746])(pOut, a, b, t); + #else + ((delegate* unmanaged[Cdecl])funcTable[746])((nint)pOut, a, b, t); + #endif + } + + /// + /// To be documented. + /// + public static Vector4 ImLerp(Vector4 a, Vector4 b, float t) + { + Vector4 ret; + ImLerpNative(&ret, a, b, t); + return ret; + } + + /// + /// To be documented. + /// + public static void ImLerp(Vector4* pOut, Vector4 a, Vector4 b, float t) + { + ImLerpNative(pOut, a, b, t); + } + + /// + /// To be documented. + /// + public static void ImLerp(ref Vector4 pOut, Vector4 a, Vector4 b, float t) + { + fixed (Vector4* ppOut = &pOut) + { + ImLerpNative((Vector4*)ppOut, a, b, t); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImSaturateNative(float f) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[747])(f); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[747])(f); + #endif + } + + /// + /// To be documented. + /// + public static float ImSaturate(float f) + { + float ret = ImSaturateNative(f); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImLengthSqrNative(Vector2 lhs) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[748])(lhs); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[748])(lhs); + #endif + } + + /// + /// To be documented. + /// + public static float ImLengthSqr(Vector2 lhs) + { + float ret = ImLengthSqrNative(lhs); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImLengthSqrNative(Vector4 lhs) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[749])(lhs); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[749])(lhs); + #endif + } + + /// + /// To be documented. + /// + public static float ImLengthSqr(Vector4 lhs) + { + float ret = ImLengthSqrNative(lhs); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImInvLengthNative(Vector2 lhs, float failValue) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[750])(lhs, failValue); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[750])(lhs, failValue); + #endif + } + + /// + /// To be documented. + /// + public static float ImInvLength(Vector2 lhs, float failValue) + { + float ret = ImInvLengthNative(lhs, failValue); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImFloorNative(float f) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[751])(f); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[751])(f); + #endif + } + + /// + /// To be documented. + /// + public static float ImFloor(float f) + { + float ret = ImFloorNative(f); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImFloorSignedNative(float f) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[752])(f); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[752])(f); + #endif + } + + /// + /// To be documented. + /// + public static float ImFloorSigned(float f) + { + float ret = ImFloorSignedNative(f); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImFloorNative(Vector2* pOut, Vector2 v) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[753])(pOut, v); + #else + ((delegate* unmanaged[Cdecl])funcTable[753])((nint)pOut, v); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImFloor(Vector2 v) + { + Vector2 ret; + ImFloorNative(&ret, v); + return ret; + } + + /// + /// To be documented. + /// + public static void ImFloor(Vector2* pOut, Vector2 v) + { + ImFloorNative(pOut, v); + } + + /// + /// To be documented. + /// + public static void ImFloor(ref Vector2 pOut, Vector2 v) + { + fixed (Vector2* ppOut = &pOut) + { + ImFloorNative((Vector2*)ppOut, v); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImFloorSignedNative(Vector2* pOut, Vector2 v) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[754])(pOut, v); + #else + ((delegate* unmanaged[Cdecl])funcTable[754])((nint)pOut, v); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImFloorSigned(Vector2 v) + { + Vector2 ret; + ImFloorSignedNative(&ret, v); + return ret; + } + + /// + /// To be documented. + /// + public static void ImFloorSigned(Vector2* pOut, Vector2 v) + { + ImFloorSignedNative(pOut, v); + } + + /// + /// To be documented. + /// + public static void ImFloorSigned(ref Vector2 pOut, Vector2 v) + { + fixed (Vector2* ppOut = &pOut) + { + ImFloorSignedNative((Vector2*)ppOut, v); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImModPositiveNative(int a, int b) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[755])(a, b); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[755])(a, b); + #endif + } + + /// + /// To be documented. + /// + public static int ImModPositive(int a, int b) + { + int ret = ImModPositiveNative(a, b); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImDotNative(Vector2 a, Vector2 b) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[756])(a, b); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[756])(a, b); + #endif + } + + /// + /// To be documented. + /// + public static float ImDot(Vector2 a, Vector2 b) + { + float ret = ImDotNative(a, b); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImRotateNative(Vector2* pOut, Vector2 v, float cosA, float sinA) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[757])(pOut, v, cosA, sinA); + #else + ((delegate* unmanaged[Cdecl])funcTable[757])((nint)pOut, v, cosA, sinA); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImRotate(Vector2 v, float cosA, float sinA) + { + Vector2 ret; + ImRotateNative(&ret, v, cosA, sinA); + return ret; + } + + /// + /// To be documented. + /// + public static void ImRotate(Vector2* pOut, Vector2 v, float cosA, float sinA) + { + ImRotateNative(pOut, v, cosA, sinA); + } + + /// + /// To be documented. + /// + public static void ImRotate(ref Vector2 pOut, Vector2 v, float cosA, float sinA) + { + fixed (Vector2* ppOut = &pOut) + { + ImRotateNative((Vector2*)ppOut, v, cosA, sinA); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImLinearSweepNative(float current, float target, float speed) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[758])(current, target, speed); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[758])(current, target, speed); + #endif + } + + /// + /// To be documented. + /// + public static float ImLinearSweep(float current, float target, float speed) + { + float ret = ImLinearSweepNative(current, target, speed); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImMulNative(Vector2* pOut, Vector2 lhs, Vector2 rhs) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[759])(pOut, lhs, rhs); + #else + ((delegate* unmanaged[Cdecl])funcTable[759])((nint)pOut, lhs, rhs); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImMul(Vector2 lhs, Vector2 rhs) + { + Vector2 ret; + ImMulNative(&ret, lhs, rhs); + return ret; + } + + /// + /// To be documented. + /// + public static void ImMul(Vector2* pOut, Vector2 lhs, Vector2 rhs) + { + ImMulNative(pOut, lhs, rhs); + } + + /// + /// To be documented. + /// + public static void ImMul(ref Vector2 pOut, Vector2 lhs, Vector2 rhs) + { + fixed (Vector2* ppOut = &pOut) + { + ImMulNative((Vector2*)ppOut, lhs, rhs); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ImIsFloatAboveGuaranteedIntegerPrecisionNative(float f) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[760])(f); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[760])(f); + #endif + } + + /// + /// To be documented. + /// + public static bool ImIsFloatAboveGuaranteedIntegerPrecision(float f) + { + byte ret = ImIsFloatAboveGuaranteedIntegerPrecisionNative(f); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImBezierCubicCalcNative(Vector2* pOut, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[761])(pOut, p1, p2, p3, p4, t); + #else + ((delegate* unmanaged[Cdecl])funcTable[761])((nint)pOut, p1, p2, p3, p4, t); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImBezierCubicCalc(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t) + { + Vector2 ret; + ImBezierCubicCalcNative(&ret, p1, p2, p3, p4, t); + return ret; + } + + /// + /// To be documented. + /// + public static void ImBezierCubicCalc(Vector2* pOut, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t) + { + ImBezierCubicCalcNative(pOut, p1, p2, p3, p4, t); + } + + /// + /// To be documented. + /// + public static void ImBezierCubicCalc(ref Vector2 pOut, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t) + { + fixed (Vector2* ppOut = &pOut) + { + ImBezierCubicCalcNative((Vector2*)ppOut, p1, p2, p3, p4, t); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImBezierCubicClosestPointNative(Vector2* pOut, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p, int numSegments) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[762])(pOut, p1, p2, p3, p4, p, numSegments); + #else + ((delegate* unmanaged[Cdecl])funcTable[762])((nint)pOut, p1, p2, p3, p4, p, numSegments); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImBezierCubicClosestPoint(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p, int numSegments) + { + Vector2 ret; + ImBezierCubicClosestPointNative(&ret, p1, p2, p3, p4, p, numSegments); + return ret; + } + + /// + /// To be documented. + /// + public static void ImBezierCubicClosestPoint(Vector2* pOut, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p, int numSegments) + { + ImBezierCubicClosestPointNative(pOut, p1, p2, p3, p4, p, numSegments); + } + + /// + /// To be documented. + /// + public static void ImBezierCubicClosestPoint(ref Vector2 pOut, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p, int numSegments) + { + fixed (Vector2* ppOut = &pOut) + { + ImBezierCubicClosestPointNative((Vector2*)ppOut, p1, p2, p3, p4, p, numSegments); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImBezierCubicClosestPointCasteljauNative(Vector2* pOut, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p, float tessTol) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[763])(pOut, p1, p2, p3, p4, p, tessTol); + #else + ((delegate* unmanaged[Cdecl])funcTable[763])((nint)pOut, p1, p2, p3, p4, p, tessTol); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImBezierCubicClosestPointCasteljau(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p, float tessTol) + { + Vector2 ret; + ImBezierCubicClosestPointCasteljauNative(&ret, p1, p2, p3, p4, p, tessTol); + return ret; + } + + /// + /// To be documented. + /// + public static void ImBezierCubicClosestPointCasteljau(Vector2* pOut, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p, float tessTol) + { + ImBezierCubicClosestPointCasteljauNative(pOut, p1, p2, p3, p4, p, tessTol); + } + + /// + /// To be documented. + /// + public static void ImBezierCubicClosestPointCasteljau(ref Vector2 pOut, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p, float tessTol) + { + fixed (Vector2* ppOut = &pOut) + { + ImBezierCubicClosestPointCasteljauNative((Vector2*)ppOut, p1, p2, p3, p4, p, tessTol); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImBezierQuadraticCalcNative(Vector2* pOut, Vector2 p1, Vector2 p2, Vector2 p3, float t) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[764])(pOut, p1, p2, p3, t); + #else + ((delegate* unmanaged[Cdecl])funcTable[764])((nint)pOut, p1, p2, p3, t); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImBezierQuadraticCalc(Vector2 p1, Vector2 p2, Vector2 p3, float t) + { + Vector2 ret; + ImBezierQuadraticCalcNative(&ret, p1, p2, p3, t); + return ret; + } + + /// + /// To be documented. + /// + public static void ImBezierQuadraticCalc(Vector2* pOut, Vector2 p1, Vector2 p2, Vector2 p3, float t) + { + ImBezierQuadraticCalcNative(pOut, p1, p2, p3, t); + } + + /// + /// To be documented. + /// + public static void ImBezierQuadraticCalc(ref Vector2 pOut, Vector2 p1, Vector2 p2, Vector2 p3, float t) + { + fixed (Vector2* ppOut = &pOut) + { + ImBezierQuadraticCalcNative((Vector2*)ppOut, p1, p2, p3, t); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImLineClosestPointNative(Vector2* pOut, Vector2 a, Vector2 b, Vector2 p) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[765])(pOut, a, b, p); + #else + ((delegate* unmanaged[Cdecl])funcTable[765])((nint)pOut, a, b, p); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImLineClosestPoint(Vector2 a, Vector2 b, Vector2 p) + { + Vector2 ret; + ImLineClosestPointNative(&ret, a, b, p); + return ret; + } + + /// + /// To be documented. + /// + public static void ImLineClosestPoint(Vector2* pOut, Vector2 a, Vector2 b, Vector2 p) + { + ImLineClosestPointNative(pOut, a, b, p); + } + + /// + /// To be documented. + /// + public static void ImLineClosestPoint(ref Vector2 pOut, Vector2 a, Vector2 b, Vector2 p) + { + fixed (Vector2* ppOut = &pOut) + { + ImLineClosestPointNative((Vector2*)ppOut, a, b, p); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ImTriangleContainsPointNative(Vector2 a, Vector2 b, Vector2 c, Vector2 p) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[766])(a, b, c, p); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[766])(a, b, c, p); + #endif + } + + /// + /// To be documented. + /// + public static bool ImTriangleContainsPoint(Vector2 a, Vector2 b, Vector2 c, Vector2 p) + { + byte ret = ImTriangleContainsPointNative(a, b, c, p); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImTriangleClosestPointNative(Vector2* pOut, Vector2 a, Vector2 b, Vector2 c, Vector2 p) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[767])(pOut, a, b, c, p); + #else + ((delegate* unmanaged[Cdecl])funcTable[767])((nint)pOut, a, b, c, p); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ImTriangleClosestPoint(Vector2 a, Vector2 b, Vector2 c, Vector2 p) + { + Vector2 ret; + ImTriangleClosestPointNative(&ret, a, b, c, p); + return ret; + } + + /// + /// To be documented. + /// + public static void ImTriangleClosestPoint(Vector2* pOut, Vector2 a, Vector2 b, Vector2 c, Vector2 p) + { + ImTriangleClosestPointNative(pOut, a, b, c, p); + } + + /// + /// To be documented. + /// + public static void ImTriangleClosestPoint(ref Vector2 pOut, Vector2 a, Vector2 b, Vector2 c, Vector2 p) + { + fixed (Vector2* ppOut = &pOut) + { + ImTriangleClosestPointNative((Vector2*)ppOut, a, b, c, p); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImTriangleBarycentricCoordsNative(Vector2 a, Vector2 b, Vector2 c, Vector2 p, float* outU, float* outV, float* outW) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[768])(a, b, c, p, outU, outV, outW); + #else + ((delegate* unmanaged[Cdecl])funcTable[768])(a, b, c, p, (nint)outU, (nint)outV, (nint)outW); + #endif + } + + /// + /// To be documented. + /// + public static void ImTriangleBarycentricCoords(Vector2 a, Vector2 b, Vector2 c, Vector2 p, float* outU, float* outV, float* outW) + { + ImTriangleBarycentricCoordsNative(a, b, c, p, outU, outV, outW); + } + + /// + /// To be documented. + /// + public static void ImTriangleBarycentricCoords(Vector2 a, Vector2 b, Vector2 c, Vector2 p, ref float outU, float* outV, float* outW) + { + fixed (float* poutU = &outU) + { + ImTriangleBarycentricCoordsNative(a, b, c, p, (float*)poutU, outV, outW); + } + } + + /// + /// To be documented. + /// + public static void ImTriangleBarycentricCoords(Vector2 a, Vector2 b, Vector2 c, Vector2 p, float* outU, ref float outV, float* outW) + { + fixed (float* poutV = &outV) + { + ImTriangleBarycentricCoordsNative(a, b, c, p, outU, (float*)poutV, outW); + } + } + + /// + /// To be documented. + /// + public static void ImTriangleBarycentricCoords(Vector2 a, Vector2 b, Vector2 c, Vector2 p, ref float outU, ref float outV, float* outW) + { + fixed (float* poutU = &outU) + { + fixed (float* poutV = &outV) + { + ImTriangleBarycentricCoordsNative(a, b, c, p, (float*)poutU, (float*)poutV, outW); + } + } + } + + /// + /// To be documented. + /// + public static void ImTriangleBarycentricCoords(Vector2 a, Vector2 b, Vector2 c, Vector2 p, float* outU, float* outV, ref float outW) + { + fixed (float* poutW = &outW) + { + ImTriangleBarycentricCoordsNative(a, b, c, p, outU, outV, (float*)poutW); + } + } + + /// + /// To be documented. + /// + public static void ImTriangleBarycentricCoords(Vector2 a, Vector2 b, Vector2 c, Vector2 p, ref float outU, float* outV, ref float outW) + { + fixed (float* poutU = &outU) + { + fixed (float* poutW = &outW) + { + ImTriangleBarycentricCoordsNative(a, b, c, p, (float*)poutU, outV, (float*)poutW); + } + } + } + + /// + /// To be documented. + /// + public static void ImTriangleBarycentricCoords(Vector2 a, Vector2 b, Vector2 c, Vector2 p, float* outU, ref float outV, ref float outW) + { + fixed (float* poutV = &outV) + { + fixed (float* poutW = &outW) + { + ImTriangleBarycentricCoordsNative(a, b, c, p, outU, (float*)poutV, (float*)poutW); + } + } + } + + /// + /// To be documented. + /// + public static void ImTriangleBarycentricCoords(Vector2 a, Vector2 b, Vector2 c, Vector2 p, ref float outU, ref float outV, ref float outW) + { + fixed (float* poutU = &outU) + { + fixed (float* poutV = &outV) + { + fixed (float* poutW = &outW) + { + ImTriangleBarycentricCoordsNative(a, b, c, p, (float*)poutU, (float*)poutV, (float*)poutW); + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float ImTriangleAreaNative(Vector2 a, Vector2 b, Vector2 c) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[769])(a, b, c); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[769])(a, b, c); + #endif + } + + /// + /// To be documented. + /// + public static float ImTriangleArea(Vector2 a, Vector2 b, Vector2 c) + { + float ret = ImTriangleAreaNative(a, b, c); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiDir ImGetDirQuadrantFromDeltaNative(float dx, float dy) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[770])(dx, dy); + #else + return (ImGuiDir)((delegate* unmanaged[Cdecl])funcTable[770])(dx, dy); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiDir ImGetDirQuadrantFromDelta(float dx, float dy) + { + ImGuiDir ret = ImGetDirQuadrantFromDeltaNative(dx, dy); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImVec1* ImVec1Native() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[771])(); + #else + return (ImVec1*)((delegate* unmanaged[Cdecl])funcTable[771])(); + #endif + } + + /// + /// To be documented. + /// + public static ImVec1Ptr ImVec1() + { + ImVec1Ptr ret = ImVec1Native(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImVec1* ImVec1Native(float x) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[772])(x); + #else + return (ImVec1*)((delegate* unmanaged[Cdecl])funcTable[772])(x); + #endif + } + + /// + /// To be documented. + /// + public static ImVec1Ptr ImVec1(float x) + { + ImVec1Ptr ret = ImVec1Native(x); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImVec2Ih* ImVec2ihNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[773])(); + #else + return (ImVec2Ih*)((delegate* unmanaged[Cdecl])funcTable[773])(); + #endif + } + + /// + /// To be documented. + /// + public static ImVec2IhPtr ImVec2ih() + { + ImVec2IhPtr ret = ImVec2ihNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImVec2Ih* ImVec2ihNative(short x, short y) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[774])(x, y); + #else + return (ImVec2Ih*)((delegate* unmanaged[Cdecl])funcTable[774])(x, y); + #endif + } + + /// + /// To be documented. + /// + public static ImVec2IhPtr ImVec2ih(short x, short y) + { + ImVec2IhPtr ret = ImVec2ihNative(x, y); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImVec2Ih* ImVec2ihNative(Vector2 rhs) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[775])(rhs); + #else + return (ImVec2Ih*)((delegate* unmanaged[Cdecl])funcTable[775])(rhs); + #endif + } + + /// + /// To be documented. + /// + public static ImVec2IhPtr ImVec2ih(Vector2 rhs) + { + ImVec2IhPtr ret = ImVec2ihNative(rhs); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImRect* ImRectNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[776])(); + #else + return (ImRect*)((delegate* unmanaged[Cdecl])funcTable[776])(); + #endif + } + + /// + /// To be documented. + /// + public static ImRectPtr ImRect() + { + ImRectPtr ret = ImRectNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImRect* ImRectNative(Vector2 min, Vector2 max) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[777])(min, max); + #else + return (ImRect*)((delegate* unmanaged[Cdecl])funcTable[777])(min, max); + #endif + } + + /// + /// To be documented. + /// + public static ImRectPtr ImRect(Vector2 min, Vector2 max) + { + ImRectPtr ret = ImRectNative(min, max); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImRect* ImRectNative(Vector4 v) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[778])(v); + #else + return (ImRect*)((delegate* unmanaged[Cdecl])funcTable[778])(v); + #endif + } + + /// + /// To be documented. + /// + public static ImRectPtr ImRect(Vector4 v) + { + ImRectPtr ret = ImRectNative(v); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImRect* ImRectNative(float x1, float y1, float x2, float y2) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[779])(x1, y1, x2, y2); + #else + return (ImRect*)((delegate* unmanaged[Cdecl])funcTable[779])(x1, y1, x2, y2); + #endif + } + + /// + /// To be documented. + /// + public static ImRectPtr ImRect(float x1, float y1, float x2, float y2) + { + ImRectPtr ret = ImRectNative(x1, y1, x2, y2); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetCenterNative(Vector2* pOut, ImRect* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[780])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[780])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 GetCenter(ImRectPtr self) + { + Vector2 ret; + GetCenterNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void GetCenter(Vector2* pOut, ImRectPtr self) + { + GetCenterNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void GetCenter(ref Vector2 pOut, ImRectPtr self) + { + fixed (Vector2* ppOut = &pOut) + { + GetCenterNative((Vector2*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static Vector2 GetCenter(ref ImRect self) + { + fixed (ImRect* pself = &self) + { + Vector2 ret; + GetCenterNative(&ret, (ImRect*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void GetCenter(Vector2* pOut, ref ImRect self) + { + fixed (ImRect* pself = &self) + { + GetCenterNative(pOut, (ImRect*)pself); + } + } + + /// + /// To be documented. + /// + public static void GetCenter(ref Vector2 pOut, ref ImRect self) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (ImRect* pself = &self) + { + GetCenterNative((Vector2*)ppOut, (ImRect*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetSizeNative(Vector2* pOut, ImRect* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[781])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[781])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 GetSize(ImRectPtr self) + { + Vector2 ret; + GetSizeNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void GetSize(Vector2* pOut, ImRectPtr self) + { + GetSizeNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void GetSize(ref Vector2 pOut, ImRectPtr self) + { + fixed (Vector2* ppOut = &pOut) + { + GetSizeNative((Vector2*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static Vector2 GetSize(ref ImRect self) + { + fixed (ImRect* pself = &self) + { + Vector2 ret; + GetSizeNative(&ret, (ImRect*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void GetSize(Vector2* pOut, ref ImRect self) + { + fixed (ImRect* pself = &self) + { + GetSizeNative(pOut, (ImRect*)pself); + } + } + + /// + /// To be documented. + /// + public static void GetSize(ref Vector2 pOut, ref ImRect self) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (ImRect* pself = &self) + { + GetSizeNative((Vector2*)ppOut, (ImRect*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float GetWidthNative(ImRect* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[782])(self); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[782])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static float GetWidth(ImRectPtr self) + { + float ret = GetWidthNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static float GetWidth(ref ImRect self) + { + fixed (ImRect* pself = &self) + { + float ret = GetWidthNative((ImRect*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float GetHeightNative(ImRect* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[783])(self); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[783])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static float GetHeight(ImRectPtr self) + { + float ret = GetHeightNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static float GetHeight(ref ImRect self) + { + fixed (ImRect* pself = &self) + { + float ret = GetHeightNative((ImRect*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float GetAreaNative(ImRect* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[784])(self); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[784])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static float GetArea(ImRectPtr self) + { + float ret = GetAreaNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static float GetArea(ref ImRect self) + { + fixed (ImRect* pself = &self) + { + float ret = GetAreaNative((ImRect*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetTLNative(Vector2* pOut, ImRect* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[785])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[785])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 GetTL(ImRectPtr self) + { + Vector2 ret; + GetTLNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void GetTL(Vector2* pOut, ImRectPtr self) + { + GetTLNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void GetTL(ref Vector2 pOut, ImRectPtr self) + { + fixed (Vector2* ppOut = &pOut) + { + GetTLNative((Vector2*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static Vector2 GetTL(ref ImRect self) + { + fixed (ImRect* pself = &self) + { + Vector2 ret; + GetTLNative(&ret, (ImRect*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void GetTL(Vector2* pOut, ref ImRect self) + { + fixed (ImRect* pself = &self) + { + GetTLNative(pOut, (ImRect*)pself); + } + } + + /// + /// To be documented. + /// + public static void GetTL(ref Vector2 pOut, ref ImRect self) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (ImRect* pself = &self) + { + GetTLNative((Vector2*)ppOut, (ImRect*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetTRNative(Vector2* pOut, ImRect* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[786])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[786])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 GetTR(ImRectPtr self) + { + Vector2 ret; + GetTRNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void GetTR(Vector2* pOut, ImRectPtr self) + { + GetTRNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void GetTR(ref Vector2 pOut, ImRectPtr self) + { + fixed (Vector2* ppOut = &pOut) + { + GetTRNative((Vector2*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static Vector2 GetTR(ref ImRect self) + { + fixed (ImRect* pself = &self) + { + Vector2 ret; + GetTRNative(&ret, (ImRect*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void GetTR(Vector2* pOut, ref ImRect self) + { + fixed (ImRect* pself = &self) + { + GetTRNative(pOut, (ImRect*)pself); + } + } + + /// + /// To be documented. + /// + public static void GetTR(ref Vector2 pOut, ref ImRect self) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (ImRect* pself = &self) + { + GetTRNative((Vector2*)ppOut, (ImRect*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetBLNative(Vector2* pOut, ImRect* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[787])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[787])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 GetBL(ImRectPtr self) + { + Vector2 ret; + GetBLNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void GetBL(Vector2* pOut, ImRectPtr self) + { + GetBLNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void GetBL(ref Vector2 pOut, ImRectPtr self) + { + fixed (Vector2* ppOut = &pOut) + { + GetBLNative((Vector2*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static Vector2 GetBL(ref ImRect self) + { + fixed (ImRect* pself = &self) + { + Vector2 ret; + GetBLNative(&ret, (ImRect*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void GetBL(Vector2* pOut, ref ImRect self) + { + fixed (ImRect* pself = &self) + { + GetBLNative(pOut, (ImRect*)pself); + } + } + + /// + /// To be documented. + /// + public static void GetBL(ref Vector2 pOut, ref ImRect self) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (ImRect* pself = &self) + { + GetBLNative((Vector2*)ppOut, (ImRect*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetBRNative(Vector2* pOut, ImRect* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[788])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[788])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 GetBR(ImRectPtr self) + { + Vector2 ret; + GetBRNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void GetBR(Vector2* pOut, ImRectPtr self) + { + GetBRNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void GetBR(ref Vector2 pOut, ImRectPtr self) + { + fixed (Vector2* ppOut = &pOut) + { + GetBRNative((Vector2*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static Vector2 GetBR(ref ImRect self) + { + fixed (ImRect* pself = &self) + { + Vector2 ret; + GetBRNative(&ret, (ImRect*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void GetBR(Vector2* pOut, ref ImRect self) + { + fixed (ImRect* pself = &self) + { + GetBRNative(pOut, (ImRect*)pself); + } + } + + /// + /// To be documented. + /// + public static void GetBR(ref Vector2 pOut, ref ImRect self) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (ImRect* pself = &self) + { + GetBRNative((Vector2*)ppOut, (ImRect*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ContainsNative(ImRect* self, Vector2 p) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[789])(self, p); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[789])((nint)self, p); + #endif + } + + /// + /// To be documented. + /// + public static bool Contains(ImRectPtr self, Vector2 p) + { + byte ret = ContainsNative(self, p); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool Contains(ref ImRect self, Vector2 p) + { + fixed (ImRect* pself = &self) + { + byte ret = ContainsNative((ImRect*)pself, p); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ContainsNative(ImRect* self, ImRect r) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[790])(self, r); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[790])((nint)self, r); + #endif + } + + /// + /// To be documented. + /// + public static bool Contains(ImRectPtr self, ImRect r) + { + byte ret = ContainsNative(self, r); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool Contains(ref ImRect self, ImRect r) + { + fixed (ImRect* pself = &self) + { + byte ret = ContainsNative((ImRect*)pself, r); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte OverlapsNative(ImRect* self, ImRect r) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[791])(self, r); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[791])((nint)self, r); + #endif + } + + /// + /// To be documented. + /// + public static bool Overlaps(ImRectPtr self, ImRect r) + { + byte ret = OverlapsNative(self, r); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool Overlaps(ref ImRect self, ImRect r) + { + fixed (ImRect* pself = &self) + { + byte ret = OverlapsNative((ImRect*)pself, r); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void AddNative(ImRect* self, Vector2 p) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[792])(self, p); + #else + ((delegate* unmanaged[Cdecl])funcTable[792])((nint)self, p); + #endif + } + + /// + /// To be documented. + /// + public static void Add(ImRectPtr self, Vector2 p) + { + AddNative(self, p); + } + + /// + /// To be documented. + /// + public static void Add(ref ImRect self, Vector2 p) + { + fixed (ImRect* pself = &self) + { + AddNative((ImRect*)pself, p); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void AddNative(ImRect* self, ImRect r) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[793])(self, r); + #else + ((delegate* unmanaged[Cdecl])funcTable[793])((nint)self, r); + #endif + } + + /// + /// To be documented. + /// + public static void Add(ImRectPtr self, ImRect r) + { + AddNative(self, r); + } + + /// + /// To be documented. + /// + public static void Add(ref ImRect self, ImRect r) + { + fixed (ImRect* pself = &self) + { + AddNative((ImRect*)pself, r); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ExpandNative(ImRect* self, float amount) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[794])(self, amount); + #else + ((delegate* unmanaged[Cdecl])funcTable[794])((nint)self, amount); + #endif + } + + /// + /// To be documented. + /// + public static void Expand(ImRectPtr self, float amount) + { + ExpandNative(self, amount); + } + + /// + /// To be documented. + /// + public static void Expand(ref ImRect self, float amount) + { + fixed (ImRect* pself = &self) + { + ExpandNative((ImRect*)pself, amount); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ExpandNative(ImRect* self, Vector2 amount) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[795])(self, amount); + #else + ((delegate* unmanaged[Cdecl])funcTable[795])((nint)self, amount); + #endif + } + + /// + /// To be documented. + /// + public static void Expand(ImRectPtr self, Vector2 amount) + { + ExpandNative(self, amount); + } + + /// + /// To be documented. + /// + public static void Expand(ref ImRect self, Vector2 amount) + { + fixed (ImRect* pself = &self) + { + ExpandNative((ImRect*)pself, amount); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TranslateNative(ImRect* self, Vector2 d) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[796])(self, d); + #else + ((delegate* unmanaged[Cdecl])funcTable[796])((nint)self, d); + #endif + } + + /// + /// To be documented. + /// + public static void Translate(ImRectPtr self, Vector2 d) + { + TranslateNative(self, d); + } + + /// + /// To be documented. + /// + public static void Translate(ref ImRect self, Vector2 d) + { + fixed (ImRect* pself = &self) + { + TranslateNative((ImRect*)pself, d); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TranslateXNative(ImRect* self, float dx) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[797])(self, dx); + #else + ((delegate* unmanaged[Cdecl])funcTable[797])((nint)self, dx); + #endif + } + + /// + /// To be documented. + /// + public static void TranslateX(ImRectPtr self, float dx) + { + TranslateXNative(self, dx); + } + + /// + /// To be documented. + /// + public static void TranslateX(ref ImRect self, float dx) + { + fixed (ImRect* pself = &self) + { + TranslateXNative((ImRect*)pself, dx); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TranslateYNative(ImRect* self, float dy) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[798])(self, dy); + #else + ((delegate* unmanaged[Cdecl])funcTable[798])((nint)self, dy); + #endif + } + + /// + /// To be documented. + /// + public static void TranslateY(ImRectPtr self, float dy) + { + TranslateYNative(self, dy); + } + + /// + /// To be documented. + /// + public static void TranslateY(ref ImRect self, float dy) + { + fixed (ImRect* pself = &self) + { + TranslateYNative((ImRect*)pself, dy); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClipWithNative(ImRect* self, ImRect r) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[799])(self, r); + #else + ((delegate* unmanaged[Cdecl])funcTable[799])((nint)self, r); + #endif + } + + /// + /// To be documented. + /// + public static void ClipWith(ImRectPtr self, ImRect r) + { + ClipWithNative(self, r); + } + + /// + /// To be documented. + /// + public static void ClipWith(ref ImRect self, ImRect r) + { + fixed (ImRect* pself = &self) + { + ClipWithNative((ImRect*)pself, r); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClipWithFullNative(ImRect* self, ImRect r) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[800])(self, r); + #else + ((delegate* unmanaged[Cdecl])funcTable[800])((nint)self, r); + #endif + } + + /// + /// To be documented. + /// + public static void ClipWithFull(ImRectPtr self, ImRect r) + { + ClipWithFullNative(self, r); + } + + /// + /// To be documented. + /// + public static void ClipWithFull(ref ImRect self, ImRect r) + { + fixed (ImRect* pself = &self) + { + ClipWithFullNative((ImRect*)pself, r); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void FloorNative(ImRect* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[801])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[801])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void Floor(ImRectPtr self) + { + FloorNative(self); + } + + /// + /// To be documented. + /// + public static void Floor(ref ImRect self) + { + fixed (ImRect* pself = &self) + { + FloorNative((ImRect*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsInvertedNative(ImRect* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[802])(self); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[802])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static bool IsInverted(ImRectPtr self) + { + byte ret = IsInvertedNative(self); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsInverted(ref ImRect self) + { + fixed (ImRect* pself = &self) + { + byte ret = IsInvertedNative((ImRect*)pself); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ToVec4Native(Vector4* pOut, ImRect* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[803])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[803])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static Vector4 ToVec4(ImRectPtr self) + { + Vector4 ret; + ToVec4Native(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void ToVec4(Vector4* pOut, ImRectPtr self) + { + ToVec4Native(pOut, self); + } + + /// + /// To be documented. + /// + public static void ToVec4(ref Vector4 pOut, ImRectPtr self) + { + fixed (Vector4* ppOut = &pOut) + { + ToVec4Native((Vector4*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static Vector4 ToVec4(ref ImRect self) + { + fixed (ImRect* pself = &self) + { + Vector4 ret; + ToVec4Native(&ret, (ImRect*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void ToVec4(Vector4* pOut, ref ImRect self) + { + fixed (ImRect* pself = &self) + { + ToVec4Native(pOut, (ImRect*)pself); + } + } + + /// + /// To be documented. + /// + public static void ToVec4(ref Vector4 pOut, ref ImRect self) + { + fixed (Vector4* ppOut = &pOut) + { + fixed (ImRect* pself = &self) + { + ToVec4Native((Vector4*)ppOut, (ImRect*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ImBitArrayTestBitNative(uint* arr, int n) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[804])(arr, n); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[804])((nint)arr, n); + #endif + } + + /// + /// To be documented. + /// + public static bool ImBitArrayTestBit(uint* arr, int n) + { + byte ret = ImBitArrayTestBitNative(arr, n); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ImBitArrayTestBit(ref uint arr, int n) + { + fixed (uint* parr = &arr) + { + byte ret = ImBitArrayTestBitNative((uint*)parr, n); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImBitArrayClearBitNative(uint* arr, int n) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[805])(arr, n); + #else + ((delegate* unmanaged[Cdecl])funcTable[805])((nint)arr, n); + #endif + } + + /// + /// To be documented. + /// + public static void ImBitArrayClearBit(uint* arr, int n) + { + ImBitArrayClearBitNative(arr, n); + } + + /// + /// To be documented. + /// + public static void ImBitArrayClearBit(ref uint arr, int n) + { + fixed (uint* parr = &arr) + { + ImBitArrayClearBitNative((uint*)parr, n); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImBitArraySetBitNative(uint* arr, int n) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[806])(arr, n); + #else + ((delegate* unmanaged[Cdecl])funcTable[806])((nint)arr, n); + #endif + } + + /// + /// To be documented. + /// + public static void ImBitArraySetBit(uint* arr, int n) + { + ImBitArraySetBitNative(arr, n); + } + + /// + /// To be documented. + /// + public static void ImBitArraySetBit(ref uint arr, int n) + { + fixed (uint* parr = &arr) + { + ImBitArraySetBitNative((uint*)parr, n); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImBitArraySetBitRangeNative(uint* arr, int n, int n2) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[807])(arr, n, n2); + #else + ((delegate* unmanaged[Cdecl])funcTable[807])((nint)arr, n, n2); + #endif + } + + /// + /// To be documented. + /// + public static void ImBitArraySetBitRange(uint* arr, int n, int n2) + { + ImBitArraySetBitRangeNative(arr, n, n2); + } + + /// + /// To be documented. + /// + public static void ImBitArraySetBitRange(ref uint arr, int n, int n2) + { + fixed (uint* parr = &arr) + { + ImBitArraySetBitRangeNative((uint*)parr, n, n2); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void CreateNative(ImBitVector* self, int sz) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[808])(self, sz); + #else + ((delegate* unmanaged[Cdecl])funcTable[808])((nint)self, sz); + #endif + } + + /// + /// To be documented. + /// + public static void Create(ImBitVectorPtr self, int sz) + { + CreateNative(self, sz); + } + + /// + /// To be documented. + /// + public static void Create(ref ImBitVector self, int sz) + { + fixed (ImBitVector* pself = &self) + { + CreateNative((ImBitVector*)pself, sz); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearNative(ImBitVector* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[809])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[809])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void Clear(ImBitVectorPtr self) + { + ClearNative(self); + } + + /// + /// To be documented. + /// + public static void Clear(ref ImBitVector self) + { + fixed (ImBitVector* pself = &self) + { + ClearNative((ImBitVector*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte TestBitNative(ImBitVector* self, int n) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[810])(self, n); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[810])((nint)self, n); + #endif + } + + /// + /// To be documented. + /// + public static bool TestBit(ImBitVectorPtr self, int n) + { + byte ret = TestBitNative(self, n); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TestBit(ref ImBitVector self, int n) + { + fixed (ImBitVector* pself = &self) + { + byte ret = TestBitNative((ImBitVector*)pself, n); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetBitNative(ImBitVector* self, int n) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[811])(self, n); + #else + ((delegate* unmanaged[Cdecl])funcTable[811])((nint)self, n); + #endif + } + + /// + /// To be documented. + /// + public static void SetBit(ImBitVectorPtr self, int n) + { + SetBitNative(self, n); + } + + /// + /// To be documented. + /// + public static void SetBit(ref ImBitVector self, int n) + { + fixed (ImBitVector* pself = &self) + { + SetBitNative((ImBitVector*)pself, n); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearBitNative(ImBitVector* self, int n) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[812])(self, n); + #else + ((delegate* unmanaged[Cdecl])funcTable[812])((nint)self, n); + #endif + } + + /// + /// To be documented. + /// + public static void ClearBit(ImBitVectorPtr self, int n) + { + ClearBitNative(self, n); + } + + /// + /// To be documented. + /// + public static void ClearBit(ref ImBitVector self, int n) + { + fixed (ImBitVector* pself = &self) + { + ClearBitNative((ImBitVector*)pself, n); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImDrawListSharedData* ImDrawListSharedDataNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[813])(); + #else + return (ImDrawListSharedData*)((delegate* unmanaged[Cdecl])funcTable[813])(); + #endif + } + + /// + /// To be documented. + /// + public static ImDrawListSharedDataPtr ImDrawListSharedData() + { + ImDrawListSharedDataPtr ret = ImDrawListSharedDataNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetCircleTessellationMaxErrorNative(ImDrawListSharedData* self, float maxError) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[814])(self, maxError); + #else + ((delegate* unmanaged[Cdecl])funcTable[814])((nint)self, maxError); + #endif + } + + /// + /// To be documented. + /// + public static void SetCircleTessellationMaxError(ImDrawListSharedDataPtr self, float maxError) + { + SetCircleTessellationMaxErrorNative(self, maxError); + } + + /// + /// To be documented. + /// + public static void SetCircleTessellationMaxError(ref ImDrawListSharedData self, float maxError) + { + fixed (ImDrawListSharedData* pself = &self) + { + SetCircleTessellationMaxErrorNative((ImDrawListSharedData*)pself, maxError); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearNative(ImDrawDataBuilder* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[815])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[815])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void Clear(ImDrawDataBuilderPtr self) + { + ClearNative(self); + } + + /// + /// To be documented. + /// + public static void Clear(ref ImDrawDataBuilder self) + { + fixed (ImDrawDataBuilder* pself = &self) + { + ClearNative((ImDrawDataBuilder*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearFreeMemoryNative(ImDrawDataBuilder* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[816])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[816])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void ClearFreeMemory(ImDrawDataBuilderPtr self) + { + ClearFreeMemoryNative(self); + } + + /// + /// To be documented. + /// + public static void ClearFreeMemory(ref ImDrawDataBuilder self) + { + fixed (ImDrawDataBuilder* pself = &self) + { + ClearFreeMemoryNative((ImDrawDataBuilder*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int GetDrawListCountNative(ImDrawDataBuilder* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[817])(self); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[817])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static int GetDrawListCount(ImDrawDataBuilderPtr self) + { + int ret = GetDrawListCountNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static int GetDrawListCount(ref ImDrawDataBuilder self) + { + fixed (ImDrawDataBuilder* pself = &self) + { + int ret = GetDrawListCountNative((ImDrawDataBuilder*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void FlattenIntoSingleLayerNative(ImDrawDataBuilder* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[818])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[818])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void FlattenIntoSingleLayer(ImDrawDataBuilderPtr self) + { + FlattenIntoSingleLayerNative(self); + } + + /// + /// To be documented. + /// + public static void FlattenIntoSingleLayer(ref ImDrawDataBuilder self) + { + fixed (ImDrawDataBuilder* pself = &self) + { + FlattenIntoSingleLayerNative((ImDrawDataBuilder*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiStyleMod* ImGuiStyleModNative(ImGuiStyleVar idx, int v) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[819])(idx, v); + #else + return (ImGuiStyleMod*)((delegate* unmanaged[Cdecl])funcTable[819])(idx, v); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiStyleModPtr ImGuiStyleMod(ImGuiStyleVar idx, int v) + { + ImGuiStyleModPtr ret = ImGuiStyleModNative(idx, v); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiStyleMod* ImGuiStyleModNative(ImGuiStyleVar idx, float v) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[820])(idx, v); + #else + return (ImGuiStyleMod*)((delegate* unmanaged[Cdecl])funcTable[820])(idx, v); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiStyleModPtr ImGuiStyleMod(ImGuiStyleVar idx, float v) + { + ImGuiStyleModPtr ret = ImGuiStyleModNative(idx, v); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiStyleMod* ImGuiStyleModNative(ImGuiStyleVar idx, Vector2 v) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[821])(idx, v); + #else + return (ImGuiStyleMod*)((delegate* unmanaged[Cdecl])funcTable[821])(idx, v); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiStyleModPtr ImGuiStyleMod(ImGuiStyleVar idx, Vector2 v) + { + ImGuiStyleModPtr ret = ImGuiStyleModNative(idx, v); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiComboPreviewData* ImGuiComboPreviewDataNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[822])(); + #else + return (ImGuiComboPreviewData*)((delegate* unmanaged[Cdecl])funcTable[822])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiComboPreviewDataPtr ImGuiComboPreviewData() + { + ImGuiComboPreviewDataPtr ret = ImGuiComboPreviewDataNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiMenuColumns* ImGuiMenuColumnsNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[823])(); + #else + return (ImGuiMenuColumns*)((delegate* unmanaged[Cdecl])funcTable[823])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiMenuColumnsPtr ImGuiMenuColumns() + { + ImGuiMenuColumnsPtr ret = ImGuiMenuColumnsNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void UpdateNative(ImGuiMenuColumns* self, float spacing, byte windowReappearing) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[824])(self, spacing, windowReappearing); + #else + ((delegate* unmanaged[Cdecl])funcTable[824])((nint)self, spacing, windowReappearing); + #endif + } + + /// + /// To be documented. + /// + public static void Update(ImGuiMenuColumnsPtr self, float spacing, bool windowReappearing) + { + UpdateNative(self, spacing, windowReappearing ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void Update(ref ImGuiMenuColumns self, float spacing, bool windowReappearing) + { + fixed (ImGuiMenuColumns* pself = &self) + { + UpdateNative((ImGuiMenuColumns*)pself, spacing, windowReappearing ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float DeclColumnsNative(ImGuiMenuColumns* self, float wIcon, float wLabel, float wShortcut, float wMark) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[825])(self, wIcon, wLabel, wShortcut, wMark); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[825])((nint)self, wIcon, wLabel, wShortcut, wMark); + #endif + } + + /// + /// To be documented. + /// + public static float DeclColumns(ImGuiMenuColumnsPtr self, float wIcon, float wLabel, float wShortcut, float wMark) + { + float ret = DeclColumnsNative(self, wIcon, wLabel, wShortcut, wMark); + return ret; + } + + /// + /// To be documented. + /// + public static float DeclColumns(ref ImGuiMenuColumns self, float wIcon, float wLabel, float wShortcut, float wMark) + { + fixed (ImGuiMenuColumns* pself = &self) + { + float ret = DeclColumnsNative((ImGuiMenuColumns*)pself, wIcon, wLabel, wShortcut, wMark); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void CalcNextTotalWidthNative(ImGuiMenuColumns* self, byte updateOffsets) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[826])(self, updateOffsets); + #else + ((delegate* unmanaged[Cdecl])funcTable[826])((nint)self, updateOffsets); + #endif + } + + /// + /// To be documented. + /// + public static void CalcNextTotalWidth(ImGuiMenuColumnsPtr self, bool updateOffsets) + { + CalcNextTotalWidthNative(self, updateOffsets ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void CalcNextTotalWidth(ref ImGuiMenuColumns self, bool updateOffsets) + { + fixed (ImGuiMenuColumns* pself = &self) + { + CalcNextTotalWidthNative((ImGuiMenuColumns*)pself, updateOffsets ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiInputTextState* ImGuiInputTextStateNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[827])(); + #else + return (ImGuiInputTextState*)((delegate* unmanaged[Cdecl])funcTable[827])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiInputTextStatePtr ImGuiInputTextState() + { + ImGuiInputTextStatePtr ret = ImGuiInputTextStateNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearTextNative(ImGuiInputTextState* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[828])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[828])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void ClearText(ImGuiInputTextStatePtr self) + { + ClearTextNative(self); + } + + /// + /// To be documented. + /// + public static void ClearText(ref ImGuiInputTextState self) + { + fixed (ImGuiInputTextState* pself = &self) + { + ClearTextNative((ImGuiInputTextState*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearFreeMemoryNative(ImGuiInputTextState* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[829])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[829])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void ClearFreeMemory(ImGuiInputTextStatePtr self) + { + ClearFreeMemoryNative(self); + } + + /// + /// To be documented. + /// + public static void ClearFreeMemory(ref ImGuiInputTextState self) + { + fixed (ImGuiInputTextState* pself = &self) + { + ClearFreeMemoryNative((ImGuiInputTextState*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int GetUndoAvailCountNative(ImGuiInputTextState* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[830])(self); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[830])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static int GetUndoAvailCount(ImGuiInputTextStatePtr self) + { + int ret = GetUndoAvailCountNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static int GetUndoAvailCount(ref ImGuiInputTextState self) + { + fixed (ImGuiInputTextState* pself = &self) + { + int ret = GetUndoAvailCountNative((ImGuiInputTextState*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int GetRedoAvailCountNative(ImGuiInputTextState* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[831])(self); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[831])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static int GetRedoAvailCount(ImGuiInputTextStatePtr self) + { + int ret = GetRedoAvailCountNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static int GetRedoAvailCount(ref ImGuiInputTextState self) + { + fixed (ImGuiInputTextState* pself = &self) + { + int ret = GetRedoAvailCountNative((ImGuiInputTextState*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void OnKeyPressedNative(ImGuiInputTextState* self, int key) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[832])(self, key); + #else + ((delegate* unmanaged[Cdecl])funcTable[832])((nint)self, key); + #endif + } + + /// + /// To be documented. + /// + public static void OnKeyPressed(ImGuiInputTextStatePtr self, int key) + { + OnKeyPressedNative(self, key); + } + + /// + /// To be documented. + /// + public static void OnKeyPressed(ref ImGuiInputTextState self, int key) + { + fixed (ImGuiInputTextState* pself = &self) + { + OnKeyPressedNative((ImGuiInputTextState*)pself, key); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void CursorAnimResetNative(ImGuiInputTextState* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[833])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[833])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void CursorAnimReset(ImGuiInputTextStatePtr self) + { + CursorAnimResetNative(self); + } + + /// + /// To be documented. + /// + public static void CursorAnimReset(ref ImGuiInputTextState self) + { + fixed (ImGuiInputTextState* pself = &self) + { + CursorAnimResetNative((ImGuiInputTextState*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void CursorClampNative(ImGuiInputTextState* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[834])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[834])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void CursorClamp(ImGuiInputTextStatePtr self) + { + CursorClampNative(self); + } + + /// + /// To be documented. + /// + public static void CursorClamp(ref ImGuiInputTextState self) + { + fixed (ImGuiInputTextState* pself = &self) + { + CursorClampNative((ImGuiInputTextState*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte HasSelectionNative(ImGuiInputTextState* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[835])(self); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[835])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static bool HasSelection(ImGuiInputTextStatePtr self) + { + byte ret = HasSelectionNative(self); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool HasSelection(ref ImGuiInputTextState self) + { + fixed (ImGuiInputTextState* pself = &self) + { + byte ret = HasSelectionNative((ImGuiInputTextState*)pself); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearSelectionNative(ImGuiInputTextState* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[836])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[836])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void ClearSelection(ImGuiInputTextStatePtr self) + { + ClearSelectionNative(self); + } + + /// + /// To be documented. + /// + public static void ClearSelection(ref ImGuiInputTextState self) + { + fixed (ImGuiInputTextState* pself = &self) + { + ClearSelectionNative((ImGuiInputTextState*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int GetCursorPosNative(ImGuiInputTextState* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[837])(self); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[837])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static int GetCursorPos(ImGuiInputTextStatePtr self) + { + int ret = GetCursorPosNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static int GetCursorPos(ref ImGuiInputTextState self) + { + fixed (ImGuiInputTextState* pself = &self) + { + int ret = GetCursorPosNative((ImGuiInputTextState*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int GetSelectionStartNative(ImGuiInputTextState* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[838])(self); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[838])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static int GetSelectionStart(ImGuiInputTextStatePtr self) + { + int ret = GetSelectionStartNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static int GetSelectionStart(ref ImGuiInputTextState self) + { + fixed (ImGuiInputTextState* pself = &self) + { + int ret = GetSelectionStartNative((ImGuiInputTextState*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int GetSelectionEndNative(ImGuiInputTextState* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[839])(self); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[839])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static int GetSelectionEnd(ImGuiInputTextStatePtr self) + { + int ret = GetSelectionEndNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static int GetSelectionEnd(ref ImGuiInputTextState self) + { + fixed (ImGuiInputTextState* pself = &self) + { + int ret = GetSelectionEndNative((ImGuiInputTextState*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SelectAllNative(ImGuiInputTextState* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[840])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[840])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void SelectAll(ImGuiInputTextStatePtr self) + { + SelectAllNative(self); + } + + /// + /// To be documented. + /// + public static void SelectAll(ref ImGuiInputTextState self) + { + fixed (ImGuiInputTextState* pself = &self) + { + SelectAllNative((ImGuiInputTextState*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiPopupData* ImGuiPopupDataNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[841])(); + #else + return (ImGuiPopupData*)((delegate* unmanaged[Cdecl])funcTable[841])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiPopupDataPtr ImGuiPopupData() + { + ImGuiPopupDataPtr ret = ImGuiPopupDataNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiNextWindowData* ImGuiNextWindowDataNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[842])(); + #else + return (ImGuiNextWindowData*)((delegate* unmanaged[Cdecl])funcTable[842])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiNextWindowDataPtr ImGuiNextWindowData() + { + ImGuiNextWindowDataPtr ret = ImGuiNextWindowDataNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearFlagsNative(ImGuiNextWindowData* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[843])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[843])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void ClearFlags(ImGuiNextWindowDataPtr self) + { + ClearFlagsNative(self); + } + + /// + /// To be documented. + /// + public static void ClearFlags(ref ImGuiNextWindowData self) + { + fixed (ImGuiNextWindowData* pself = &self) + { + ClearFlagsNative((ImGuiNextWindowData*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiNextItemData* ImGuiNextItemDataNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[844])(); + #else + return (ImGuiNextItemData*)((delegate* unmanaged[Cdecl])funcTable[844])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiNextItemDataPtr ImGuiNextItemData() + { + ImGuiNextItemDataPtr ret = ImGuiNextItemDataNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearFlagsNative(ImGuiNextItemData* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[845])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[845])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void ClearFlags(ImGuiNextItemDataPtr self) + { + ClearFlagsNative(self); + } + + /// + /// To be documented. + /// + public static void ClearFlags(ref ImGuiNextItemData self) + { + fixed (ImGuiNextItemData* pself = &self) + { + ClearFlagsNative((ImGuiNextItemData*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiLastItemData* ImGuiLastItemDataNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[846])(); + #else + return (ImGuiLastItemData*)((delegate* unmanaged[Cdecl])funcTable[846])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiLastItemDataPtr ImGuiLastItemData() + { + ImGuiLastItemDataPtr ret = ImGuiLastItemDataNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiPtrOrIndex* ImGuiPtrOrIndexNative(void* ptr) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[847])(ptr); + #else + return (ImGuiPtrOrIndex*)((delegate* unmanaged[Cdecl])funcTable[847])((nint)ptr); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiPtrOrIndexPtr ImGuiPtrOrIndex(void* ptr) + { + ImGuiPtrOrIndexPtr ret = ImGuiPtrOrIndexNative(ptr); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiPtrOrIndex* ImGuiPtrOrIndexNative(int index) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[848])(index); + #else + return (ImGuiPtrOrIndex*)((delegate* unmanaged[Cdecl])funcTable[848])(index); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiPtrOrIndexPtr ImGuiPtrOrIndex(int index) + { + ImGuiPtrOrIndexPtr ret = ImGuiPtrOrIndexNative(index); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiInputEvent* ImGuiInputEventNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[849])(); + #else + return (ImGuiInputEvent*)((delegate* unmanaged[Cdecl])funcTable[849])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiInputEventPtr ImGuiInputEvent() + { + ImGuiInputEventPtr ret = ImGuiInputEventNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiListClipperRange FromIndicesNative(int min, int max) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[850])(min, max); + #else + return (ImGuiListClipperRange)((delegate* unmanaged[Cdecl])funcTable[850])(min, max); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiListClipperRange FromIndices(int min, int max) + { + ImGuiListClipperRange ret = FromIndicesNative(min, max); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiListClipperRange FromPositionsNative(float y1, float y2, int offMin, int offMax) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[851])(y1, y2, offMin, offMax); + #else + return (ImGuiListClipperRange)((delegate* unmanaged[Cdecl])funcTable[851])(y1, y2, offMin, offMax); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiListClipperRange FromPositions(float y1, float y2, int offMin, int offMax) + { + ImGuiListClipperRange ret = FromPositionsNative(y1, y2, offMin, offMax); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiListClipperData* ImGuiListClipperDataNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[852])(); + #else + return (ImGuiListClipperData*)((delegate* unmanaged[Cdecl])funcTable[852])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiListClipperDataPtr ImGuiListClipperData() + { + ImGuiListClipperDataPtr ret = ImGuiListClipperDataNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ResetNative(ImGuiListClipperData* self, ImGuiListClipper* clipper) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[853])(self, clipper); + #else + ((delegate* unmanaged[Cdecl])funcTable[853])((nint)self, (nint)clipper); + #endif + } + + /// + /// To be documented. + /// + public static void Reset(ImGuiListClipperDataPtr self, ImGuiListClipperPtr clipper) + { + ResetNative(self, clipper); + } + + /// + /// To be documented. + /// + public static void Reset(ref ImGuiListClipperData self, ImGuiListClipperPtr clipper) + { + fixed (ImGuiListClipperData* pself = &self) + { + ResetNative((ImGuiListClipperData*)pself, clipper); + } + } + + /// + /// To be documented. + /// + public static void Reset(ImGuiListClipperDataPtr self, ref ImGuiListClipper clipper) + { + fixed (ImGuiListClipper* pclipper = &clipper) + { + ResetNative(self, (ImGuiListClipper*)pclipper); + } + } + + /// + /// To be documented. + /// + public static void Reset(ref ImGuiListClipperData self, ref ImGuiListClipper clipper) + { + fixed (ImGuiListClipperData* pself = &self) + { + fixed (ImGuiListClipper* pclipper = &clipper) + { + ResetNative((ImGuiListClipperData*)pself, (ImGuiListClipper*)pclipper); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiNavItemData* ImGuiNavItemDataNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[854])(); + #else + return (ImGuiNavItemData*)((delegate* unmanaged[Cdecl])funcTable[854])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiNavItemDataPtr ImGuiNavItemData() + { + ImGuiNavItemDataPtr ret = ImGuiNavItemDataNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearNative(ImGuiNavItemData* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[855])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[855])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void Clear(ImGuiNavItemDataPtr self) + { + ClearNative(self); + } + + /// + /// To be documented. + /// + public static void Clear(ref ImGuiNavItemData self) + { + fixed (ImGuiNavItemData* pself = &self) + { + ClearNative((ImGuiNavItemData*)pself); + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.007.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.007.cs new file mode 100644 index 000000000..ad31da332 --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.007.cs @@ -0,0 +1,5030 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiOldColumnData* ImGuiOldColumnDataNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[856])(); + #else + return (ImGuiOldColumnData*)((delegate* unmanaged[Cdecl])funcTable[856])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiOldColumnDataPtr ImGuiOldColumnData() + { + ImGuiOldColumnDataPtr ret = ImGuiOldColumnDataNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiOldColumns* ImGuiOldColumnsNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[857])(); + #else + return (ImGuiOldColumns*)((delegate* unmanaged[Cdecl])funcTable[857])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiOldColumnsPtr ImGuiOldColumns() + { + ImGuiOldColumnsPtr ret = ImGuiOldColumnsNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiDockNode* ImGuiDockNodeNative(uint id) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[858])(id); + #else + return (ImGuiDockNode*)((delegate* unmanaged[Cdecl])funcTable[858])(id); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiDockNodePtr ImGuiDockNode(uint id) + { + ImGuiDockNodePtr ret = ImGuiDockNodeNative(id); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DestroyNative(ImGuiDockNode* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[859])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[859])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void Destroy(ImGuiDockNodePtr self) + { + DestroyNative(self); + } + + /// + /// To be documented. + /// + public static void Destroy(ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + DestroyNative((ImGuiDockNode*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsRootNodeNative(ImGuiDockNode* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[860])(self); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[860])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static bool IsRootNode(ImGuiDockNodePtr self) + { + byte ret = IsRootNodeNative(self); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsRootNode(ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + byte ret = IsRootNodeNative((ImGuiDockNode*)pself); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsDockSpaceNative(ImGuiDockNode* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[861])(self); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[861])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static bool IsDockSpace(ImGuiDockNodePtr self) + { + byte ret = IsDockSpaceNative(self); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsDockSpace(ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + byte ret = IsDockSpaceNative((ImGuiDockNode*)pself); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsFloatingNodeNative(ImGuiDockNode* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[862])(self); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[862])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static bool IsFloatingNode(ImGuiDockNodePtr self) + { + byte ret = IsFloatingNodeNative(self); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsFloatingNode(ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + byte ret = IsFloatingNodeNative((ImGuiDockNode*)pself); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsCentralNodeNative(ImGuiDockNode* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[863])(self); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[863])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static bool IsCentralNode(ImGuiDockNodePtr self) + { + byte ret = IsCentralNodeNative(self); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsCentralNode(ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + byte ret = IsCentralNodeNative((ImGuiDockNode*)pself); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsHiddenTabBarNative(ImGuiDockNode* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[864])(self); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[864])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static bool IsHiddenTabBar(ImGuiDockNodePtr self) + { + byte ret = IsHiddenTabBarNative(self); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsHiddenTabBar(ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + byte ret = IsHiddenTabBarNative((ImGuiDockNode*)pself); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsNoTabBarNative(ImGuiDockNode* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[865])(self); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[865])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static bool IsNoTabBar(ImGuiDockNodePtr self) + { + byte ret = IsNoTabBarNative(self); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsNoTabBar(ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + byte ret = IsNoTabBarNative((ImGuiDockNode*)pself); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsSplitNodeNative(ImGuiDockNode* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[866])(self); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[866])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static bool IsSplitNode(ImGuiDockNodePtr self) + { + byte ret = IsSplitNodeNative(self); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsSplitNode(ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + byte ret = IsSplitNodeNative((ImGuiDockNode*)pself); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsLeafNodeNative(ImGuiDockNode* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[867])(self); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[867])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static bool IsLeafNode(ImGuiDockNodePtr self) + { + byte ret = IsLeafNodeNative(self); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsLeafNode(ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + byte ret = IsLeafNodeNative((ImGuiDockNode*)pself); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsEmptyNative(ImGuiDockNode* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[868])(self); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[868])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static bool IsEmpty(ImGuiDockNodePtr self) + { + byte ret = IsEmptyNative(self); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsEmpty(ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + byte ret = IsEmptyNative((ImGuiDockNode*)pself); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RectNative(ImRect* pOut, ImGuiDockNode* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[869])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[869])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static ImRect Rect(ImGuiDockNodePtr self) + { + ImRect ret; + RectNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void Rect(ImRectPtr pOut, ImGuiDockNodePtr self) + { + RectNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void Rect(ref ImRect pOut, ImGuiDockNodePtr self) + { + fixed (ImRect* ppOut = &pOut) + { + RectNative((ImRect*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static ImRect Rect(ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + ImRect ret; + RectNative(&ret, (ImGuiDockNode*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void Rect(ImRectPtr pOut, ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + RectNative(pOut, (ImGuiDockNode*)pself); + } + } + + /// + /// To be documented. + /// + public static void Rect(ref ImRect pOut, ref ImGuiDockNode self) + { + fixed (ImRect* ppOut = &pOut) + { + fixed (ImGuiDockNode* pself = &self) + { + RectNative((ImRect*)ppOut, (ImGuiDockNode*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetLocalFlagsNative(ImGuiDockNode* self, ImGuiDockNodeFlags flags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[870])(self, flags); + #else + ((delegate* unmanaged[Cdecl])funcTable[870])((nint)self, flags); + #endif + } + + /// + /// To be documented. + /// + public static void SetLocalFlags(ImGuiDockNodePtr self, ImGuiDockNodeFlags flags) + { + SetLocalFlagsNative(self, flags); + } + + /// + /// To be documented. + /// + public static void SetLocalFlags(ref ImGuiDockNode self, ImGuiDockNodeFlags flags) + { + fixed (ImGuiDockNode* pself = &self) + { + SetLocalFlagsNative((ImGuiDockNode*)pself, flags); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void UpdateMergedFlagsNative(ImGuiDockNode* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[871])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[871])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void UpdateMergedFlags(ImGuiDockNodePtr self) + { + UpdateMergedFlagsNative(self); + } + + /// + /// To be documented. + /// + public static void UpdateMergedFlags(ref ImGuiDockNode self) + { + fixed (ImGuiDockNode* pself = &self) + { + UpdateMergedFlagsNative((ImGuiDockNode*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiDockContext* ImGuiDockContextNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[872])(); + #else + return (ImGuiDockContext*)((delegate* unmanaged[Cdecl])funcTable[872])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiDockContextPtr ImGuiDockContext() + { + ImGuiDockContextPtr ret = ImGuiDockContextNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiViewportP* ImGuiViewportPNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[873])(); + #else + return (ImGuiViewportP*)((delegate* unmanaged[Cdecl])funcTable[873])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiViewportPPtr ImGuiViewportP() + { + ImGuiViewportPPtr ret = ImGuiViewportPNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DestroyNative(ImGuiViewportP* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[874])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[874])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void Destroy(ImGuiViewportPPtr self) + { + DestroyNative(self); + } + + /// + /// To be documented. + /// + public static void Destroy(ref ImGuiViewportP self) + { + fixed (ImGuiViewportP* pself = &self) + { + DestroyNative((ImGuiViewportP*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearRequestFlagsNative(ImGuiViewportP* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[875])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[875])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void ClearRequestFlags(ImGuiViewportPPtr self) + { + ClearRequestFlagsNative(self); + } + + /// + /// To be documented. + /// + public static void ClearRequestFlags(ref ImGuiViewportP self) + { + fixed (ImGuiViewportP* pself = &self) + { + ClearRequestFlagsNative((ImGuiViewportP*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void CalcWorkRectPosNative(Vector2* pOut, ImGuiViewportP* self, Vector2 offMin) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[876])(pOut, self, offMin); + #else + ((delegate* unmanaged[Cdecl])funcTable[876])((nint)pOut, (nint)self, offMin); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 CalcWorkRectPos(ImGuiViewportPPtr self, Vector2 offMin) + { + Vector2 ret; + CalcWorkRectPosNative(&ret, self, offMin); + return ret; + } + + /// + /// To be documented. + /// + public static void CalcWorkRectPos(Vector2* pOut, ImGuiViewportPPtr self, Vector2 offMin) + { + CalcWorkRectPosNative(pOut, self, offMin); + } + + /// + /// To be documented. + /// + public static void CalcWorkRectPos(ref Vector2 pOut, ImGuiViewportPPtr self, Vector2 offMin) + { + fixed (Vector2* ppOut = &pOut) + { + CalcWorkRectPosNative((Vector2*)ppOut, self, offMin); + } + } + + /// + /// To be documented. + /// + public static Vector2 CalcWorkRectPos(ref ImGuiViewportP self, Vector2 offMin) + { + fixed (ImGuiViewportP* pself = &self) + { + Vector2 ret; + CalcWorkRectPosNative(&ret, (ImGuiViewportP*)pself, offMin); + return ret; + } + } + + /// + /// To be documented. + /// + public static void CalcWorkRectPos(Vector2* pOut, ref ImGuiViewportP self, Vector2 offMin) + { + fixed (ImGuiViewportP* pself = &self) + { + CalcWorkRectPosNative(pOut, (ImGuiViewportP*)pself, offMin); + } + } + + /// + /// To be documented. + /// + public static void CalcWorkRectPos(ref Vector2 pOut, ref ImGuiViewportP self, Vector2 offMin) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (ImGuiViewportP* pself = &self) + { + CalcWorkRectPosNative((Vector2*)ppOut, (ImGuiViewportP*)pself, offMin); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void CalcWorkRectSizeNative(Vector2* pOut, ImGuiViewportP* self, Vector2 offMin, Vector2 offMax) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[877])(pOut, self, offMin, offMax); + #else + ((delegate* unmanaged[Cdecl])funcTable[877])((nint)pOut, (nint)self, offMin, offMax); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 CalcWorkRectSize(ImGuiViewportPPtr self, Vector2 offMin, Vector2 offMax) + { + Vector2 ret; + CalcWorkRectSizeNative(&ret, self, offMin, offMax); + return ret; + } + + /// + /// To be documented. + /// + public static void CalcWorkRectSize(Vector2* pOut, ImGuiViewportPPtr self, Vector2 offMin, Vector2 offMax) + { + CalcWorkRectSizeNative(pOut, self, offMin, offMax); + } + + /// + /// To be documented. + /// + public static void CalcWorkRectSize(ref Vector2 pOut, ImGuiViewportPPtr self, Vector2 offMin, Vector2 offMax) + { + fixed (Vector2* ppOut = &pOut) + { + CalcWorkRectSizeNative((Vector2*)ppOut, self, offMin, offMax); + } + } + + /// + /// To be documented. + /// + public static Vector2 CalcWorkRectSize(ref ImGuiViewportP self, Vector2 offMin, Vector2 offMax) + { + fixed (ImGuiViewportP* pself = &self) + { + Vector2 ret; + CalcWorkRectSizeNative(&ret, (ImGuiViewportP*)pself, offMin, offMax); + return ret; + } + } + + /// + /// To be documented. + /// + public static void CalcWorkRectSize(Vector2* pOut, ref ImGuiViewportP self, Vector2 offMin, Vector2 offMax) + { + fixed (ImGuiViewportP* pself = &self) + { + CalcWorkRectSizeNative(pOut, (ImGuiViewportP*)pself, offMin, offMax); + } + } + + /// + /// To be documented. + /// + public static void CalcWorkRectSize(ref Vector2 pOut, ref ImGuiViewportP self, Vector2 offMin, Vector2 offMax) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (ImGuiViewportP* pself = &self) + { + CalcWorkRectSizeNative((Vector2*)ppOut, (ImGuiViewportP*)pself, offMin, offMax); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void UpdateWorkRectNative(ImGuiViewportP* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[878])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[878])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void UpdateWorkRect(ImGuiViewportPPtr self) + { + UpdateWorkRectNative(self); + } + + /// + /// To be documented. + /// + public static void UpdateWorkRect(ref ImGuiViewportP self) + { + fixed (ImGuiViewportP* pself = &self) + { + UpdateWorkRectNative((ImGuiViewportP*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetMainRectNative(ImRect* pOut, ImGuiViewportP* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[879])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[879])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static ImRect GetMainRect(ImGuiViewportPPtr self) + { + ImRect ret; + GetMainRectNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void GetMainRect(ImRectPtr pOut, ImGuiViewportPPtr self) + { + GetMainRectNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void GetMainRect(ref ImRect pOut, ImGuiViewportPPtr self) + { + fixed (ImRect* ppOut = &pOut) + { + GetMainRectNative((ImRect*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static ImRect GetMainRect(ref ImGuiViewportP self) + { + fixed (ImGuiViewportP* pself = &self) + { + ImRect ret; + GetMainRectNative(&ret, (ImGuiViewportP*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void GetMainRect(ImRectPtr pOut, ref ImGuiViewportP self) + { + fixed (ImGuiViewportP* pself = &self) + { + GetMainRectNative(pOut, (ImGuiViewportP*)pself); + } + } + + /// + /// To be documented. + /// + public static void GetMainRect(ref ImRect pOut, ref ImGuiViewportP self) + { + fixed (ImRect* ppOut = &pOut) + { + fixed (ImGuiViewportP* pself = &self) + { + GetMainRectNative((ImRect*)ppOut, (ImGuiViewportP*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetWorkRectNative(ImRect* pOut, ImGuiViewportP* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[880])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[880])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static ImRect GetWorkRect(ImGuiViewportPPtr self) + { + ImRect ret; + GetWorkRectNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void GetWorkRect(ImRectPtr pOut, ImGuiViewportPPtr self) + { + GetWorkRectNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void GetWorkRect(ref ImRect pOut, ImGuiViewportPPtr self) + { + fixed (ImRect* ppOut = &pOut) + { + GetWorkRectNative((ImRect*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static ImRect GetWorkRect(ref ImGuiViewportP self) + { + fixed (ImGuiViewportP* pself = &self) + { + ImRect ret; + GetWorkRectNative(&ret, (ImGuiViewportP*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void GetWorkRect(ImRectPtr pOut, ref ImGuiViewportP self) + { + fixed (ImGuiViewportP* pself = &self) + { + GetWorkRectNative(pOut, (ImGuiViewportP*)pself); + } + } + + /// + /// To be documented. + /// + public static void GetWorkRect(ref ImRect pOut, ref ImGuiViewportP self) + { + fixed (ImRect* ppOut = &pOut) + { + fixed (ImGuiViewportP* pself = &self) + { + GetWorkRectNative((ImRect*)ppOut, (ImGuiViewportP*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetBuildWorkRectNative(ImRect* pOut, ImGuiViewportP* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[881])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[881])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static ImRect GetBuildWorkRect(ImGuiViewportPPtr self) + { + ImRect ret; + GetBuildWorkRectNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void GetBuildWorkRect(ImRectPtr pOut, ImGuiViewportPPtr self) + { + GetBuildWorkRectNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void GetBuildWorkRect(ref ImRect pOut, ImGuiViewportPPtr self) + { + fixed (ImRect* ppOut = &pOut) + { + GetBuildWorkRectNative((ImRect*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static ImRect GetBuildWorkRect(ref ImGuiViewportP self) + { + fixed (ImGuiViewportP* pself = &self) + { + ImRect ret; + GetBuildWorkRectNative(&ret, (ImGuiViewportP*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void GetBuildWorkRect(ImRectPtr pOut, ref ImGuiViewportP self) + { + fixed (ImGuiViewportP* pself = &self) + { + GetBuildWorkRectNative(pOut, (ImGuiViewportP*)pself); + } + } + + /// + /// To be documented. + /// + public static void GetBuildWorkRect(ref ImRect pOut, ref ImGuiViewportP self) + { + fixed (ImRect* ppOut = &pOut) + { + fixed (ImGuiViewportP* pself = &self) + { + GetBuildWorkRectNative((ImRect*)ppOut, (ImGuiViewportP*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiWindowSettings* ImGuiWindowSettingsNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[882])(); + #else + return (ImGuiWindowSettings*)((delegate* unmanaged[Cdecl])funcTable[882])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiWindowSettingsPtr ImGuiWindowSettings() + { + ImGuiWindowSettingsPtr ret = ImGuiWindowSettingsNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* GetNameNative(ImGuiWindowSettings* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[883])(self); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[883])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static byte* GetName(ImGuiWindowSettingsPtr self) + { + byte* ret = GetNameNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static string GetNameS(ImGuiWindowSettingsPtr self) + { + string ret = Utils.DecodeStringUTF8(GetNameNative(self)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* GetName(ref ImGuiWindowSettings self) + { + fixed (ImGuiWindowSettings* pself = &self) + { + byte* ret = GetNameNative((ImGuiWindowSettings*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static string GetNameS(ref ImGuiWindowSettings self) + { + fixed (ImGuiWindowSettings* pself = &self) + { + string ret = Utils.DecodeStringUTF8(GetNameNative((ImGuiWindowSettings*)pself)); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiSettingsHandler* ImGuiSettingsHandlerNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[884])(); + #else + return (ImGuiSettingsHandler*)((delegate* unmanaged[Cdecl])funcTable[884])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiSettingsHandlerPtr ImGuiSettingsHandler() + { + ImGuiSettingsHandlerPtr ret = ImGuiSettingsHandlerNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiMetricsConfig* ImGuiMetricsConfigNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[885])(); + #else + return (ImGuiMetricsConfig*)((delegate* unmanaged[Cdecl])funcTable[885])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiMetricsConfigPtr ImGuiMetricsConfig() + { + ImGuiMetricsConfigPtr ret = ImGuiMetricsConfigNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiStackLevelInfo* ImGuiStackLevelInfoNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[886])(); + #else + return (ImGuiStackLevelInfo*)((delegate* unmanaged[Cdecl])funcTable[886])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiStackLevelInfoPtr ImGuiStackLevelInfo() + { + ImGuiStackLevelInfoPtr ret = ImGuiStackLevelInfoNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiContextHook* ImGuiContextHookNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[887])(); + #else + return (ImGuiContextHook*)((delegate* unmanaged[Cdecl])funcTable[887])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiContextHookPtr ImGuiContextHook() + { + ImGuiContextHookPtr ret = ImGuiContextHookNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiContext* ImGuiContextNative(ImFontAtlas* sharedFontAtlas) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[888])(sharedFontAtlas); + #else + return (ImGuiContext*)((delegate* unmanaged[Cdecl])funcTable[888])((nint)sharedFontAtlas); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiContextPtr ImGuiContext(ImFontAtlasPtr sharedFontAtlas) + { + ImGuiContextPtr ret = ImGuiContextNative(sharedFontAtlas); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiContextPtr ImGuiContext(ref ImFontAtlas sharedFontAtlas) + { + fixed (ImFontAtlas* psharedFontAtlas = &sharedFontAtlas) + { + ImGuiContextPtr ret = ImGuiContextNative((ImFontAtlas*)psharedFontAtlas); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiWindow* ImGuiWindowNative(ImGuiContext* context, byte* name) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[889])(context, name); + #else + return (ImGuiWindow*)((delegate* unmanaged[Cdecl])funcTable[889])((nint)context, (nint)name); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr ImGuiWindow(ImGuiContextPtr context, byte* name) + { + ImGuiWindowPtr ret = ImGuiWindowNative(context, name); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr ImGuiWindow(ref ImGuiContext context, byte* name) + { + fixed (ImGuiContext* pcontext = &context) + { + ImGuiWindowPtr ret = ImGuiWindowNative((ImGuiContext*)pcontext, name); + return ret; + } + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr ImGuiWindow(ImGuiContextPtr context, ref byte name) + { + fixed (byte* pname = &name) + { + ImGuiWindowPtr ret = ImGuiWindowNative(context, (byte*)pname); + return ret; + } + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr ImGuiWindow(ImGuiContextPtr context, ReadOnlySpan name) + { + fixed (byte* pname = name) + { + ImGuiWindowPtr ret = ImGuiWindowNative(context, (byte*)pname); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = ImGuiWindowNative(context, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr ImGuiWindow(ref ImGuiContext context, ref byte name) + { + fixed (ImGuiContext* pcontext = &context) + { + fixed (byte* pname = &name) + { + ImGuiWindowPtr ret = ImGuiWindowNative((ImGuiContext*)pcontext, (byte*)pname); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr ImGuiWindow(ref ImGuiContext context, ReadOnlySpan name) + { + fixed (ImGuiContext* pcontext = &context) + { + fixed (byte* pname = name) + { + ImGuiWindowPtr ret = ImGuiWindowNative((ImGuiContext*)pcontext, (byte*)pname); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = ImGuiWindowNative((ImGuiContext*)pcontext, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DestroyNative(ImGuiWindow* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[890])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[890])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void Destroy(ImGuiWindowPtr self) + { + DestroyNative(self); + } + + /// + /// To be documented. + /// + public static void Destroy(ref ImGuiWindow self) + { + fixed (ImGuiWindow* pself = &self) + { + DestroyNative((ImGuiWindow*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetIDNative(ImGuiWindow* self, byte* str, byte* strEnd) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[891])(self, str, strEnd); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[891])((nint)self, (nint)str, (nint)strEnd); + #endif + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, byte* str, byte* strEnd) + { + uint ret = GetIDNative(self, str, strEnd); + return ret; + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, byte* str) + { + uint ret = GetIDNative(self, str, (byte*)(default)); + return ret; + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, byte* str, byte* strEnd) + { + fixed (ImGuiWindow* pself = &self) + { + uint ret = GetIDNative((ImGuiWindow*)pself, str, strEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, byte* str) + { + fixed (ImGuiWindow* pself = &self) + { + uint ret = GetIDNative((ImGuiWindow*)pself, str, (byte*)(default)); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, ref byte str, byte* strEnd) + { + fixed (byte* pstr = &str) + { + uint ret = GetIDNative(self, (byte*)pstr, strEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, ref byte str) + { + fixed (byte* pstr = &str) + { + uint ret = GetIDNative(self, (byte*)pstr, (byte*)(default)); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, ReadOnlySpan str, byte* strEnd) + { + fixed (byte* pstr = str) + { + uint ret = GetIDNative(self, (byte*)pstr, strEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, ReadOnlySpan str) + { + fixed (byte* pstr = str) + { + uint ret = GetIDNative(self, (byte*)pstr, (byte*)(default)); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, string str, byte* strEnd) + { + 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; + } + uint ret = GetIDNative(self, pStr0, strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr 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; + } + uint ret = GetIDNative(self, pStr0, (byte*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, ref byte str, byte* strEnd) + { + fixed (ImGuiWindow* pself = &self) + { + fixed (byte* pstr = &str) + { + uint ret = GetIDNative((ImGuiWindow*)pself, (byte*)pstr, strEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, ref byte str) + { + fixed (ImGuiWindow* pself = &self) + { + fixed (byte* pstr = &str) + { + uint ret = GetIDNative((ImGuiWindow*)pself, (byte*)pstr, (byte*)(default)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, ReadOnlySpan str, byte* strEnd) + { + fixed (ImGuiWindow* pself = &self) + { + fixed (byte* pstr = str) + { + uint ret = GetIDNative((ImGuiWindow*)pself, (byte*)pstr, strEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, ReadOnlySpan str) + { + fixed (ImGuiWindow* pself = &self) + { + fixed (byte* pstr = str) + { + uint ret = GetIDNative((ImGuiWindow*)pself, (byte*)pstr, (byte*)(default)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, string str, byte* strEnd) + { + fixed (ImGuiWindow* 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; + } + uint ret = GetIDNative((ImGuiWindow*)pself, pStr0, strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, string str) + { + fixed (ImGuiWindow* 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; + } + uint ret = GetIDNative((ImGuiWindow*)pself, pStr0, (byte*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, byte* str, ref byte strEnd) + { + fixed (byte* pstrEnd = &strEnd) + { + uint ret = GetIDNative(self, str, (byte*)pstrEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, byte* str, ReadOnlySpan strEnd) + { + fixed (byte* pstrEnd = strEnd) + { + uint ret = GetIDNative(self, str, (byte*)pstrEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, byte* str, string strEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = GetIDNative(self, str, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, byte* str, ref byte strEnd) + { + fixed (ImGuiWindow* pself = &self) + { + fixed (byte* pstrEnd = &strEnd) + { + uint ret = GetIDNative((ImGuiWindow*)pself, str, (byte*)pstrEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, byte* str, ReadOnlySpan strEnd) + { + fixed (ImGuiWindow* pself = &self) + { + fixed (byte* pstrEnd = strEnd) + { + uint ret = GetIDNative((ImGuiWindow*)pself, str, (byte*)pstrEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, byte* str, string strEnd) + { + fixed (ImGuiWindow* pself = &self) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = GetIDNative((ImGuiWindow*)pself, str, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, ref byte str, ref byte strEnd) + { + fixed (byte* pstr = &str) + { + fixed (byte* pstrEnd = &strEnd) + { + uint ret = GetIDNative(self, (byte*)pstr, (byte*)pstrEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, ReadOnlySpan str, ReadOnlySpan strEnd) + { + fixed (byte* pstr = str) + { + fixed (byte* pstrEnd = strEnd) + { + uint ret = GetIDNative(self, (byte*)pstr, (byte*)pstrEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, string str, string strEnd) + { + 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* pStr1 = null; + int pStrSize1 = 0; + if (strEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(strEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + uint ret = GetIDNative(self, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, ref byte str, ReadOnlySpan strEnd) + { + fixed (byte* pstr = &str) + { + fixed (byte* pstrEnd = strEnd) + { + uint ret = GetIDNative(self, (byte*)pstr, (byte*)pstrEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, ref byte str, string strEnd) + { + fixed (byte* pstr = &str) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = GetIDNative(self, (byte*)pstr, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, ReadOnlySpan str, ref byte strEnd) + { + fixed (byte* pstr = str) + { + fixed (byte* pstrEnd = &strEnd) + { + uint ret = GetIDNative(self, (byte*)pstr, (byte*)pstrEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, ReadOnlySpan str, string strEnd) + { + fixed (byte* pstr = str) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = GetIDNative(self, (byte*)pstr, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, string str, ref byte strEnd) + { + 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; + } + fixed (byte* pstrEnd = &strEnd) + { + uint ret = GetIDNative(self, pStr0, (byte*)pstrEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, string str, ReadOnlySpan strEnd) + { + 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; + } + fixed (byte* pstrEnd = strEnd) + { + uint ret = GetIDNative(self, pStr0, (byte*)pstrEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, ref byte str, ref byte strEnd) + { + fixed (ImGuiWindow* pself = &self) + { + fixed (byte* pstr = &str) + { + fixed (byte* pstrEnd = &strEnd) + { + uint ret = GetIDNative((ImGuiWindow*)pself, (byte*)pstr, (byte*)pstrEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, ReadOnlySpan str, ReadOnlySpan strEnd) + { + fixed (ImGuiWindow* pself = &self) + { + fixed (byte* pstr = str) + { + fixed (byte* pstrEnd = strEnd) + { + uint ret = GetIDNative((ImGuiWindow*)pself, (byte*)pstr, (byte*)pstrEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, string str, string strEnd) + { + fixed (ImGuiWindow* 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (strEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(strEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + uint ret = GetIDNative((ImGuiWindow*)pself, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, ref byte str, ReadOnlySpan strEnd) + { + fixed (ImGuiWindow* pself = &self) + { + fixed (byte* pstr = &str) + { + fixed (byte* pstrEnd = strEnd) + { + uint ret = GetIDNative((ImGuiWindow*)pself, (byte*)pstr, (byte*)pstrEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, ref byte str, string strEnd) + { + fixed (ImGuiWindow* pself = &self) + { + fixed (byte* pstr = &str) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = GetIDNative((ImGuiWindow*)pself, (byte*)pstr, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, ReadOnlySpan str, ref byte strEnd) + { + fixed (ImGuiWindow* pself = &self) + { + fixed (byte* pstr = str) + { + fixed (byte* pstrEnd = &strEnd) + { + uint ret = GetIDNative((ImGuiWindow*)pself, (byte*)pstr, (byte*)pstrEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, ReadOnlySpan str, string strEnd) + { + fixed (ImGuiWindow* pself = &self) + { + fixed (byte* pstr = str) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = GetIDNative((ImGuiWindow*)pself, (byte*)pstr, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, string str, ref byte strEnd) + { + fixed (ImGuiWindow* 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; + } + fixed (byte* pstrEnd = &strEnd) + { + uint ret = GetIDNative((ImGuiWindow*)pself, pStr0, (byte*)pstrEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, string str, ReadOnlySpan strEnd) + { + fixed (ImGuiWindow* 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; + } + fixed (byte* pstrEnd = strEnd) + { + uint ret = GetIDNative((ImGuiWindow*)pself, pStr0, (byte*)pstrEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetIDNative(ImGuiWindow* self, void* ptr) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[892])(self, ptr); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[892])((nint)self, (nint)ptr); + #endif + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, void* ptr) + { + uint ret = GetIDNative(self, ptr); + return ret; + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, void* ptr) + { + fixed (ImGuiWindow* pself = &self) + { + uint ret = GetIDNative((ImGuiWindow*)pself, ptr); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetIDNative(ImGuiWindow* self, int n) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[893])(self, n); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[893])((nint)self, n); + #endif + } + + /// + /// To be documented. + /// + public static uint GetID(ImGuiWindowPtr self, int n) + { + uint ret = GetIDNative(self, n); + return ret; + } + + /// + /// To be documented. + /// + public static uint GetID(ref ImGuiWindow self, int n) + { + fixed (ImGuiWindow* pself = &self) + { + uint ret = GetIDNative((ImGuiWindow*)pself, n); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetIDFromRectangleNative(ImGuiWindow* self, ImRect rAbs) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[894])(self, rAbs); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[894])((nint)self, rAbs); + #endif + } + + /// + /// To be documented. + /// + public static uint GetIDFromRectangle(ImGuiWindowPtr self, ImRect rAbs) + { + uint ret = GetIDFromRectangleNative(self, rAbs); + return ret; + } + + /// + /// To be documented. + /// + public static uint GetIDFromRectangle(ref ImGuiWindow self, ImRect rAbs) + { + fixed (ImGuiWindow* pself = &self) + { + uint ret = GetIDFromRectangleNative((ImGuiWindow*)pself, rAbs); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RectNative(ImRect* pOut, ImGuiWindow* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[895])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[895])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static ImRect Rect(ImGuiWindowPtr self) + { + ImRect ret; + RectNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void Rect(ImRectPtr pOut, ImGuiWindowPtr self) + { + RectNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void Rect(ref ImRect pOut, ImGuiWindowPtr self) + { + fixed (ImRect* ppOut = &pOut) + { + RectNative((ImRect*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static ImRect Rect(ref ImGuiWindow self) + { + fixed (ImGuiWindow* pself = &self) + { + ImRect ret; + RectNative(&ret, (ImGuiWindow*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void Rect(ImRectPtr pOut, ref ImGuiWindow self) + { + fixed (ImGuiWindow* pself = &self) + { + RectNative(pOut, (ImGuiWindow*)pself); + } + } + + /// + /// To be documented. + /// + public static void Rect(ref ImRect pOut, ref ImGuiWindow self) + { + fixed (ImRect* ppOut = &pOut) + { + fixed (ImGuiWindow* pself = &self) + { + RectNative((ImRect*)ppOut, (ImGuiWindow*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float CalcFontSizeNative(ImGuiWindow* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[896])(self); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[896])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static float CalcFontSize(ImGuiWindowPtr self) + { + float ret = CalcFontSizeNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static float CalcFontSize(ref ImGuiWindow self) + { + fixed (ImGuiWindow* pself = &self) + { + float ret = CalcFontSizeNative((ImGuiWindow*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float TitleBarHeightNative(ImGuiWindow* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[897])(self); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[897])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static float TitleBarHeight(ImGuiWindowPtr self) + { + float ret = TitleBarHeightNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static float TitleBarHeight(ref ImGuiWindow self) + { + fixed (ImGuiWindow* pself = &self) + { + float ret = TitleBarHeightNative((ImGuiWindow*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TitleBarRectNative(ImRect* pOut, ImGuiWindow* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[898])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[898])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static ImRect TitleBarRect(ImGuiWindowPtr self) + { + ImRect ret; + TitleBarRectNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void TitleBarRect(ImRectPtr pOut, ImGuiWindowPtr self) + { + TitleBarRectNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void TitleBarRect(ref ImRect pOut, ImGuiWindowPtr self) + { + fixed (ImRect* ppOut = &pOut) + { + TitleBarRectNative((ImRect*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static ImRect TitleBarRect(ref ImGuiWindow self) + { + fixed (ImGuiWindow* pself = &self) + { + ImRect ret; + TitleBarRectNative(&ret, (ImGuiWindow*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void TitleBarRect(ImRectPtr pOut, ref ImGuiWindow self) + { + fixed (ImGuiWindow* pself = &self) + { + TitleBarRectNative(pOut, (ImGuiWindow*)pself); + } + } + + /// + /// To be documented. + /// + public static void TitleBarRect(ref ImRect pOut, ref ImGuiWindow self) + { + fixed (ImRect* ppOut = &pOut) + { + fixed (ImGuiWindow* pself = &self) + { + TitleBarRectNative((ImRect*)ppOut, (ImGuiWindow*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float MenuBarHeightNative(ImGuiWindow* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[899])(self); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[899])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static float MenuBarHeight(ImGuiWindowPtr self) + { + float ret = MenuBarHeightNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static float MenuBarHeight(ref ImGuiWindow self) + { + fixed (ImGuiWindow* pself = &self) + { + float ret = MenuBarHeightNative((ImGuiWindow*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void MenuBarRectNative(ImRect* pOut, ImGuiWindow* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[900])(pOut, self); + #else + ((delegate* unmanaged[Cdecl])funcTable[900])((nint)pOut, (nint)self); + #endif + } + + /// + /// To be documented. + /// + public static ImRect MenuBarRect(ImGuiWindowPtr self) + { + ImRect ret; + MenuBarRectNative(&ret, self); + return ret; + } + + /// + /// To be documented. + /// + public static void MenuBarRect(ImRectPtr pOut, ImGuiWindowPtr self) + { + MenuBarRectNative(pOut, self); + } + + /// + /// To be documented. + /// + public static void MenuBarRect(ref ImRect pOut, ImGuiWindowPtr self) + { + fixed (ImRect* ppOut = &pOut) + { + MenuBarRectNative((ImRect*)ppOut, self); + } + } + + /// + /// To be documented. + /// + public static ImRect MenuBarRect(ref ImGuiWindow self) + { + fixed (ImGuiWindow* pself = &self) + { + ImRect ret; + MenuBarRectNative(&ret, (ImGuiWindow*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + public static void MenuBarRect(ImRectPtr pOut, ref ImGuiWindow self) + { + fixed (ImGuiWindow* pself = &self) + { + MenuBarRectNative(pOut, (ImGuiWindow*)pself); + } + } + + /// + /// To be documented. + /// + public static void MenuBarRect(ref ImRect pOut, ref ImGuiWindow self) + { + fixed (ImRect* ppOut = &pOut) + { + fixed (ImGuiWindow* pself = &self) + { + MenuBarRectNative((ImRect*)ppOut, (ImGuiWindow*)pself); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTabItem* ImGuiTabItemNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[901])(); + #else + return (ImGuiTabItem*)((delegate* unmanaged[Cdecl])funcTable[901])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTabItemPtr ImGuiTabItem() + { + ImGuiTabItemPtr ret = ImGuiTabItemNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTabBar* ImGuiTabBarNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[902])(); + #else + return (ImGuiTabBar*)((delegate* unmanaged[Cdecl])funcTable[902])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTabBarPtr ImGuiTabBar() + { + ImGuiTabBarPtr ret = ImGuiTabBarNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int GetTabOrderNative(ImGuiTabBar* self, ImGuiTabItem* tab) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[903])(self, tab); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[903])((nint)self, (nint)tab); + #endif + } + + /// + /// To be documented. + /// + public static int GetTabOrder(ImGuiTabBarPtr self, ImGuiTabItemPtr tab) + { + int ret = GetTabOrderNative(self, tab); + return ret; + } + + /// + /// To be documented. + /// + public static int GetTabOrder(ref ImGuiTabBar self, ImGuiTabItemPtr tab) + { + fixed (ImGuiTabBar* pself = &self) + { + int ret = GetTabOrderNative((ImGuiTabBar*)pself, tab); + return ret; + } + } + + /// + /// To be documented. + /// + public static int GetTabOrder(ImGuiTabBarPtr self, ref ImGuiTabItem tab) + { + fixed (ImGuiTabItem* ptab = &tab) + { + int ret = GetTabOrderNative(self, (ImGuiTabItem*)ptab); + return ret; + } + } + + /// + /// To be documented. + /// + public static int GetTabOrder(ref ImGuiTabBar self, ref ImGuiTabItem tab) + { + fixed (ImGuiTabBar* pself = &self) + { + fixed (ImGuiTabItem* ptab = &tab) + { + int ret = GetTabOrderNative((ImGuiTabBar*)pself, (ImGuiTabItem*)ptab); + return ret; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* GetTabNameNative(ImGuiTabBar* self, ImGuiTabItem* tab) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[904])(self, tab); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[904])((nint)self, (nint)tab); + #endif + } + + /// + /// To be documented. + /// + public static byte* GetTabName(ImGuiTabBarPtr self, ImGuiTabItemPtr tab) + { + byte* ret = GetTabNameNative(self, tab); + return ret; + } + + /// + /// To be documented. + /// + public static string GetTabNameS(ImGuiTabBarPtr self, ImGuiTabItemPtr tab) + { + string ret = Utils.DecodeStringUTF8(GetTabNameNative(self, tab)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* GetTabName(ref ImGuiTabBar self, ImGuiTabItemPtr tab) + { + fixed (ImGuiTabBar* pself = &self) + { + byte* ret = GetTabNameNative((ImGuiTabBar*)pself, tab); + return ret; + } + } + + /// + /// To be documented. + /// + public static string GetTabNameS(ref ImGuiTabBar self, ImGuiTabItemPtr tab) + { + fixed (ImGuiTabBar* pself = &self) + { + string ret = Utils.DecodeStringUTF8(GetTabNameNative((ImGuiTabBar*)pself, tab)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* GetTabName(ImGuiTabBarPtr self, ref ImGuiTabItem tab) + { + fixed (ImGuiTabItem* ptab = &tab) + { + byte* ret = GetTabNameNative(self, (ImGuiTabItem*)ptab); + return ret; + } + } + + /// + /// To be documented. + /// + public static string GetTabNameS(ImGuiTabBarPtr self, ref ImGuiTabItem tab) + { + fixed (ImGuiTabItem* ptab = &tab) + { + string ret = Utils.DecodeStringUTF8(GetTabNameNative(self, (ImGuiTabItem*)ptab)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* GetTabName(ref ImGuiTabBar self, ref ImGuiTabItem tab) + { + fixed (ImGuiTabBar* pself = &self) + { + fixed (ImGuiTabItem* ptab = &tab) + { + byte* ret = GetTabNameNative((ImGuiTabBar*)pself, (ImGuiTabItem*)ptab); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string GetTabNameS(ref ImGuiTabBar self, ref ImGuiTabItem tab) + { + fixed (ImGuiTabBar* pself = &self) + { + fixed (ImGuiTabItem* ptab = &tab) + { + string ret = Utils.DecodeStringUTF8(GetTabNameNative((ImGuiTabBar*)pself, (ImGuiTabItem*)ptab)); + return ret; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTableColumn* ImGuiTableColumnNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[905])(); + #else + return (ImGuiTableColumn*)((delegate* unmanaged[Cdecl])funcTable[905])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTableColumnPtr ImGuiTableColumn() + { + ImGuiTableColumnPtr ret = ImGuiTableColumnNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTableInstanceData* ImGuiTableInstanceDataNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[906])(); + #else + return (ImGuiTableInstanceData*)((delegate* unmanaged[Cdecl])funcTable[906])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTableInstanceDataPtr ImGuiTableInstanceData() + { + ImGuiTableInstanceDataPtr ret = ImGuiTableInstanceDataNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTable* ImGuiTableNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[907])(); + #else + return (ImGuiTable*)((delegate* unmanaged[Cdecl])funcTable[907])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTablePtr ImGuiTable() + { + ImGuiTablePtr ret = ImGuiTableNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DestroyNative(ImGuiTable* self) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[908])(self); + #else + ((delegate* unmanaged[Cdecl])funcTable[908])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static void Destroy(ImGuiTablePtr self) + { + DestroyNative(self); + } + + /// + /// To be documented. + /// + public static void Destroy(ref ImGuiTable self) + { + fixed (ImGuiTable* pself = &self) + { + DestroyNative((ImGuiTable*)pself); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTableTempData* ImGuiTableTempDataNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[909])(); + #else + return (ImGuiTableTempData*)((delegate* unmanaged[Cdecl])funcTable[909])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTableTempDataPtr ImGuiTableTempData() + { + ImGuiTableTempDataPtr ret = ImGuiTableTempDataNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTableColumnSettings* ImGuiTableColumnSettingsNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[910])(); + #else + return (ImGuiTableColumnSettings*)((delegate* unmanaged[Cdecl])funcTable[910])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTableColumnSettingsPtr ImGuiTableColumnSettings() + { + ImGuiTableColumnSettingsPtr ret = ImGuiTableColumnSettingsNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTableSettings* ImGuiTableSettingsNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[911])(); + #else + return (ImGuiTableSettings*)((delegate* unmanaged[Cdecl])funcTable[911])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTableSettingsPtr ImGuiTableSettings() + { + ImGuiTableSettingsPtr ret = ImGuiTableSettingsNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTableColumnSettings* GetColumnSettingsNative(ImGuiTableSettings* self) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[912])(self); + #else + return (ImGuiTableColumnSettings*)((delegate* unmanaged[Cdecl])funcTable[912])((nint)self); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTableColumnSettingsPtr GetColumnSettings(ImGuiTableSettingsPtr self) + { + ImGuiTableColumnSettingsPtr ret = GetColumnSettingsNative(self); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiTableColumnSettingsPtr GetColumnSettings(ref ImGuiTableSettings self) + { + fixed (ImGuiTableSettings* pself = &self) + { + ImGuiTableColumnSettingsPtr ret = GetColumnSettingsNative((ImGuiTableSettings*)pself); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiWindow* GetCurrentWindowReadNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[913])(); + #else + return (ImGuiWindow*)((delegate* unmanaged[Cdecl])funcTable[913])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr GetCurrentWindowRead() + { + ImGuiWindowPtr ret = GetCurrentWindowReadNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiWindow* GetCurrentWindowNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[914])(); + #else + return (ImGuiWindow*)((delegate* unmanaged[Cdecl])funcTable[914])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr GetCurrentWindow() + { + ImGuiWindowPtr ret = GetCurrentWindowNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiWindow* FindWindowByIDNative(uint id) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[915])(id); + #else + return (ImGuiWindow*)((delegate* unmanaged[Cdecl])funcTable[915])(id); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr FindWindowByID(uint id) + { + ImGuiWindowPtr ret = FindWindowByIDNative(id); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiWindow* FindWindowByNameNative(byte* name) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[916])(name); + #else + return (ImGuiWindow*)((delegate* unmanaged[Cdecl])funcTable[916])((nint)name); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr FindWindowByName(byte* name) + { + ImGuiWindowPtr ret = FindWindowByNameNative(name); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr FindWindowByName(ref byte name) + { + fixed (byte* pname = &name) + { + ImGuiWindowPtr ret = FindWindowByNameNative((byte*)pname); + return ret; + } + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr FindWindowByName(ReadOnlySpan name) + { + fixed (byte* pname = name) + { + ImGuiWindowPtr ret = FindWindowByNameNative((byte*)pname); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = FindWindowByNameNative(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void UpdateWindowParentAndRootLinksNative(ImGuiWindow* window, ImGuiWindowFlags flags, ImGuiWindow* parentWindow) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[917])(window, flags, parentWindow); + #else + ((delegate* unmanaged[Cdecl])funcTable[917])((nint)window, flags, (nint)parentWindow); + #endif + } + + /// + /// To be documented. + /// + public static void UpdateWindowParentAndRootLinks(ImGuiWindowPtr window, ImGuiWindowFlags flags, ImGuiWindowPtr parentWindow) + { + UpdateWindowParentAndRootLinksNative(window, flags, parentWindow); + } + + /// + /// To be documented. + /// + public static void UpdateWindowParentAndRootLinks(ref ImGuiWindow window, ImGuiWindowFlags flags, ImGuiWindowPtr parentWindow) + { + fixed (ImGuiWindow* pwindow = &window) + { + UpdateWindowParentAndRootLinksNative((ImGuiWindow*)pwindow, flags, parentWindow); + } + } + + /// + /// To be documented. + /// + public static void UpdateWindowParentAndRootLinks(ImGuiWindowPtr window, ImGuiWindowFlags flags, ref ImGuiWindow parentWindow) + { + fixed (ImGuiWindow* pparentWindow = &parentWindow) + { + UpdateWindowParentAndRootLinksNative(window, flags, (ImGuiWindow*)pparentWindow); + } + } + + /// + /// To be documented. + /// + public static void UpdateWindowParentAndRootLinks(ref ImGuiWindow window, ImGuiWindowFlags flags, ref ImGuiWindow parentWindow) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (ImGuiWindow* pparentWindow = &parentWindow) + { + UpdateWindowParentAndRootLinksNative((ImGuiWindow*)pwindow, flags, (ImGuiWindow*)pparentWindow); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void CalcWindowNextAutoFitSizeNative(Vector2* pOut, ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[918])(pOut, window); + #else + ((delegate* unmanaged[Cdecl])funcTable[918])((nint)pOut, (nint)window); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 CalcWindowNextAutoFitSize(ImGuiWindowPtr window) + { + Vector2 ret; + CalcWindowNextAutoFitSizeNative(&ret, window); + return ret; + } + + /// + /// To be documented. + /// + public static void CalcWindowNextAutoFitSize(Vector2* pOut, ImGuiWindowPtr window) + { + CalcWindowNextAutoFitSizeNative(pOut, window); + } + + /// + /// To be documented. + /// + public static void CalcWindowNextAutoFitSize(ref Vector2 pOut, ImGuiWindowPtr window) + { + fixed (Vector2* ppOut = &pOut) + { + CalcWindowNextAutoFitSizeNative((Vector2*)ppOut, window); + } + } + + /// + /// To be documented. + /// + public static Vector2 CalcWindowNextAutoFitSize(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + Vector2 ret; + CalcWindowNextAutoFitSizeNative(&ret, (ImGuiWindow*)pwindow); + return ret; + } + } + + /// + /// To be documented. + /// + public static void CalcWindowNextAutoFitSize(Vector2* pOut, ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + CalcWindowNextAutoFitSizeNative(pOut, (ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + public static void CalcWindowNextAutoFitSize(ref Vector2 pOut, ref ImGuiWindow window) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (ImGuiWindow* pwindow = &window) + { + CalcWindowNextAutoFitSizeNative((Vector2*)ppOut, (ImGuiWindow*)pwindow); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsWindowChildOfNative(ImGuiWindow* window, ImGuiWindow* potentialParent, byte popupHierarchy, byte dockHierarchy) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[919])(window, potentialParent, popupHierarchy, dockHierarchy); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[919])((nint)window, (nint)potentialParent, popupHierarchy, dockHierarchy); + #endif + } + + /// + /// To be documented. + /// + public static bool IsWindowChildOf(ImGuiWindowPtr window, ImGuiWindowPtr potentialParent, bool popupHierarchy, bool dockHierarchy) + { + byte ret = IsWindowChildOfNative(window, potentialParent, popupHierarchy ? (byte)1 : (byte)0, dockHierarchy ? (byte)1 : (byte)0); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsWindowChildOf(ref ImGuiWindow window, ImGuiWindowPtr potentialParent, bool popupHierarchy, bool dockHierarchy) + { + fixed (ImGuiWindow* pwindow = &window) + { + byte ret = IsWindowChildOfNative((ImGuiWindow*)pwindow, potentialParent, popupHierarchy ? (byte)1 : (byte)0, dockHierarchy ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool IsWindowChildOf(ImGuiWindowPtr window, ref ImGuiWindow potentialParent, bool popupHierarchy, bool dockHierarchy) + { + fixed (ImGuiWindow* ppotentialParent = &potentialParent) + { + byte ret = IsWindowChildOfNative(window, (ImGuiWindow*)ppotentialParent, popupHierarchy ? (byte)1 : (byte)0, dockHierarchy ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool IsWindowChildOf(ref ImGuiWindow window, ref ImGuiWindow potentialParent, bool popupHierarchy, bool dockHierarchy) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (ImGuiWindow* ppotentialParent = &potentialParent) + { + byte ret = IsWindowChildOfNative((ImGuiWindow*)pwindow, (ImGuiWindow*)ppotentialParent, popupHierarchy ? (byte)1 : (byte)0, dockHierarchy ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsWindowWithinBeginStackOfNative(ImGuiWindow* window, ImGuiWindow* potentialParent) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[920])(window, potentialParent); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[920])((nint)window, (nint)potentialParent); + #endif + } + + /// + /// To be documented. + /// + public static bool IsWindowWithinBeginStackOf(ImGuiWindowPtr window, ImGuiWindowPtr potentialParent) + { + byte ret = IsWindowWithinBeginStackOfNative(window, potentialParent); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsWindowWithinBeginStackOf(ref ImGuiWindow window, ImGuiWindowPtr potentialParent) + { + fixed (ImGuiWindow* pwindow = &window) + { + byte ret = IsWindowWithinBeginStackOfNative((ImGuiWindow*)pwindow, potentialParent); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool IsWindowWithinBeginStackOf(ImGuiWindowPtr window, ref ImGuiWindow potentialParent) + { + fixed (ImGuiWindow* ppotentialParent = &potentialParent) + { + byte ret = IsWindowWithinBeginStackOfNative(window, (ImGuiWindow*)ppotentialParent); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool IsWindowWithinBeginStackOf(ref ImGuiWindow window, ref ImGuiWindow potentialParent) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (ImGuiWindow* ppotentialParent = &potentialParent) + { + byte ret = IsWindowWithinBeginStackOfNative((ImGuiWindow*)pwindow, (ImGuiWindow*)ppotentialParent); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsWindowAboveNative(ImGuiWindow* potentialAbove, ImGuiWindow* potentialBelow) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[921])(potentialAbove, potentialBelow); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[921])((nint)potentialAbove, (nint)potentialBelow); + #endif + } + + /// + /// To be documented. + /// + public static bool IsWindowAbove(ImGuiWindowPtr potentialAbove, ImGuiWindowPtr potentialBelow) + { + byte ret = IsWindowAboveNative(potentialAbove, potentialBelow); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsWindowAbove(ref ImGuiWindow potentialAbove, ImGuiWindowPtr potentialBelow) + { + fixed (ImGuiWindow* ppotentialAbove = &potentialAbove) + { + byte ret = IsWindowAboveNative((ImGuiWindow*)ppotentialAbove, potentialBelow); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool IsWindowAbove(ImGuiWindowPtr potentialAbove, ref ImGuiWindow potentialBelow) + { + fixed (ImGuiWindow* ppotentialBelow = &potentialBelow) + { + byte ret = IsWindowAboveNative(potentialAbove, (ImGuiWindow*)ppotentialBelow); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool IsWindowAbove(ref ImGuiWindow potentialAbove, ref ImGuiWindow potentialBelow) + { + fixed (ImGuiWindow* ppotentialAbove = &potentialAbove) + { + fixed (ImGuiWindow* ppotentialBelow = &potentialBelow) + { + byte ret = IsWindowAboveNative((ImGuiWindow*)ppotentialAbove, (ImGuiWindow*)ppotentialBelow); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsWindowNavFocusableNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[922])(window); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[922])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static bool IsWindowNavFocusable(ImGuiWindowPtr window) + { + byte ret = IsWindowNavFocusableNative(window); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsWindowNavFocusable(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + byte ret = IsWindowNavFocusableNative((ImGuiWindow*)pwindow); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetWindowPosNative(ImGuiWindow* window, Vector2 pos, ImGuiCond cond) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[923])(window, pos, cond); + #else + ((delegate* unmanaged[Cdecl])funcTable[923])((nint)window, pos, cond); + #endif + } + + /// + /// To be documented. + /// + public static void SetWindowPos(ImGuiWindowPtr window, Vector2 pos, ImGuiCond cond) + { + SetWindowPosNative(window, pos, cond); + } + + /// + /// To be documented. + /// + public static void SetWindowPos(ImGuiWindowPtr window, Vector2 pos) + { + SetWindowPosNative(window, pos, (ImGuiCond)(0)); + } + + /// + /// To be documented. + /// + public static void SetWindowPos(ref ImGuiWindow window, Vector2 pos, ImGuiCond cond) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetWindowPosNative((ImGuiWindow*)pwindow, pos, cond); + } + } + + /// + /// To be documented. + /// + public static void SetWindowPos(ref ImGuiWindow window, Vector2 pos) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetWindowPosNative((ImGuiWindow*)pwindow, pos, (ImGuiCond)(0)); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetWindowSizeNative(ImGuiWindow* window, Vector2 size, ImGuiCond cond) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[924])(window, size, cond); + #else + ((delegate* unmanaged[Cdecl])funcTable[924])((nint)window, size, cond); + #endif + } + + /// + /// To be documented. + /// + public static void SetWindowSize(ImGuiWindowPtr window, Vector2 size, ImGuiCond cond) + { + SetWindowSizeNative(window, size, cond); + } + + /// + /// To be documented. + /// + public static void SetWindowSize(ImGuiWindowPtr window, Vector2 size) + { + SetWindowSizeNative(window, size, (ImGuiCond)(0)); + } + + /// + /// To be documented. + /// + public static void SetWindowSize(ref ImGuiWindow window, Vector2 size, ImGuiCond cond) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetWindowSizeNative((ImGuiWindow*)pwindow, size, cond); + } + } + + /// + /// To be documented. + /// + public static void SetWindowSize(ref ImGuiWindow window, Vector2 size) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetWindowSizeNative((ImGuiWindow*)pwindow, size, (ImGuiCond)(0)); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetWindowCollapsedNative(ImGuiWindow* window, byte collapsed, ImGuiCond cond) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[925])(window, collapsed, cond); + #else + ((delegate* unmanaged[Cdecl])funcTable[925])((nint)window, collapsed, cond); + #endif + } + + /// + /// To be documented. + /// + public static void SetWindowCollapsed(ImGuiWindowPtr window, bool collapsed, ImGuiCond cond) + { + SetWindowCollapsedNative(window, collapsed ? (byte)1 : (byte)0, cond); + } + + /// + /// To be documented. + /// + public static void SetWindowCollapsed(ImGuiWindowPtr window, bool collapsed) + { + SetWindowCollapsedNative(window, collapsed ? (byte)1 : (byte)0, (ImGuiCond)(0)); + } + + /// + /// To be documented. + /// + public static void SetWindowCollapsed(ref ImGuiWindow window, bool collapsed, ImGuiCond cond) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetWindowCollapsedNative((ImGuiWindow*)pwindow, collapsed ? (byte)1 : (byte)0, cond); + } + } + + /// + /// To be documented. + /// + public static void SetWindowCollapsed(ref ImGuiWindow window, bool collapsed) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetWindowCollapsedNative((ImGuiWindow*)pwindow, collapsed ? (byte)1 : (byte)0, (ImGuiCond)(0)); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetWindowHitTestHoleNative(ImGuiWindow* window, Vector2 pos, Vector2 size) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[926])(window, pos, size); + #else + ((delegate* unmanaged[Cdecl])funcTable[926])((nint)window, pos, size); + #endif + } + + /// + /// To be documented. + /// + public static void SetWindowHitTestHole(ImGuiWindowPtr window, Vector2 pos, Vector2 size) + { + SetWindowHitTestHoleNative(window, pos, size); + } + + /// + /// To be documented. + /// + public static void SetWindowHitTestHole(ref ImGuiWindow window, Vector2 pos, Vector2 size) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetWindowHitTestHoleNative((ImGuiWindow*)pwindow, pos, size); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void WindowRectAbsToRelNative(ImRect* pOut, ImGuiWindow* window, ImRect r) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[927])(pOut, window, r); + #else + ((delegate* unmanaged[Cdecl])funcTable[927])((nint)pOut, (nint)window, r); + #endif + } + + /// + /// To be documented. + /// + public static ImRect WindowRectAbsToRel(ImGuiWindowPtr window, ImRect r) + { + ImRect ret; + WindowRectAbsToRelNative(&ret, window, r); + return ret; + } + + /// + /// To be documented. + /// + public static void WindowRectAbsToRel(ImRectPtr pOut, ImGuiWindowPtr window, ImRect r) + { + WindowRectAbsToRelNative(pOut, window, r); + } + + /// + /// To be documented. + /// + public static void WindowRectAbsToRel(ref ImRect pOut, ImGuiWindowPtr window, ImRect r) + { + fixed (ImRect* ppOut = &pOut) + { + WindowRectAbsToRelNative((ImRect*)ppOut, window, r); + } + } + + /// + /// To be documented. + /// + public static ImRect WindowRectAbsToRel(ref ImGuiWindow window, ImRect r) + { + fixed (ImGuiWindow* pwindow = &window) + { + ImRect ret; + WindowRectAbsToRelNative(&ret, (ImGuiWindow*)pwindow, r); + return ret; + } + } + + /// + /// To be documented. + /// + public static void WindowRectAbsToRel(ImRectPtr pOut, ref ImGuiWindow window, ImRect r) + { + fixed (ImGuiWindow* pwindow = &window) + { + WindowRectAbsToRelNative(pOut, (ImGuiWindow*)pwindow, r); + } + } + + /// + /// To be documented. + /// + public static void WindowRectAbsToRel(ref ImRect pOut, ref ImGuiWindow window, ImRect r) + { + fixed (ImRect* ppOut = &pOut) + { + fixed (ImGuiWindow* pwindow = &window) + { + WindowRectAbsToRelNative((ImRect*)ppOut, (ImGuiWindow*)pwindow, r); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void WindowRectRelToAbsNative(ImRect* pOut, ImGuiWindow* window, ImRect r) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[928])(pOut, window, r); + #else + ((delegate* unmanaged[Cdecl])funcTable[928])((nint)pOut, (nint)window, r); + #endif + } + + /// + /// To be documented. + /// + public static ImRect WindowRectRelToAbs(ImGuiWindowPtr window, ImRect r) + { + ImRect ret; + WindowRectRelToAbsNative(&ret, window, r); + return ret; + } + + /// + /// To be documented. + /// + public static void WindowRectRelToAbs(ImRectPtr pOut, ImGuiWindowPtr window, ImRect r) + { + WindowRectRelToAbsNative(pOut, window, r); + } + + /// + /// To be documented. + /// + public static void WindowRectRelToAbs(ref ImRect pOut, ImGuiWindowPtr window, ImRect r) + { + fixed (ImRect* ppOut = &pOut) + { + WindowRectRelToAbsNative((ImRect*)ppOut, window, r); + } + } + + /// + /// To be documented. + /// + public static ImRect WindowRectRelToAbs(ref ImGuiWindow window, ImRect r) + { + fixed (ImGuiWindow* pwindow = &window) + { + ImRect ret; + WindowRectRelToAbsNative(&ret, (ImGuiWindow*)pwindow, r); + return ret; + } + } + + /// + /// To be documented. + /// + public static void WindowRectRelToAbs(ImRectPtr pOut, ref ImGuiWindow window, ImRect r) + { + fixed (ImGuiWindow* pwindow = &window) + { + WindowRectRelToAbsNative(pOut, (ImGuiWindow*)pwindow, r); + } + } + + /// + /// To be documented. + /// + public static void WindowRectRelToAbs(ref ImRect pOut, ref ImGuiWindow window, ImRect r) + { + fixed (ImRect* ppOut = &pOut) + { + fixed (ImGuiWindow* pwindow = &window) + { + WindowRectRelToAbsNative((ImRect*)ppOut, (ImGuiWindow*)pwindow, r); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void FocusWindowNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[929])(window); + #else + ((delegate* unmanaged[Cdecl])funcTable[929])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void FocusWindow(ImGuiWindowPtr window) + { + FocusWindowNative(window); + } + + /// + /// To be documented. + /// + public static void FocusWindow(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + FocusWindowNative((ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void FocusTopMostWindowUnderOneNative(ImGuiWindow* underThisWindow, ImGuiWindow* ignoreWindow) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[930])(underThisWindow, ignoreWindow); + #else + ((delegate* unmanaged[Cdecl])funcTable[930])((nint)underThisWindow, (nint)ignoreWindow); + #endif + } + + /// + /// To be documented. + /// + public static void FocusTopMostWindowUnderOne(ImGuiWindowPtr underThisWindow, ImGuiWindowPtr ignoreWindow) + { + FocusTopMostWindowUnderOneNative(underThisWindow, ignoreWindow); + } + + /// + /// To be documented. + /// + public static void FocusTopMostWindowUnderOne(ref ImGuiWindow underThisWindow, ImGuiWindowPtr ignoreWindow) + { + fixed (ImGuiWindow* punderThisWindow = &underThisWindow) + { + FocusTopMostWindowUnderOneNative((ImGuiWindow*)punderThisWindow, ignoreWindow); + } + } + + /// + /// To be documented. + /// + public static void FocusTopMostWindowUnderOne(ImGuiWindowPtr underThisWindow, ref ImGuiWindow ignoreWindow) + { + fixed (ImGuiWindow* pignoreWindow = &ignoreWindow) + { + FocusTopMostWindowUnderOneNative(underThisWindow, (ImGuiWindow*)pignoreWindow); + } + } + + /// + /// To be documented. + /// + public static void FocusTopMostWindowUnderOne(ref ImGuiWindow underThisWindow, ref ImGuiWindow ignoreWindow) + { + fixed (ImGuiWindow* punderThisWindow = &underThisWindow) + { + fixed (ImGuiWindow* pignoreWindow = &ignoreWindow) + { + FocusTopMostWindowUnderOneNative((ImGuiWindow*)punderThisWindow, (ImGuiWindow*)pignoreWindow); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void BringWindowToFocusFrontNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[931])(window); + #else + ((delegate* unmanaged[Cdecl])funcTable[931])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void BringWindowToFocusFront(ImGuiWindowPtr window) + { + BringWindowToFocusFrontNative(window); + } + + /// + /// To be documented. + /// + public static void BringWindowToFocusFront(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + BringWindowToFocusFrontNative((ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void BringWindowToDisplayFrontNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[932])(window); + #else + ((delegate* unmanaged[Cdecl])funcTable[932])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void BringWindowToDisplayFront(ImGuiWindowPtr window) + { + BringWindowToDisplayFrontNative(window); + } + + /// + /// To be documented. + /// + public static void BringWindowToDisplayFront(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + BringWindowToDisplayFrontNative((ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void BringWindowToDisplayBackNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[933])(window); + #else + ((delegate* unmanaged[Cdecl])funcTable[933])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void BringWindowToDisplayBack(ImGuiWindowPtr window) + { + BringWindowToDisplayBackNative(window); + } + + /// + /// To be documented. + /// + public static void BringWindowToDisplayBack(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + BringWindowToDisplayBackNative((ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void BringWindowToDisplayBehindNative(ImGuiWindow* window, ImGuiWindow* aboveWindow) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[934])(window, aboveWindow); + #else + ((delegate* unmanaged[Cdecl])funcTable[934])((nint)window, (nint)aboveWindow); + #endif + } + + /// + /// To be documented. + /// + public static void BringWindowToDisplayBehind(ImGuiWindowPtr window, ImGuiWindowPtr aboveWindow) + { + BringWindowToDisplayBehindNative(window, aboveWindow); + } + + /// + /// To be documented. + /// + public static void BringWindowToDisplayBehind(ref ImGuiWindow window, ImGuiWindowPtr aboveWindow) + { + fixed (ImGuiWindow* pwindow = &window) + { + BringWindowToDisplayBehindNative((ImGuiWindow*)pwindow, aboveWindow); + } + } + + /// + /// To be documented. + /// + public static void BringWindowToDisplayBehind(ImGuiWindowPtr window, ref ImGuiWindow aboveWindow) + { + fixed (ImGuiWindow* paboveWindow = &aboveWindow) + { + BringWindowToDisplayBehindNative(window, (ImGuiWindow*)paboveWindow); + } + } + + /// + /// To be documented. + /// + public static void BringWindowToDisplayBehind(ref ImGuiWindow window, ref ImGuiWindow aboveWindow) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (ImGuiWindow* paboveWindow = &aboveWindow) + { + BringWindowToDisplayBehindNative((ImGuiWindow*)pwindow, (ImGuiWindow*)paboveWindow); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int FindWindowDisplayIndexNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[935])(window); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[935])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static int FindWindowDisplayIndex(ImGuiWindowPtr window) + { + int ret = FindWindowDisplayIndexNative(window); + return ret; + } + + /// + /// To be documented. + /// + public static int FindWindowDisplayIndex(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + int ret = FindWindowDisplayIndexNative((ImGuiWindow*)pwindow); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiWindow* FindBottomMostVisibleWindowWithinBeginStackNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[936])(window); + #else + return (ImGuiWindow*)((delegate* unmanaged[Cdecl])funcTable[936])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr FindBottomMostVisibleWindowWithinBeginStack(ImGuiWindowPtr window) + { + ImGuiWindowPtr ret = FindBottomMostVisibleWindowWithinBeginStackNative(window); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr FindBottomMostVisibleWindowWithinBeginStack(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + ImGuiWindowPtr ret = FindBottomMostVisibleWindowWithinBeginStackNative((ImGuiWindow*)pwindow); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetCurrentFontNative(ImFont* font) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[937])(font); + #else + ((delegate* unmanaged[Cdecl])funcTable[937])((nint)font); + #endif + } + + /// + /// To be documented. + /// + public static void SetCurrentFont(ImFontPtr font) + { + SetCurrentFontNative(font); + } + + /// + /// To be documented. + /// + public static void SetCurrentFont(ref ImFont font) + { + fixed (ImFont* pfont = &font) + { + SetCurrentFontNative((ImFont*)pfont); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImFont* GetDefaultFontNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[938])(); + #else + return (ImFont*)((delegate* unmanaged[Cdecl])funcTable[938])(); + #endif + } + + /// + /// To be documented. + /// + public static ImFontPtr GetDefaultFont() + { + ImFontPtr ret = GetDefaultFontNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImDrawList* GetForegroundDrawListNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[939])(window); + #else + return (ImDrawList*)((delegate* unmanaged[Cdecl])funcTable[939])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static ImDrawListPtr GetForegroundDrawList(ImGuiWindowPtr window) + { + ImDrawListPtr ret = GetForegroundDrawListNative(window); + return ret; + } + + /// + /// To be documented. + /// + public static ImDrawListPtr GetForegroundDrawList(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + ImDrawListPtr ret = GetForegroundDrawListNative((ImGuiWindow*)pwindow); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void InitializeNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[940])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[940])(); + #endif + } + + /// + /// To be documented. + /// + public static void Initialize() + { + InitializeNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ShutdownNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[941])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[941])(); + #endif + } + + /// + /// To be documented. + /// + public static void Shutdown() + { + ShutdownNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void UpdateInputEventsNative(byte trickleFastInputs) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[942])(trickleFastInputs); + #else + ((delegate* unmanaged[Cdecl])funcTable[942])(trickleFastInputs); + #endif + } + + /// + /// To be documented. + /// + public static void UpdateInputEvents(bool trickleFastInputs) + { + UpdateInputEventsNative(trickleFastInputs ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void UpdateHoveredWindowAndCaptureFlagsNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[943])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[943])(); + #endif + } + + /// + /// To be documented. + /// + public static void UpdateHoveredWindowAndCaptureFlags() + { + UpdateHoveredWindowAndCaptureFlagsNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void StartMouseMovingWindowNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[944])(window); + #else + ((delegate* unmanaged[Cdecl])funcTable[944])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void StartMouseMovingWindow(ImGuiWindowPtr window) + { + StartMouseMovingWindowNative(window); + } + + /// + /// To be documented. + /// + public static void StartMouseMovingWindow(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + StartMouseMovingWindowNative((ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void StartMouseMovingWindowOrNodeNative(ImGuiWindow* window, ImGuiDockNode* node, byte undockFloatingNode) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[945])(window, node, undockFloatingNode); + #else + ((delegate* unmanaged[Cdecl])funcTable[945])((nint)window, (nint)node, undockFloatingNode); + #endif + } + + /// + /// To be documented. + /// + public static void StartMouseMovingWindowOrNode(ImGuiWindowPtr window, ImGuiDockNodePtr node, bool undockFloatingNode) + { + StartMouseMovingWindowOrNodeNative(window, node, undockFloatingNode ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void StartMouseMovingWindowOrNode(ref ImGuiWindow window, ImGuiDockNodePtr node, bool undockFloatingNode) + { + fixed (ImGuiWindow* pwindow = &window) + { + StartMouseMovingWindowOrNodeNative((ImGuiWindow*)pwindow, node, undockFloatingNode ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void StartMouseMovingWindowOrNode(ImGuiWindowPtr window, ref ImGuiDockNode node, bool undockFloatingNode) + { + fixed (ImGuiDockNode* pnode = &node) + { + StartMouseMovingWindowOrNodeNative(window, (ImGuiDockNode*)pnode, undockFloatingNode ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void StartMouseMovingWindowOrNode(ref ImGuiWindow window, ref ImGuiDockNode node, bool undockFloatingNode) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (ImGuiDockNode* pnode = &node) + { + StartMouseMovingWindowOrNodeNative((ImGuiWindow*)pwindow, (ImGuiDockNode*)pnode, undockFloatingNode ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void UpdateMouseMovingWindowNewFrameNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[946])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[946])(); + #endif + } + + /// + /// To be documented. + /// + public static void UpdateMouseMovingWindowNewFrame() + { + UpdateMouseMovingWindowNewFrameNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void UpdateMouseMovingWindowEndFrameNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[947])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[947])(); + #endif + } + + /// + /// To be documented. + /// + public static void UpdateMouseMovingWindowEndFrame() + { + UpdateMouseMovingWindowEndFrameNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint AddContextHookNative(ImGuiContext* context, ImGuiContextHook* hook) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[948])(context, hook); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[948])((nint)context, (nint)hook); + #endif + } + + /// + /// To be documented. + /// + public static uint AddContextHook(ImGuiContextPtr context, ImGuiContextHookPtr hook) + { + uint ret = AddContextHookNative(context, hook); + return ret; + } + + /// + /// To be documented. + /// + public static uint AddContextHook(ref ImGuiContext context, ImGuiContextHookPtr hook) + { + fixed (ImGuiContext* pcontext = &context) + { + uint ret = AddContextHookNative((ImGuiContext*)pcontext, hook); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint AddContextHook(ImGuiContextPtr context, ref ImGuiContextHook hook) + { + fixed (ImGuiContextHook* phook = &hook) + { + uint ret = AddContextHookNative(context, (ImGuiContextHook*)phook); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint AddContextHook(ref ImGuiContext context, ref ImGuiContextHook hook) + { + fixed (ImGuiContext* pcontext = &context) + { + fixed (ImGuiContextHook* phook = &hook) + { + uint ret = AddContextHookNative((ImGuiContext*)pcontext, (ImGuiContextHook*)phook); + return ret; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RemoveContextHookNative(ImGuiContext* context, uint hookToRemove) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[949])(context, hookToRemove); + #else + ((delegate* unmanaged[Cdecl])funcTable[949])((nint)context, hookToRemove); + #endif + } + + /// + /// To be documented. + /// + public static void RemoveContextHook(ImGuiContextPtr context, uint hookToRemove) + { + RemoveContextHookNative(context, hookToRemove); + } + + /// + /// To be documented. + /// + public static void RemoveContextHook(ref ImGuiContext context, uint hookToRemove) + { + fixed (ImGuiContext* pcontext = &context) + { + RemoveContextHookNative((ImGuiContext*)pcontext, hookToRemove); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void CallContextHooksNative(ImGuiContext* context, ImGuiContextHookType type) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[950])(context, type); + #else + ((delegate* unmanaged[Cdecl])funcTable[950])((nint)context, type); + #endif + } + + /// + /// To be documented. + /// + public static void CallContextHooks(ImGuiContextPtr context, ImGuiContextHookType type) + { + CallContextHooksNative(context, type); + } + + /// + /// To be documented. + /// + public static void CallContextHooks(ref ImGuiContext context, ImGuiContextHookType type) + { + fixed (ImGuiContext* pcontext = &context) + { + CallContextHooksNative((ImGuiContext*)pcontext, type); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TranslateWindowsInViewportNative(ImGuiViewportP* viewport, Vector2 oldPos, Vector2 newPos) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[951])(viewport, oldPos, newPos); + #else + ((delegate* unmanaged[Cdecl])funcTable[951])((nint)viewport, oldPos, newPos); + #endif + } + + /// + /// To be documented. + /// + public static void TranslateWindowsInViewport(ImGuiViewportPPtr viewport, Vector2 oldPos, Vector2 newPos) + { + TranslateWindowsInViewportNative(viewport, oldPos, newPos); + } + + /// + /// To be documented. + /// + public static void TranslateWindowsInViewport(ref ImGuiViewportP viewport, Vector2 oldPos, Vector2 newPos) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + TranslateWindowsInViewportNative((ImGuiViewportP*)pviewport, oldPos, newPos); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ScaleWindowsInViewportNative(ImGuiViewportP* viewport, float scale) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[952])(viewport, scale); + #else + ((delegate* unmanaged[Cdecl])funcTable[952])((nint)viewport, scale); + #endif + } + + /// + /// To be documented. + /// + public static void ScaleWindowsInViewport(ImGuiViewportPPtr viewport, float scale) + { + ScaleWindowsInViewportNative(viewport, scale); + } + + /// + /// To be documented. + /// + public static void ScaleWindowsInViewport(ref ImGuiViewportP viewport, float scale) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + ScaleWindowsInViewportNative((ImGuiViewportP*)pviewport, scale); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DestroyPlatformWindowNative(ImGuiViewportP* viewport) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[953])(viewport); + #else + ((delegate* unmanaged[Cdecl])funcTable[953])((nint)viewport); + #endif + } + + /// + /// To be documented. + /// + public static void DestroyPlatformWindow(ImGuiViewportPPtr viewport) + { + DestroyPlatformWindowNative(viewport); + } + + /// + /// To be documented. + /// + public static void DestroyPlatformWindow(ref ImGuiViewportP viewport) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + DestroyPlatformWindowNative((ImGuiViewportP*)pviewport); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetWindowViewportNative(ImGuiWindow* window, ImGuiViewportP* viewport) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[954])(window, viewport); + #else + ((delegate* unmanaged[Cdecl])funcTable[954])((nint)window, (nint)viewport); + #endif + } + + /// + /// To be documented. + /// + public static void SetWindowViewport(ImGuiWindowPtr window, ImGuiViewportPPtr viewport) + { + SetWindowViewportNative(window, viewport); + } + + /// + /// To be documented. + /// + public static void SetWindowViewport(ref ImGuiWindow window, ImGuiViewportPPtr viewport) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetWindowViewportNative((ImGuiWindow*)pwindow, viewport); + } + } + + /// + /// To be documented. + /// + public static void SetWindowViewport(ImGuiWindowPtr window, ref ImGuiViewportP viewport) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + SetWindowViewportNative(window, (ImGuiViewportP*)pviewport); + } + } + + /// + /// To be documented. + /// + public static void SetWindowViewport(ref ImGuiWindow window, ref ImGuiViewportP viewport) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + SetWindowViewportNative((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetCurrentViewportNative(ImGuiWindow* window, ImGuiViewportP* viewport) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[955])(window, viewport); + #else + ((delegate* unmanaged[Cdecl])funcTable[955])((nint)window, (nint)viewport); + #endif + } + + /// + /// To be documented. + /// + public static void SetCurrentViewport(ImGuiWindowPtr window, ImGuiViewportPPtr viewport) + { + SetCurrentViewportNative(window, viewport); + } + + /// + /// To be documented. + /// + public static void SetCurrentViewport(ref ImGuiWindow window, ImGuiViewportPPtr viewport) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetCurrentViewportNative((ImGuiWindow*)pwindow, viewport); + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.008.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.008.cs new file mode 100644 index 000000000..a3da2de91 --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.008.cs @@ -0,0 +1,5022 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + public static void SetCurrentViewport(ImGuiWindowPtr window, ref ImGuiViewportP viewport) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + SetCurrentViewportNative(window, (ImGuiViewportP*)pviewport); + } + } + + /// + /// To be documented. + /// + public static void SetCurrentViewport(ref ImGuiWindow window, ref ImGuiViewportP viewport) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + SetCurrentViewportNative((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiPlatformMonitor* GetViewportPlatformMonitorNative(ImGuiViewport* viewport) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[956])(viewport); + #else + return (ImGuiPlatformMonitor*)((delegate* unmanaged[Cdecl])funcTable[956])((nint)viewport); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiPlatformMonitorPtr GetViewportPlatformMonitor(ImGuiViewportPtr viewport) + { + ImGuiPlatformMonitorPtr ret = GetViewportPlatformMonitorNative(viewport); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiPlatformMonitorPtr GetViewportPlatformMonitor(ref ImGuiViewport viewport) + { + fixed (ImGuiViewport* pviewport = &viewport) + { + ImGuiPlatformMonitorPtr ret = GetViewportPlatformMonitorNative((ImGuiViewport*)pviewport); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiViewportP* FindHoveredViewportFromPlatformWindowStackNative(Vector2 mousePlatformPos) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[957])(mousePlatformPos); + #else + return (ImGuiViewportP*)((delegate* unmanaged[Cdecl])funcTable[957])(mousePlatformPos); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiViewportPPtr FindHoveredViewportFromPlatformWindowStack(Vector2 mousePlatformPos) + { + ImGuiViewportPPtr ret = FindHoveredViewportFromPlatformWindowStackNative(mousePlatformPos); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void MarkIniSettingsDirtyNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[958])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[958])(); + #endif + } + + /// + /// To be documented. + /// + public static void MarkIniSettingsDirty() + { + MarkIniSettingsDirtyNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void MarkIniSettingsDirtyNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[959])(window); + #else + ((delegate* unmanaged[Cdecl])funcTable[959])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void MarkIniSettingsDirty(ImGuiWindowPtr window) + { + MarkIniSettingsDirtyNative(window); + } + + /// + /// To be documented. + /// + public static void MarkIniSettingsDirty(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + MarkIniSettingsDirtyNative((ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearIniSettingsNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[960])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[960])(); + #endif + } + + /// + /// To be documented. + /// + public static void ClearIniSettings() + { + ClearIniSettingsNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiWindowSettings* CreateNewWindowSettingsNative(byte* name) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[961])(name); + #else + return (ImGuiWindowSettings*)((delegate* unmanaged[Cdecl])funcTable[961])((nint)name); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiWindowSettingsPtr CreateNewWindowSettings(byte* name) + { + ImGuiWindowSettingsPtr ret = CreateNewWindowSettingsNative(name); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiWindowSettingsPtr CreateNewWindowSettings(ref byte name) + { + fixed (byte* pname = &name) + { + ImGuiWindowSettingsPtr ret = CreateNewWindowSettingsNative((byte*)pname); + return ret; + } + } + + /// + /// To be documented. + /// + public static ImGuiWindowSettingsPtr CreateNewWindowSettings(ReadOnlySpan name) + { + fixed (byte* pname = name) + { + ImGuiWindowSettingsPtr ret = CreateNewWindowSettingsNative((byte*)pname); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = CreateNewWindowSettingsNative(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiWindowSettings* FindWindowSettingsNative(uint id) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[962])(id); + #else + return (ImGuiWindowSettings*)((delegate* unmanaged[Cdecl])funcTable[962])(id); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiWindowSettingsPtr FindWindowSettings(uint id) + { + ImGuiWindowSettingsPtr ret = FindWindowSettingsNative(id); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiWindowSettings* FindOrCreateWindowSettingsNative(byte* name) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[963])(name); + #else + return (ImGuiWindowSettings*)((delegate* unmanaged[Cdecl])funcTable[963])((nint)name); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiWindowSettingsPtr FindOrCreateWindowSettings(byte* name) + { + ImGuiWindowSettingsPtr ret = FindOrCreateWindowSettingsNative(name); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiWindowSettingsPtr FindOrCreateWindowSettings(ref byte name) + { + fixed (byte* pname = &name) + { + ImGuiWindowSettingsPtr ret = FindOrCreateWindowSettingsNative((byte*)pname); + return ret; + } + } + + /// + /// To be documented. + /// + public static ImGuiWindowSettingsPtr FindOrCreateWindowSettings(ReadOnlySpan name) + { + fixed (byte* pname = name) + { + ImGuiWindowSettingsPtr ret = FindOrCreateWindowSettingsNative((byte*)pname); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = FindOrCreateWindowSettingsNative(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void AddSettingsHandlerNative(ImGuiSettingsHandler* handler) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[964])(handler); + #else + ((delegate* unmanaged[Cdecl])funcTable[964])((nint)handler); + #endif + } + + /// + /// To be documented. + /// + public static void AddSettingsHandler(ImGuiSettingsHandlerPtr handler) + { + AddSettingsHandlerNative(handler); + } + + /// + /// To be documented. + /// + public static void AddSettingsHandler(ref ImGuiSettingsHandler handler) + { + fixed (ImGuiSettingsHandler* phandler = &handler) + { + AddSettingsHandlerNative((ImGuiSettingsHandler*)phandler); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RemoveSettingsHandlerNative(byte* typeName) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[965])(typeName); + #else + ((delegate* unmanaged[Cdecl])funcTable[965])((nint)typeName); + #endif + } + + /// + /// To be documented. + /// + public static void RemoveSettingsHandler(byte* typeName) + { + RemoveSettingsHandlerNative(typeName); + } + + /// + /// To be documented. + /// + public static void RemoveSettingsHandler(ref byte typeName) + { + fixed (byte* ptypeName = &typeName) + { + RemoveSettingsHandlerNative((byte*)ptypeName); + } + } + + /// + /// To be documented. + /// + public static void RemoveSettingsHandler(ReadOnlySpan typeName) + { + fixed (byte* ptypeName = typeName) + { + RemoveSettingsHandlerNative((byte*)ptypeName); + } + } + + /// + /// To be documented. + /// + 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; + } + RemoveSettingsHandlerNative(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiSettingsHandler* FindSettingsHandlerNative(byte* typeName) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[966])(typeName); + #else + return (ImGuiSettingsHandler*)((delegate* unmanaged[Cdecl])funcTable[966])((nint)typeName); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiSettingsHandlerPtr FindSettingsHandler(byte* typeName) + { + ImGuiSettingsHandlerPtr ret = FindSettingsHandlerNative(typeName); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiSettingsHandlerPtr FindSettingsHandler(ref byte typeName) + { + fixed (byte* ptypeName = &typeName) + { + ImGuiSettingsHandlerPtr ret = FindSettingsHandlerNative((byte*)ptypeName); + return ret; + } + } + + /// + /// To be documented. + /// + public static ImGuiSettingsHandlerPtr FindSettingsHandler(ReadOnlySpan typeName) + { + fixed (byte* ptypeName = typeName) + { + ImGuiSettingsHandlerPtr ret = FindSettingsHandlerNative((byte*)ptypeName); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = FindSettingsHandlerNative(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetNextWindowScrollNative(Vector2 scroll) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[967])(scroll); + #else + ((delegate* unmanaged[Cdecl])funcTable[967])(scroll); + #endif + } + + /// + /// To be documented. + /// + public static void SetNextWindowScroll(Vector2 scroll) + { + SetNextWindowScrollNative(scroll); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetScrollXNative(ImGuiWindow* window, float scrollX) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[968])(window, scrollX); + #else + ((delegate* unmanaged[Cdecl])funcTable[968])((nint)window, scrollX); + #endif + } + + /// + /// To be documented. + /// + public static void SetScrollX(ImGuiWindowPtr window, float scrollX) + { + SetScrollXNative(window, scrollX); + } + + /// + /// To be documented. + /// + public static void SetScrollX(ref ImGuiWindow window, float scrollX) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetScrollXNative((ImGuiWindow*)pwindow, scrollX); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetScrollYNative(ImGuiWindow* window, float scrollY) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[969])(window, scrollY); + #else + ((delegate* unmanaged[Cdecl])funcTable[969])((nint)window, scrollY); + #endif + } + + /// + /// To be documented. + /// + public static void SetScrollY(ImGuiWindowPtr window, float scrollY) + { + SetScrollYNative(window, scrollY); + } + + /// + /// To be documented. + /// + public static void SetScrollY(ref ImGuiWindow window, float scrollY) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetScrollYNative((ImGuiWindow*)pwindow, scrollY); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetScrollFromPosXNative(ImGuiWindow* window, float localX, float centerXRatio) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[970])(window, localX, centerXRatio); + #else + ((delegate* unmanaged[Cdecl])funcTable[970])((nint)window, localX, centerXRatio); + #endif + } + + /// + /// To be documented. + /// + public static void SetScrollFromPosX(ImGuiWindowPtr window, float localX, float centerXRatio) + { + SetScrollFromPosXNative(window, localX, centerXRatio); + } + + /// + /// To be documented. + /// + public static void SetScrollFromPosX(ref ImGuiWindow window, float localX, float centerXRatio) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetScrollFromPosXNative((ImGuiWindow*)pwindow, localX, centerXRatio); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetScrollFromPosYNative(ImGuiWindow* window, float localY, float centerYRatio) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[971])(window, localY, centerYRatio); + #else + ((delegate* unmanaged[Cdecl])funcTable[971])((nint)window, localY, centerYRatio); + #endif + } + + /// + /// To be documented. + /// + public static void SetScrollFromPosY(ImGuiWindowPtr window, float localY, float centerYRatio) + { + SetScrollFromPosYNative(window, localY, centerYRatio); + } + + /// + /// To be documented. + /// + public static void SetScrollFromPosY(ref ImGuiWindow window, float localY, float centerYRatio) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetScrollFromPosYNative((ImGuiWindow*)pwindow, localY, centerYRatio); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ScrollToItemNative(ImGuiScrollFlags flags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[972])(flags); + #else + ((delegate* unmanaged[Cdecl])funcTable[972])(flags); + #endif + } + + /// + /// To be documented. + /// + public static void ScrollToItem(ImGuiScrollFlags flags) + { + ScrollToItemNative(flags); + } + + /// + /// To be documented. + /// + public static void ScrollToItem() + { + ScrollToItemNative((ImGuiScrollFlags)(0)); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ScrollToRectNative(ImGuiWindow* window, ImRect rect, ImGuiScrollFlags flags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[973])(window, rect, flags); + #else + ((delegate* unmanaged[Cdecl])funcTable[973])((nint)window, rect, flags); + #endif + } + + /// + /// To be documented. + /// + public static void ScrollToRect(ImGuiWindowPtr window, ImRect rect, ImGuiScrollFlags flags) + { + ScrollToRectNative(window, rect, flags); + } + + /// + /// To be documented. + /// + public static void ScrollToRect(ImGuiWindowPtr window, ImRect rect) + { + ScrollToRectNative(window, rect, (ImGuiScrollFlags)(0)); + } + + /// + /// To be documented. + /// + public static void ScrollToRect(ref ImGuiWindow window, ImRect rect, ImGuiScrollFlags flags) + { + fixed (ImGuiWindow* pwindow = &window) + { + ScrollToRectNative((ImGuiWindow*)pwindow, rect, flags); + } + } + + /// + /// To be documented. + /// + public static void ScrollToRect(ref ImGuiWindow window, ImRect rect) + { + fixed (ImGuiWindow* pwindow = &window) + { + ScrollToRectNative((ImGuiWindow*)pwindow, rect, (ImGuiScrollFlags)(0)); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ScrollToRectExNative(Vector2* pOut, ImGuiWindow* window, ImRect rect, ImGuiScrollFlags flags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[974])(pOut, window, rect, flags); + #else + ((delegate* unmanaged[Cdecl])funcTable[974])((nint)pOut, (nint)window, rect, flags); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 ScrollToRectEx(ImGuiWindowPtr window, ImRect rect) + { + Vector2 ret; + ScrollToRectExNative(&ret, window, rect, (ImGuiScrollFlags)(0)); + return ret; + } + + /// + /// To be documented. + /// + public static Vector2 ScrollToRectEx(ImGuiWindowPtr window, ImRect rect, ImGuiScrollFlags flags) + { + Vector2 ret; + ScrollToRectExNative(&ret, window, rect, flags); + return ret; + } + + /// + /// To be documented. + /// + public static void ScrollToRectEx(Vector2* pOut, ImGuiWindowPtr window, ImRect rect, ImGuiScrollFlags flags) + { + ScrollToRectExNative(pOut, window, rect, flags); + } + + /// + /// To be documented. + /// + public static void ScrollToRectEx(Vector2* pOut, ImGuiWindowPtr window, ImRect rect) + { + ScrollToRectExNative(pOut, window, rect, (ImGuiScrollFlags)(0)); + } + + /// + /// To be documented. + /// + public static void ScrollToRectEx(ref Vector2 pOut, ImGuiWindowPtr window, ImRect rect, ImGuiScrollFlags flags) + { + fixed (Vector2* ppOut = &pOut) + { + ScrollToRectExNative((Vector2*)ppOut, window, rect, flags); + } + } + + /// + /// To be documented. + /// + public static void ScrollToRectEx(ref Vector2 pOut, ImGuiWindowPtr window, ImRect rect) + { + fixed (Vector2* ppOut = &pOut) + { + ScrollToRectExNative((Vector2*)ppOut, window, rect, (ImGuiScrollFlags)(0)); + } + } + + /// + /// To be documented. + /// + public static Vector2 ScrollToRectEx(ref ImGuiWindow window, ImRect rect) + { + fixed (ImGuiWindow* pwindow = &window) + { + Vector2 ret; + ScrollToRectExNative(&ret, (ImGuiWindow*)pwindow, rect, (ImGuiScrollFlags)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + public static Vector2 ScrollToRectEx(ref ImGuiWindow window, ImRect rect, ImGuiScrollFlags flags) + { + fixed (ImGuiWindow* pwindow = &window) + { + Vector2 ret; + ScrollToRectExNative(&ret, (ImGuiWindow*)pwindow, rect, flags); + return ret; + } + } + + /// + /// To be documented. + /// + public static void ScrollToRectEx(Vector2* pOut, ref ImGuiWindow window, ImRect rect, ImGuiScrollFlags flags) + { + fixed (ImGuiWindow* pwindow = &window) + { + ScrollToRectExNative(pOut, (ImGuiWindow*)pwindow, rect, flags); + } + } + + /// + /// To be documented. + /// + public static void ScrollToRectEx(Vector2* pOut, ref ImGuiWindow window, ImRect rect) + { + fixed (ImGuiWindow* pwindow = &window) + { + ScrollToRectExNative(pOut, (ImGuiWindow*)pwindow, rect, (ImGuiScrollFlags)(0)); + } + } + + /// + /// To be documented. + /// + public static void ScrollToRectEx(ref Vector2 pOut, ref ImGuiWindow window, ImRect rect, ImGuiScrollFlags flags) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (ImGuiWindow* pwindow = &window) + { + ScrollToRectExNative((Vector2*)ppOut, (ImGuiWindow*)pwindow, rect, flags); + } + } + } + + /// + /// To be documented. + /// + public static void ScrollToRectEx(ref Vector2 pOut, ref ImGuiWindow window, ImRect rect) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (ImGuiWindow* pwindow = &window) + { + ScrollToRectExNative((Vector2*)ppOut, (ImGuiWindow*)pwindow, rect, (ImGuiScrollFlags)(0)); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ScrollToBringRectIntoViewNative(ImGuiWindow* window, ImRect rect) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[975])(window, rect); + #else + ((delegate* unmanaged[Cdecl])funcTable[975])((nint)window, rect); + #endif + } + + /// + /// To be documented. + /// + public static void ScrollToBringRectIntoView(ImGuiWindowPtr window, ImRect rect) + { + ScrollToBringRectIntoViewNative(window, rect); + } + + /// + /// To be documented. + /// + public static void ScrollToBringRectIntoView(ref ImGuiWindow window, ImRect rect) + { + fixed (ImGuiWindow* pwindow = &window) + { + ScrollToBringRectIntoViewNative((ImGuiWindow*)pwindow, rect); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetItemIDNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[976])(); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[976])(); + #endif + } + + /// + /// To be documented. + /// + public static uint GetItemID() + { + uint ret = GetItemIDNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiItemStatusFlags GetItemStatusFlagsNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[977])(); + #else + return (ImGuiItemStatusFlags)((delegate* unmanaged[Cdecl])funcTable[977])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiItemStatusFlags GetItemStatusFlags() + { + ImGuiItemStatusFlags ret = GetItemStatusFlagsNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiItemFlags GetItemFlagsNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[978])(); + #else + return (ImGuiItemFlags)((delegate* unmanaged[Cdecl])funcTable[978])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiItemFlags GetItemFlags() + { + ImGuiItemFlags ret = GetItemFlagsNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetActiveIDNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[979])(); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[979])(); + #endif + } + + /// + /// To be documented. + /// + public static uint GetActiveID() + { + uint ret = GetActiveIDNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetFocusIDNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[980])(); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[980])(); + #endif + } + + /// + /// To be documented. + /// + public static uint GetFocusID() + { + uint ret = GetFocusIDNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetActiveIDNative(uint id, ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[981])(id, window); + #else + ((delegate* unmanaged[Cdecl])funcTable[981])(id, (nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void SetActiveID(uint id, ImGuiWindowPtr window) + { + SetActiveIDNative(id, window); + } + + /// + /// To be documented. + /// + public static void SetActiveID(uint id, ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetActiveIDNative(id, (ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetFocusIDNative(uint id, ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[982])(id, window); + #else + ((delegate* unmanaged[Cdecl])funcTable[982])(id, (nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void SetFocusID(uint id, ImGuiWindowPtr window) + { + SetFocusIDNative(id, window); + } + + /// + /// To be documented. + /// + public static void SetFocusID(uint id, ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetFocusIDNative(id, (ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearActiveIDNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[983])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[983])(); + #endif + } + + /// + /// To be documented. + /// + public static void ClearActiveID() + { + ClearActiveIDNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetHoveredIDNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[984])(); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[984])(); + #endif + } + + /// + /// To be documented. + /// + public static uint GetHoveredID() + { + uint ret = GetHoveredIDNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetHoveredIDNative(uint id) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[985])(id); + #else + ((delegate* unmanaged[Cdecl])funcTable[985])(id); + #endif + } + + /// + /// To be documented. + /// + public static void SetHoveredID(uint id) + { + SetHoveredIDNative(id); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void KeepAliveIDNative(uint id) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[986])(id); + #else + ((delegate* unmanaged[Cdecl])funcTable[986])(id); + #endif + } + + /// + /// To be documented. + /// + public static void KeepAliveID(uint id) + { + KeepAliveIDNative(id); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void MarkItemEditedNative(uint id) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[987])(id); + #else + ((delegate* unmanaged[Cdecl])funcTable[987])(id); + #endif + } + + /// + /// To be documented. + /// + public static void MarkItemEdited(uint id) + { + MarkItemEditedNative(id); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void PushOverrideIDNative(uint id) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[988])(id); + #else + ((delegate* unmanaged[Cdecl])funcTable[988])(id); + #endif + } + + /// + /// To be documented. + /// + public static void PushOverrideID(uint id) + { + PushOverrideIDNative(id); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetIDWithSeedNative(byte* strIdBegin, byte* strIdEnd, uint seed) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[989])(strIdBegin, strIdEnd, seed); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[989])((nint)strIdBegin, (nint)strIdEnd, seed); + #endif + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(byte* strIdBegin, byte* strIdEnd, uint seed) + { + uint ret = GetIDWithSeedNative(strIdBegin, strIdEnd, seed); + return ret; + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(ref byte strIdBegin, byte* strIdEnd, uint seed) + { + fixed (byte* pstrIdBegin = &strIdBegin) + { + uint ret = GetIDWithSeedNative((byte*)pstrIdBegin, strIdEnd, seed); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(ReadOnlySpan strIdBegin, byte* strIdEnd, uint seed) + { + fixed (byte* pstrIdBegin = strIdBegin) + { + uint ret = GetIDWithSeedNative((byte*)pstrIdBegin, strIdEnd, seed); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(string strIdBegin, byte* strIdEnd, uint seed) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strIdBegin != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strIdBegin); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strIdBegin, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = GetIDWithSeedNative(pStr0, strIdEnd, seed); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(byte* strIdBegin, ref byte strIdEnd, uint seed) + { + fixed (byte* pstrIdEnd = &strIdEnd) + { + uint ret = GetIDWithSeedNative(strIdBegin, (byte*)pstrIdEnd, seed); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(byte* strIdBegin, ReadOnlySpan strIdEnd, uint seed) + { + fixed (byte* pstrIdEnd = strIdEnd) + { + uint ret = GetIDWithSeedNative(strIdBegin, (byte*)pstrIdEnd, seed); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(byte* strIdBegin, string strIdEnd, uint seed) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strIdEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strIdEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strIdEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = GetIDWithSeedNative(strIdBegin, pStr0, seed); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(ref byte strIdBegin, ref byte strIdEnd, uint seed) + { + fixed (byte* pstrIdBegin = &strIdBegin) + { + fixed (byte* pstrIdEnd = &strIdEnd) + { + uint ret = GetIDWithSeedNative((byte*)pstrIdBegin, (byte*)pstrIdEnd, seed); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(ReadOnlySpan strIdBegin, ReadOnlySpan strIdEnd, uint seed) + { + fixed (byte* pstrIdBegin = strIdBegin) + { + fixed (byte* pstrIdEnd = strIdEnd) + { + uint ret = GetIDWithSeedNative((byte*)pstrIdBegin, (byte*)pstrIdEnd, seed); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(string strIdBegin, string strIdEnd, uint seed) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strIdBegin != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strIdBegin); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strIdBegin, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (strIdEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(strIdEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(strIdEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + uint ret = GetIDWithSeedNative(pStr0, pStr1, seed); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(ref byte strIdBegin, ReadOnlySpan strIdEnd, uint seed) + { + fixed (byte* pstrIdBegin = &strIdBegin) + { + fixed (byte* pstrIdEnd = strIdEnd) + { + uint ret = GetIDWithSeedNative((byte*)pstrIdBegin, (byte*)pstrIdEnd, seed); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(ref byte strIdBegin, string strIdEnd, uint seed) + { + fixed (byte* pstrIdBegin = &strIdBegin) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strIdEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strIdEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strIdEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = GetIDWithSeedNative((byte*)pstrIdBegin, pStr0, seed); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(ReadOnlySpan strIdBegin, ref byte strIdEnd, uint seed) + { + fixed (byte* pstrIdBegin = strIdBegin) + { + fixed (byte* pstrIdEnd = &strIdEnd) + { + uint ret = GetIDWithSeedNative((byte*)pstrIdBegin, (byte*)pstrIdEnd, seed); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(ReadOnlySpan strIdBegin, string strIdEnd, uint seed) + { + fixed (byte* pstrIdBegin = strIdBegin) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strIdEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strIdEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strIdEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + uint ret = GetIDWithSeedNative((byte*)pstrIdBegin, pStr0, seed); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(string strIdBegin, ref byte strIdEnd, uint seed) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strIdBegin != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strIdBegin); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strIdBegin, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pstrIdEnd = &strIdEnd) + { + uint ret = GetIDWithSeedNative(pStr0, (byte*)pstrIdEnd, seed); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetIDWithSeed(string strIdBegin, ReadOnlySpan strIdEnd, uint seed) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (strIdBegin != null) + { + pStrSize0 = Utils.GetByteCountUTF8(strIdBegin); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(strIdBegin, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pstrIdEnd = strIdEnd) + { + uint ret = GetIDWithSeedNative(pStr0, (byte*)pstrIdEnd, seed); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ItemSizeNative(Vector2 size, float textBaselineY) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[990])(size, textBaselineY); + #else + ((delegate* unmanaged[Cdecl])funcTable[990])(size, textBaselineY); + #endif + } + + /// + /// To be documented. + /// + public static void ItemSize(Vector2 size, float textBaselineY) + { + ItemSizeNative(size, textBaselineY); + } + + /// + /// To be documented. + /// + public static void ItemSize(Vector2 size) + { + ItemSizeNative(size, (float)(-1.0f)); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ItemSizeNative(ImRect bb, float textBaselineY) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[991])(bb, textBaselineY); + #else + ((delegate* unmanaged[Cdecl])funcTable[991])(bb, textBaselineY); + #endif + } + + /// + /// To be documented. + /// + public static void ItemSize(ImRect bb, float textBaselineY) + { + ItemSizeNative(bb, textBaselineY); + } + + /// + /// To be documented. + /// + public static void ItemSize(ImRect bb) + { + ItemSizeNative(bb, (float)(-1.0f)); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ItemAddNative(ImRect bb, uint id, ImRect* navBb, ImGuiItemFlags extraFlags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[992])(bb, id, navBb, extraFlags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[992])(bb, id, (nint)navBb, extraFlags); + #endif + } + + /// + /// To be documented. + /// + public static bool ItemAdd(ImRect bb, uint id, ImRectPtr navBb, ImGuiItemFlags extraFlags) + { + byte ret = ItemAddNative(bb, id, navBb, extraFlags); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ItemAdd(ImRect bb, uint id, ImRectPtr navBb) + { + byte ret = ItemAddNative(bb, id, navBb, (ImGuiItemFlags)(0)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ItemAdd(ImRect bb, uint id) + { + byte ret = ItemAddNative(bb, id, (ImRect*)(default), (ImGuiItemFlags)(0)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ItemAdd(ImRect bb, uint id, ImGuiItemFlags extraFlags) + { + byte ret = ItemAddNative(bb, id, (ImRect*)(default), extraFlags); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ItemAdd(ImRect bb, uint id, ref ImRect navBb, ImGuiItemFlags extraFlags) + { + fixed (ImRect* pnavBb = &navBb) + { + byte ret = ItemAddNative(bb, id, (ImRect*)pnavBb, extraFlags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ItemAdd(ImRect bb, uint id, ref ImRect navBb) + { + fixed (ImRect* pnavBb = &navBb) + { + byte ret = ItemAddNative(bb, id, (ImRect*)pnavBb, (ImGuiItemFlags)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ItemHoverableNative(ImRect bb, uint id) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[993])(bb, id); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[993])(bb, id); + #endif + } + + /// + /// To be documented. + /// + public static bool ItemHoverable(ImRect bb, uint id) + { + byte ret = ItemHoverableNative(bb, id); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsClippedExNative(ImRect bb, uint id) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[994])(bb, id); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[994])(bb, id); + #endif + } + + /// + /// To be documented. + /// + public static bool IsClippedEx(ImRect bb, uint id) + { + byte ret = IsClippedExNative(bb, id); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetLastItemDataNative(uint itemId, ImGuiItemFlags inFlags, ImGuiItemStatusFlags statusFlags, ImRect itemRect) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[995])(itemId, inFlags, statusFlags, itemRect); + #else + ((delegate* unmanaged[Cdecl])funcTable[995])(itemId, inFlags, statusFlags, itemRect); + #endif + } + + /// + /// To be documented. + /// + public static void SetLastItemData(uint itemId, ImGuiItemFlags inFlags, ImGuiItemStatusFlags statusFlags, ImRect itemRect) + { + SetLastItemDataNative(itemId, inFlags, statusFlags, itemRect); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void CalcItemSizeNative(Vector2* pOut, Vector2 size, float defaultW, float defaultH) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[996])(pOut, size, defaultW, defaultH); + #else + ((delegate* unmanaged[Cdecl])funcTable[996])((nint)pOut, size, defaultW, defaultH); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 CalcItemSize(Vector2 size, float defaultW, float defaultH) + { + Vector2 ret; + CalcItemSizeNative(&ret, size, defaultW, defaultH); + return ret; + } + + /// + /// To be documented. + /// + public static void CalcItemSize(Vector2* pOut, Vector2 size, float defaultW, float defaultH) + { + CalcItemSizeNative(pOut, size, defaultW, defaultH); + } + + /// + /// To be documented. + /// + public static void CalcItemSize(ref Vector2 pOut, Vector2 size, float defaultW, float defaultH) + { + fixed (Vector2* ppOut = &pOut) + { + CalcItemSizeNative((Vector2*)ppOut, size, defaultW, defaultH); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float CalcWrapWidthForPosNative(Vector2 pos, float wrapPosX) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[997])(pos, wrapPosX); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[997])(pos, wrapPosX); + #endif + } + + /// + /// To be documented. + /// + public static float CalcWrapWidthForPos(Vector2 pos, float wrapPosX) + { + float ret = CalcWrapWidthForPosNative(pos, wrapPosX); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void PushMultiItemsWidthsNative(int components, float widthFull) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[998])(components, widthFull); + #else + ((delegate* unmanaged[Cdecl])funcTable[998])(components, widthFull); + #endif + } + + /// + /// To be documented. + /// + public static void PushMultiItemsWidths(int components, float widthFull) + { + PushMultiItemsWidthsNative(components, widthFull); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsItemToggledSelectionNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[999])(); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[999])(); + #endif + } + + /// + /// To be documented. + /// + public static bool IsItemToggledSelection() + { + byte ret = IsItemToggledSelectionNative(); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetContentRegionMaxAbsNative(Vector2* pOut) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1000])(pOut); + #else + ((delegate* unmanaged[Cdecl])funcTable[1000])((nint)pOut); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 GetContentRegionMaxAbs() + { + Vector2 ret; + GetContentRegionMaxAbsNative(&ret); + return ret; + } + + /// + /// To be documented. + /// + public static void GetContentRegionMaxAbs(Vector2* pOut) + { + GetContentRegionMaxAbsNative(pOut); + } + + /// + /// To be documented. + /// + public static void GetContentRegionMaxAbs(ref Vector2 pOut) + { + fixed (Vector2* ppOut = &pOut) + { + GetContentRegionMaxAbsNative((Vector2*)ppOut); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ShrinkWidthsNative(ImGuiShrinkWidthItem* items, int count, float widthExcess) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1001])(items, count, widthExcess); + #else + ((delegate* unmanaged[Cdecl])funcTable[1001])((nint)items, count, widthExcess); + #endif + } + + /// + /// To be documented. + /// + public static void ShrinkWidths(ImGuiShrinkWidthItemPtr items, int count, float widthExcess) + { + ShrinkWidthsNative(items, count, widthExcess); + } + + /// + /// To be documented. + /// + public static void ShrinkWidths(ref ImGuiShrinkWidthItem items, int count, float widthExcess) + { + fixed (ImGuiShrinkWidthItem* pitems = &items) + { + ShrinkWidthsNative((ImGuiShrinkWidthItem*)pitems, count, widthExcess); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void PushItemFlagNative(ImGuiItemFlags option, byte enabled) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1002])(option, enabled); + #else + ((delegate* unmanaged[Cdecl])funcTable[1002])(option, enabled); + #endif + } + + /// + /// To be documented. + /// + public static void PushItemFlag(ImGuiItemFlags option, bool enabled) + { + PushItemFlagNative(option, enabled ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void PopItemFlagNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1003])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1003])(); + #endif + } + + /// + /// To be documented. + /// + public static void PopItemFlag() + { + PopItemFlagNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void LogBeginNative(ImGuiLogType type, int autoOpenDepth) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1004])(type, autoOpenDepth); + #else + ((delegate* unmanaged[Cdecl])funcTable[1004])(type, autoOpenDepth); + #endif + } + + /// + /// To be documented. + /// + public static void LogBegin(ImGuiLogType type, int autoOpenDepth) + { + LogBeginNative(type, autoOpenDepth); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void LogToBufferNative(int autoOpenDepth) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1005])(autoOpenDepth); + #else + ((delegate* unmanaged[Cdecl])funcTable[1005])(autoOpenDepth); + #endif + } + + /// + /// To be documented. + /// + public static void LogToBuffer(int autoOpenDepth) + { + LogToBufferNative(autoOpenDepth); + } + + /// + /// To be documented. + /// + public static void LogToBuffer() + { + LogToBufferNative((int)(-1)); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void LogRenderedTextNative(Vector2* refPos, byte* text, byte* textEnd) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1006])(refPos, text, textEnd); + #else + ((delegate* unmanaged[Cdecl])funcTable[1006])((nint)refPos, (nint)text, (nint)textEnd); + #endif + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, byte* text, byte* textEnd) + { + LogRenderedTextNative(refPos, text, textEnd); + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, byte* text) + { + LogRenderedTextNative(refPos, text, (byte*)(default)); + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, byte* text, byte* textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + LogRenderedTextNative((Vector2*)prefPos, text, textEnd); + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, byte* text) + { + fixed (Vector2* prefPos = &refPos) + { + LogRenderedTextNative((Vector2*)prefPos, text, (byte*)(default)); + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, ref byte text, byte* textEnd) + { + fixed (byte* ptext = &text) + { + LogRenderedTextNative(refPos, (byte*)ptext, textEnd); + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, ref byte text) + { + fixed (byte* ptext = &text) + { + LogRenderedTextNative(refPos, (byte*)ptext, (byte*)(default)); + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, ReadOnlySpan text, byte* textEnd) + { + fixed (byte* ptext = text) + { + LogRenderedTextNative(refPos, (byte*)ptext, textEnd); + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, ReadOnlySpan text) + { + fixed (byte* ptext = text) + { + LogRenderedTextNative(refPos, (byte*)ptext, (byte*)(default)); + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, string text, byte* textEnd) + { + 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; + } + LogRenderedTextNative(refPos, pStr0, textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, 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; + } + LogRenderedTextNative(refPos, pStr0, (byte*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, ref byte text, byte* textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + fixed (byte* ptext = &text) + { + LogRenderedTextNative((Vector2*)prefPos, (byte*)ptext, textEnd); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, ref byte text) + { + fixed (Vector2* prefPos = &refPos) + { + fixed (byte* ptext = &text) + { + LogRenderedTextNative((Vector2*)prefPos, (byte*)ptext, (byte*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, ReadOnlySpan text, byte* textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + fixed (byte* ptext = text) + { + LogRenderedTextNative((Vector2*)prefPos, (byte*)ptext, textEnd); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, ReadOnlySpan text) + { + fixed (Vector2* prefPos = &refPos) + { + fixed (byte* ptext = text) + { + LogRenderedTextNative((Vector2*)prefPos, (byte*)ptext, (byte*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, string text, byte* textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + 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; + } + LogRenderedTextNative((Vector2*)prefPos, pStr0, textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, string text) + { + fixed (Vector2* prefPos = &refPos) + { + 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; + } + LogRenderedTextNative((Vector2*)prefPos, pStr0, (byte*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, byte* text, ref byte textEnd) + { + fixed (byte* ptextEnd = &textEnd) + { + LogRenderedTextNative(refPos, text, (byte*)ptextEnd); + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, byte* text, ReadOnlySpan textEnd) + { + fixed (byte* ptextEnd = textEnd) + { + LogRenderedTextNative(refPos, text, (byte*)ptextEnd); + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, byte* text, string textEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + LogRenderedTextNative(refPos, text, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, byte* text, ref byte textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + fixed (byte* ptextEnd = &textEnd) + { + LogRenderedTextNative((Vector2*)prefPos, text, (byte*)ptextEnd); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, byte* text, ReadOnlySpan textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + fixed (byte* ptextEnd = textEnd) + { + LogRenderedTextNative((Vector2*)prefPos, text, (byte*)ptextEnd); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, byte* text, string textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + LogRenderedTextNative((Vector2*)prefPos, text, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, ref byte text, ref byte textEnd) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + LogRenderedTextNative(refPos, (byte*)ptext, (byte*)ptextEnd); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, ReadOnlySpan text, ReadOnlySpan textEnd) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + LogRenderedTextNative(refPos, (byte*)ptext, (byte*)ptextEnd); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, string text, string textEnd) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + LogRenderedTextNative(refPos, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, ref byte text, ReadOnlySpan textEnd) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + LogRenderedTextNative(refPos, (byte*)ptext, (byte*)ptextEnd); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, ref byte text, string textEnd) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + LogRenderedTextNative(refPos, (byte*)ptext, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, ReadOnlySpan text, ref byte textEnd) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + LogRenderedTextNative(refPos, (byte*)ptext, (byte*)ptextEnd); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, ReadOnlySpan text, string textEnd) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + LogRenderedTextNative(refPos, (byte*)ptext, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, string text, ref byte textEnd) + { + 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 (byte* ptextEnd = &textEnd) + { + LogRenderedTextNative(refPos, pStr0, (byte*)ptextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(Vector2* refPos, string text, ReadOnlySpan textEnd) + { + 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 (byte* ptextEnd = textEnd) + { + LogRenderedTextNative(refPos, pStr0, (byte*)ptextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, ref byte text, ref byte textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + LogRenderedTextNative((Vector2*)prefPos, (byte*)ptext, (byte*)ptextEnd); + } + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, ReadOnlySpan text, ReadOnlySpan textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + LogRenderedTextNative((Vector2*)prefPos, (byte*)ptext, (byte*)ptextEnd); + } + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, string text, string textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + LogRenderedTextNative((Vector2*)prefPos, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, ref byte text, ReadOnlySpan textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + LogRenderedTextNative((Vector2*)prefPos, (byte*)ptext, (byte*)ptextEnd); + } + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, ref byte text, string textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + LogRenderedTextNative((Vector2*)prefPos, (byte*)ptext, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, ReadOnlySpan text, ref byte textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + LogRenderedTextNative((Vector2*)prefPos, (byte*)ptext, (byte*)ptextEnd); + } + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, ReadOnlySpan text, string textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + LogRenderedTextNative((Vector2*)prefPos, (byte*)ptext, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, string text, ref byte textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + 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 (byte* ptextEnd = &textEnd) + { + LogRenderedTextNative((Vector2*)prefPos, pStr0, (byte*)ptextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void LogRenderedText(ref Vector2 refPos, string text, ReadOnlySpan textEnd) + { + fixed (Vector2* prefPos = &refPos) + { + 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 (byte* ptextEnd = textEnd) + { + LogRenderedTextNative((Vector2*)prefPos, pStr0, (byte*)ptextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void LogSetNextTextDecorationNative(byte* prefix, byte* suffix) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1007])(prefix, suffix); + #else + ((delegate* unmanaged[Cdecl])funcTable[1007])((nint)prefix, (nint)suffix); + #endif + } + + /// + /// To be documented. + /// + public static void LogSetNextTextDecoration(byte* prefix, byte* suffix) + { + LogSetNextTextDecorationNative(prefix, suffix); + } + + /// + /// To be documented. + /// + public static void LogSetNextTextDecoration(ref byte prefix, byte* suffix) + { + fixed (byte* pprefix = &prefix) + { + LogSetNextTextDecorationNative((byte*)pprefix, suffix); + } + } + + /// + /// To be documented. + /// + public static void LogSetNextTextDecoration(ReadOnlySpan prefix, byte* suffix) + { + fixed (byte* pprefix = prefix) + { + LogSetNextTextDecorationNative((byte*)pprefix, suffix); + } + } + + /// + /// To be documented. + /// + 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; + } + LogSetNextTextDecorationNative(pStr0, suffix); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void LogSetNextTextDecoration(byte* prefix, ref byte suffix) + { + fixed (byte* psuffix = &suffix) + { + LogSetNextTextDecorationNative(prefix, (byte*)psuffix); + } + } + + /// + /// To be documented. + /// + public static void LogSetNextTextDecoration(byte* prefix, ReadOnlySpan suffix) + { + fixed (byte* psuffix = suffix) + { + LogSetNextTextDecorationNative(prefix, (byte*)psuffix); + } + } + + /// + /// To be documented. + /// + 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; + } + LogSetNextTextDecorationNative(prefix, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void LogSetNextTextDecoration(ref byte prefix, ref byte suffix) + { + fixed (byte* pprefix = &prefix) + { + fixed (byte* psuffix = &suffix) + { + LogSetNextTextDecorationNative((byte*)pprefix, (byte*)psuffix); + } + } + } + + /// + /// To be documented. + /// + public static void LogSetNextTextDecoration(ReadOnlySpan prefix, ReadOnlySpan suffix) + { + fixed (byte* pprefix = prefix) + { + fixed (byte* psuffix = suffix) + { + LogSetNextTextDecorationNative((byte*)pprefix, (byte*)psuffix); + } + } + } + + /// + /// To be documented. + /// + 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; + } + LogSetNextTextDecorationNative(pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void LogSetNextTextDecoration(ref byte prefix, ReadOnlySpan suffix) + { + fixed (byte* pprefix = &prefix) + { + fixed (byte* psuffix = suffix) + { + LogSetNextTextDecorationNative((byte*)pprefix, (byte*)psuffix); + } + } + } + + /// + /// To be documented. + /// + 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; + } + LogSetNextTextDecorationNative((byte*)pprefix, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void LogSetNextTextDecoration(ReadOnlySpan prefix, ref byte suffix) + { + fixed (byte* pprefix = prefix) + { + fixed (byte* psuffix = &suffix) + { + LogSetNextTextDecorationNative((byte*)pprefix, (byte*)psuffix); + } + } + } + + /// + /// To be documented. + /// + 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; + } + LogSetNextTextDecorationNative((byte*)pprefix, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + 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) + { + LogSetNextTextDecorationNative(pStr0, (byte*)psuffix); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + 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) + { + LogSetNextTextDecorationNative(pStr0, (byte*)psuffix); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte BeginChildExNative(byte* name, uint id, Vector2 sizeArg, byte border, ImGuiWindowFlags flags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1008])(name, id, sizeArg, border, flags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1008])((nint)name, id, sizeArg, border, flags); + #endif + } + + /// + /// To be documented. + /// + public static bool BeginChildEx(byte* name, uint id, Vector2 sizeArg, bool border, ImGuiWindowFlags flags) + { + byte ret = BeginChildExNative(name, id, sizeArg, border ? (byte)1 : (byte)0, flags); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginChildEx(ref byte name, uint id, Vector2 sizeArg, bool border, ImGuiWindowFlags flags) + { + fixed (byte* pname = &name) + { + byte ret = BeginChildExNative((byte*)pname, id, sizeArg, border ? (byte)1 : (byte)0, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginChildEx(ReadOnlySpan name, uint id, Vector2 sizeArg, bool border, ImGuiWindowFlags flags) + { + fixed (byte* pname = name) + { + byte ret = BeginChildExNative((byte*)pname, id, sizeArg, border ? (byte)1 : (byte)0, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = BeginChildExNative(pStr0, id, sizeArg, border ? (byte)1 : (byte)0, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void OpenPopupExNative(uint id, ImGuiPopupFlags popupFlags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1009])(id, popupFlags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1009])(id, popupFlags); + #endif + } + + /// + /// To be documented. + /// + public static void OpenPopupEx(uint id, ImGuiPopupFlags popupFlags) + { + OpenPopupExNative(id, popupFlags); + } + + /// + /// To be documented. + /// + public static void OpenPopupEx(uint id) + { + OpenPopupExNative(id, (ImGuiPopupFlags)(ImGuiPopupFlags.None)); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClosePopupToLevelNative(int remaining, byte restoreFocusToWindowUnderPopup) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1010])(remaining, restoreFocusToWindowUnderPopup); + #else + ((delegate* unmanaged[Cdecl])funcTable[1010])(remaining, restoreFocusToWindowUnderPopup); + #endif + } + + /// + /// To be documented. + /// + public static void ClosePopupToLevel(int remaining, bool restoreFocusToWindowUnderPopup) + { + ClosePopupToLevelNative(remaining, restoreFocusToWindowUnderPopup ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClosePopupsOverWindowNative(ImGuiWindow* refWindow, byte restoreFocusToWindowUnderPopup) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1011])(refWindow, restoreFocusToWindowUnderPopup); + #else + ((delegate* unmanaged[Cdecl])funcTable[1011])((nint)refWindow, restoreFocusToWindowUnderPopup); + #endif + } + + /// + /// To be documented. + /// + public static void ClosePopupsOverWindow(ImGuiWindowPtr refWindow, bool restoreFocusToWindowUnderPopup) + { + ClosePopupsOverWindowNative(refWindow, restoreFocusToWindowUnderPopup ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void ClosePopupsOverWindow(ref ImGuiWindow refWindow, bool restoreFocusToWindowUnderPopup) + { + fixed (ImGuiWindow* prefWindow = &refWindow) + { + ClosePopupsOverWindowNative((ImGuiWindow*)prefWindow, restoreFocusToWindowUnderPopup ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClosePopupsExceptModalsNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1012])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1012])(); + #endif + } + + /// + /// To be documented. + /// + public static void ClosePopupsExceptModals() + { + ClosePopupsExceptModalsNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsPopupOpenNative(uint id, ImGuiPopupFlags popupFlags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1013])(id, popupFlags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1013])(id, popupFlags); + #endif + } + + /// + /// To be documented. + /// + public static bool IsPopupOpen(uint id, ImGuiPopupFlags popupFlags) + { + byte ret = IsPopupOpenNative(id, popupFlags); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte BeginPopupExNative(uint id, ImGuiWindowFlags extraFlags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1014])(id, extraFlags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1014])(id, extraFlags); + #endif + } + + /// + /// To be documented. + /// + public static bool BeginPopupEx(uint id, ImGuiWindowFlags extraFlags) + { + byte ret = BeginPopupExNative(id, extraFlags); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void BeginTooltipExNative(ImGuiTooltipFlags tooltipFlags, ImGuiWindowFlags extraWindowFlags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1015])(tooltipFlags, extraWindowFlags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1015])(tooltipFlags, extraWindowFlags); + #endif + } + + /// + /// To be documented. + /// + public static void BeginTooltipEx(ImGuiTooltipFlags tooltipFlags, ImGuiWindowFlags extraWindowFlags) + { + BeginTooltipExNative(tooltipFlags, extraWindowFlags); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetPopupAllowedExtentRectNative(ImRect* pOut, ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1016])(pOut, window); + #else + ((delegate* unmanaged[Cdecl])funcTable[1016])((nint)pOut, (nint)window); + #endif + } + + /// + /// To be documented. + /// + public static ImRect GetPopupAllowedExtentRect(ImGuiWindowPtr window) + { + ImRect ret; + GetPopupAllowedExtentRectNative(&ret, window); + return ret; + } + + /// + /// To be documented. + /// + public static void GetPopupAllowedExtentRect(ImRectPtr pOut, ImGuiWindowPtr window) + { + GetPopupAllowedExtentRectNative(pOut, window); + } + + /// + /// To be documented. + /// + public static void GetPopupAllowedExtentRect(ref ImRect pOut, ImGuiWindowPtr window) + { + fixed (ImRect* ppOut = &pOut) + { + GetPopupAllowedExtentRectNative((ImRect*)ppOut, window); + } + } + + /// + /// To be documented. + /// + public static ImRect GetPopupAllowedExtentRect(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + ImRect ret; + GetPopupAllowedExtentRectNative(&ret, (ImGuiWindow*)pwindow); + return ret; + } + } + + /// + /// To be documented. + /// + public static void GetPopupAllowedExtentRect(ImRectPtr pOut, ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + GetPopupAllowedExtentRectNative(pOut, (ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + public static void GetPopupAllowedExtentRect(ref ImRect pOut, ref ImGuiWindow window) + { + fixed (ImRect* ppOut = &pOut) + { + fixed (ImGuiWindow* pwindow = &window) + { + GetPopupAllowedExtentRectNative((ImRect*)ppOut, (ImGuiWindow*)pwindow); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiWindow* GetTopMostPopupModalNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1017])(); + #else + return (ImGuiWindow*)((delegate* unmanaged[Cdecl])funcTable[1017])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr GetTopMostPopupModal() + { + ImGuiWindowPtr ret = GetTopMostPopupModalNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiWindow* GetTopMostAndVisiblePopupModalNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1018])(); + #else + return (ImGuiWindow*)((delegate* unmanaged[Cdecl])funcTable[1018])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiWindowPtr GetTopMostAndVisiblePopupModal() + { + ImGuiWindowPtr ret = GetTopMostAndVisiblePopupModalNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void FindBestWindowPosForPopupNative(Vector2* pOut, ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1019])(pOut, window); + #else + ((delegate* unmanaged[Cdecl])funcTable[1019])((nint)pOut, (nint)window); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 FindBestWindowPosForPopup(ImGuiWindowPtr window) + { + Vector2 ret; + FindBestWindowPosForPopupNative(&ret, window); + return ret; + } + + /// + /// To be documented. + /// + public static void FindBestWindowPosForPopup(Vector2* pOut, ImGuiWindowPtr window) + { + FindBestWindowPosForPopupNative(pOut, window); + } + + /// + /// To be documented. + /// + public static void FindBestWindowPosForPopup(ref Vector2 pOut, ImGuiWindowPtr window) + { + fixed (Vector2* ppOut = &pOut) + { + FindBestWindowPosForPopupNative((Vector2*)ppOut, window); + } + } + + /// + /// To be documented. + /// + public static Vector2 FindBestWindowPosForPopup(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + Vector2 ret; + FindBestWindowPosForPopupNative(&ret, (ImGuiWindow*)pwindow); + return ret; + } + } + + /// + /// To be documented. + /// + public static void FindBestWindowPosForPopup(Vector2* pOut, ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + FindBestWindowPosForPopupNative(pOut, (ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + public static void FindBestWindowPosForPopup(ref Vector2 pOut, ref ImGuiWindow window) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (ImGuiWindow* pwindow = &window) + { + FindBestWindowPosForPopupNative((Vector2*)ppOut, (ImGuiWindow*)pwindow); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void FindBestWindowPosForPopupExNative(Vector2* pOut, Vector2 refPos, Vector2 size, ImGuiDir* lastDir, ImRect rOuter, ImRect rAvoid, ImGuiPopupPositionPolicy policy) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1020])(pOut, refPos, size, lastDir, rOuter, rAvoid, policy); + #else + ((delegate* unmanaged[Cdecl])funcTable[1020])((nint)pOut, refPos, size, (nint)lastDir, rOuter, rAvoid, policy); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 FindBestWindowPosForPopupEx(Vector2 refPos, Vector2 size, ImGuiDir* lastDir, ImRect rOuter, ImRect rAvoid, ImGuiPopupPositionPolicy policy) + { + Vector2 ret; + FindBestWindowPosForPopupExNative(&ret, refPos, size, lastDir, rOuter, rAvoid, policy); + return ret; + } + + /// + /// To be documented. + /// + public static void FindBestWindowPosForPopupEx(Vector2* pOut, Vector2 refPos, Vector2 size, ImGuiDir* lastDir, ImRect rOuter, ImRect rAvoid, ImGuiPopupPositionPolicy policy) + { + FindBestWindowPosForPopupExNative(pOut, refPos, size, lastDir, rOuter, rAvoid, policy); + } + + /// + /// To be documented. + /// + public static void FindBestWindowPosForPopupEx(ref Vector2 pOut, Vector2 refPos, Vector2 size, ImGuiDir* lastDir, ImRect rOuter, ImRect rAvoid, ImGuiPopupPositionPolicy policy) + { + fixed (Vector2* ppOut = &pOut) + { + FindBestWindowPosForPopupExNative((Vector2*)ppOut, refPos, size, lastDir, rOuter, rAvoid, policy); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte BeginViewportSideBarNative(byte* name, ImGuiViewport* viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1021])(name, viewport, dir, size, windowFlags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1021])((nint)name, (nint)viewport, dir, size, windowFlags); + #endif + } + + /// + /// To be documented. + /// + public static bool BeginViewportSideBar(byte* name, ImGuiViewportPtr viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) + { + byte ret = BeginViewportSideBarNative(name, viewport, dir, size, windowFlags); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginViewportSideBar(ref byte name, ImGuiViewportPtr viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) + { + fixed (byte* pname = &name) + { + byte ret = BeginViewportSideBarNative((byte*)pname, viewport, dir, size, windowFlags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginViewportSideBar(ReadOnlySpan name, ImGuiViewportPtr viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) + { + fixed (byte* pname = name) + { + byte ret = BeginViewportSideBarNative((byte*)pname, viewport, dir, size, windowFlags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = BeginViewportSideBarNative(pStr0, viewport, dir, size, windowFlags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginViewportSideBar(byte* name, ref ImGuiViewport viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) + { + fixed (ImGuiViewport* pviewport = &viewport) + { + byte ret = BeginViewportSideBarNative(name, (ImGuiViewport*)pviewport, dir, size, windowFlags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = BeginViewportSideBarNative((byte*)pname, (ImGuiViewport*)pviewport, dir, size, windowFlags); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = BeginViewportSideBarNative((byte*)pname, (ImGuiViewport*)pviewport, dir, size, windowFlags); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = BeginViewportSideBarNative(pStr0, (ImGuiViewport*)pviewport, dir, size, windowFlags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte BeginMenuExNative(byte* label, byte* icon, byte enabled) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1022])(label, icon, enabled); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1022])((nint)label, (nint)icon, enabled); + #endif + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(byte* label, byte* icon, bool enabled) + { + byte ret = BeginMenuExNative(label, icon, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(byte* label, byte* icon) + { + byte ret = BeginMenuExNative(label, icon, (byte)(1)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(ref byte label, byte* icon, bool enabled) + { + fixed (byte* plabel = &label) + { + byte ret = BeginMenuExNative((byte*)plabel, icon, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(ref byte label, byte* icon) + { + fixed (byte* plabel = &label) + { + byte ret = BeginMenuExNative((byte*)plabel, icon, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(ReadOnlySpan label, byte* icon, bool enabled) + { + fixed (byte* plabel = label) + { + byte ret = BeginMenuExNative((byte*)plabel, icon, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(ReadOnlySpan label, byte* icon) + { + fixed (byte* plabel = label) + { + byte ret = BeginMenuExNative((byte*)plabel, icon, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative(pStr0, icon, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative(pStr0, icon, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(byte* label, ref byte icon, bool enabled) + { + fixed (byte* picon = &icon) + { + byte ret = BeginMenuExNative(label, (byte*)picon, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(byte* label, ref byte icon) + { + fixed (byte* picon = &icon) + { + byte ret = BeginMenuExNative(label, (byte*)picon, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(byte* label, ReadOnlySpan icon, bool enabled) + { + fixed (byte* picon = icon) + { + byte ret = BeginMenuExNative(label, (byte*)picon, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(byte* label, ReadOnlySpan icon) + { + fixed (byte* picon = icon) + { + byte ret = BeginMenuExNative(label, (byte*)picon, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative(label, pStr0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative(label, pStr0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(ref byte label, ref byte icon, bool enabled) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = &icon) + { + byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(ref byte label, ref byte icon) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = &icon) + { + byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(ReadOnlySpan label, ReadOnlySpan icon, bool enabled) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = icon) + { + byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(ReadOnlySpan label, ReadOnlySpan icon) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = icon) + { + byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative(pStr0, pStr1, enabled ? (byte)1 : (byte)0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative(pStr0, pStr1, (byte)(1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(ref byte label, ReadOnlySpan icon, bool enabled) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = icon) + { + byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(ref byte label, ReadOnlySpan icon) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = icon) + { + byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative((byte*)plabel, pStr0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative((byte*)plabel, pStr0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(ReadOnlySpan label, ref byte icon, bool enabled) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = &icon) + { + byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool BeginMenuEx(ReadOnlySpan label, ref byte icon) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = &icon) + { + byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative((byte*)plabel, pStr0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative((byte*)plabel, pStr0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative(pStr0, (byte*)picon, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative(pStr0, (byte*)picon, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative(pStr0, (byte*)picon, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = BeginMenuExNative(pStr0, (byte*)picon, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte MenuItemExNative(byte* label, byte* icon, byte* shortcut, byte selected, byte enabled) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1023])(label, icon, shortcut, selected, enabled); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1023])((nint)label, (nint)icon, (nint)shortcut, selected, enabled); + #endif + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, byte* icon, byte* shortcut, bool selected, bool enabled) + { + byte ret = MenuItemExNative(label, icon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, byte* icon, byte* shortcut, bool selected) + { + byte ret = MenuItemExNative(label, icon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, byte* icon, byte* shortcut) + { + byte ret = MenuItemExNative(label, icon, shortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, byte* icon) + { + byte ret = MenuItemExNative(label, icon, (byte*)(default), (byte)(0), (byte)(1)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, byte* icon, bool selected) + { + byte ret = MenuItemExNative(label, icon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, byte* icon, bool selected, bool enabled) + { + byte ret = MenuItemExNative(label, icon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, byte* icon, byte* shortcut, bool selected, bool enabled) + { + fixed (byte* plabel = &label) + { + byte ret = MenuItemExNative((byte*)plabel, icon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, byte* icon, byte* shortcut, bool selected) + { + fixed (byte* plabel = &label) + { + byte ret = MenuItemExNative((byte*)plabel, icon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, byte* icon, byte* shortcut) + { + fixed (byte* plabel = &label) + { + byte ret = MenuItemExNative((byte*)plabel, icon, shortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, byte* icon) + { + fixed (byte* plabel = &label) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)(default), (byte)(0), (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, byte* icon, bool selected) + { + fixed (byte* plabel = &label) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, byte* icon, bool selected, bool enabled) + { + fixed (byte* plabel = &label) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, byte* icon, byte* shortcut, bool selected, bool enabled) + { + fixed (byte* plabel = label) + { + byte ret = MenuItemExNative((byte*)plabel, icon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, byte* icon, byte* shortcut, bool selected) + { + fixed (byte* plabel = label) + { + byte ret = MenuItemExNative((byte*)plabel, icon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, byte* icon, byte* shortcut) + { + fixed (byte* plabel = label) + { + byte ret = MenuItemExNative((byte*)plabel, icon, shortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, byte* icon) + { + fixed (byte* plabel = label) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)(default), (byte)(0), (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, byte* icon, bool selected) + { + fixed (byte* plabel = label) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, byte* icon, bool selected, bool enabled) + { + fixed (byte* plabel = label) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, shortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, (byte*)(default), (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.009.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.009.cs new file mode 100644 index 000000000..1c9a13c44 --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.009.cs @@ -0,0 +1,5049 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ref byte icon, byte* shortcut, bool selected, bool enabled) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative(label, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ref byte icon, byte* shortcut, bool selected) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative(label, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ref byte icon, byte* shortcut) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative(label, (byte*)picon, shortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ref byte icon) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ref byte icon, bool selected) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ref byte icon, bool selected, bool enabled) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ReadOnlySpan icon, byte* shortcut, bool selected, bool enabled) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative(label, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ReadOnlySpan icon, byte* shortcut, bool selected) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative(label, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ReadOnlySpan icon, byte* shortcut) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative(label, (byte*)picon, shortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ReadOnlySpan icon) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ReadOnlySpan icon, bool selected) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ReadOnlySpan icon, bool selected, bool enabled) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, shortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, (byte*)(default), (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, ref byte icon, byte* shortcut, bool selected) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, ref byte icon, byte* shortcut) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, ref byte icon) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, ref byte icon, bool selected) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, ref byte icon, bool selected, bool enabled) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, byte* shortcut, bool selected, bool enabled) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, byte* shortcut, bool selected) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, byte* shortcut) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, bool selected) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, bool selected, bool enabled) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, pStr1, shortcut, (byte)(0), (byte)(1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, byte* shortcut, bool selected) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, byte* shortcut) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, ReadOnlySpan icon) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, bool selected) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, bool selected, bool enabled) + { + fixed (byte* plabel = &label) + { + fixed (byte* picon = icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, shortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, (byte*)(default), (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, byte* shortcut, bool selected) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, byte* shortcut) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, ref byte icon) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, bool selected) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, bool selected, bool enabled) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = &icon) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, shortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, (byte*)(default), (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, shortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, shortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, byte* icon, ref byte shortcut, bool selected, bool enabled) + { + fixed (byte* pshortcut = &shortcut) + { + byte ret = MenuItemExNative(label, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, byte* icon, ref byte shortcut, bool selected) + { + fixed (byte* pshortcut = &shortcut) + { + byte ret = MenuItemExNative(label, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, byte* icon, ref byte shortcut) + { + fixed (byte* pshortcut = &shortcut) + { + byte ret = MenuItemExNative(label, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, byte* icon, ReadOnlySpan shortcut, bool selected, bool enabled) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative(label, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, byte* icon, ReadOnlySpan shortcut, bool selected) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative(label, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, byte* icon, ReadOnlySpan shortcut) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative(label, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, icon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, icon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, icon, pStr0, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, byte* icon, ref byte shortcut, bool selected) + { + fixed (byte* plabel = &label) + { + fixed (byte* pshortcut = &shortcut) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, byte* icon, ref byte shortcut) + { + fixed (byte* plabel = &label) + { + fixed (byte* pshortcut = &shortcut) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ReadOnlySpan shortcut, bool selected, bool enabled) + { + fixed (byte* plabel = label) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ReadOnlySpan shortcut, bool selected) + { + fixed (byte* plabel = label) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ReadOnlySpan shortcut) + { + fixed (byte* plabel = label) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, pStr1, (byte)(0), (byte)(1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, byte* icon, ReadOnlySpan shortcut, bool selected) + { + fixed (byte* plabel = &label) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ref byte label, byte* icon, ReadOnlySpan shortcut) + { + fixed (byte* plabel = &label) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, icon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, icon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, icon, pStr0, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ref byte shortcut, bool selected) + { + fixed (byte* plabel = label) + { + fixed (byte* pshortcut = &shortcut) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ref byte shortcut) + { + fixed (byte* plabel = label) + { + fixed (byte* pshortcut = &shortcut) + { + byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, icon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, icon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, icon, pStr0, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ref byte icon, ref byte shortcut, bool selected) + { + fixed (byte* picon = &icon) + { + fixed (byte* pshortcut = &shortcut) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ref byte icon, ref byte shortcut) + { + fixed (byte* picon = &icon) + { + fixed (byte* pshortcut = &shortcut) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ReadOnlySpan shortcut, bool selected, bool enabled) + { + fixed (byte* picon = icon) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ReadOnlySpan shortcut, bool selected) + { + fixed (byte* picon = icon) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ReadOnlySpan shortcut) + { + fixed (byte* picon = icon) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, pStr1, (byte)(0), (byte)(1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ref byte icon, ReadOnlySpan shortcut, bool selected) + { + fixed (byte* picon = &icon) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ref byte icon, ReadOnlySpan shortcut) + { + fixed (byte* picon = &icon) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, (byte*)picon, pStr0, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ref byte shortcut, bool selected) + { + fixed (byte* picon = icon) + { + fixed (byte* pshortcut = &shortcut) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ref byte shortcut) + { + fixed (byte* picon = icon) + { + fixed (byte* pshortcut = &shortcut) + { + byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, (byte*)picon, pStr0, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(label, pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, ReadOnlySpan shortcut) + { + fixed (byte* plabel = label) + { + fixed (byte* picon = icon) + { + fixed (byte* pshortcut = shortcut) + { + byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, pStr0, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, pStr0, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, pStr0, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, (byte*)picon, pStr0, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.010.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.010.cs new file mode 100644 index 000000000..4c075cffa --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.010.cs @@ -0,0 +1,5027 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((byte*)plabel, pStr0, (byte*)pshortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative((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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(pStr0, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + 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 = MenuItemExNative(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; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte BeginComboPopupNative(uint popupId, ImRect bb, ImGuiComboFlags flags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1024])(popupId, bb, flags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1024])(popupId, bb, flags); + #endif + } + + /// + /// To be documented. + /// + public static bool BeginComboPopup(uint popupId, ImRect bb, ImGuiComboFlags flags) + { + byte ret = BeginComboPopupNative(popupId, bb, flags); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte BeginComboPreviewNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1025])(); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1025])(); + #endif + } + + /// + /// To be documented. + /// + public static bool BeginComboPreview() + { + byte ret = BeginComboPreviewNative(); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void EndComboPreviewNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1026])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1026])(); + #endif + } + + /// + /// To be documented. + /// + public static void EndComboPreview() + { + EndComboPreviewNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void NavInitWindowNative(ImGuiWindow* window, byte forceReinit) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1027])(window, forceReinit); + #else + ((delegate* unmanaged[Cdecl])funcTable[1027])((nint)window, forceReinit); + #endif + } + + /// + /// To be documented. + /// + public static void NavInitWindow(ImGuiWindowPtr window, bool forceReinit) + { + NavInitWindowNative(window, forceReinit ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void NavInitWindow(ref ImGuiWindow window, bool forceReinit) + { + fixed (ImGuiWindow* pwindow = &window) + { + NavInitWindowNative((ImGuiWindow*)pwindow, forceReinit ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void NavInitRequestApplyResultNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1028])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1028])(); + #endif + } + + /// + /// To be documented. + /// + public static void NavInitRequestApplyResult() + { + NavInitRequestApplyResultNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte NavMoveRequestButNoResultYetNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1029])(); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1029])(); + #endif + } + + /// + /// To be documented. + /// + public static bool NavMoveRequestButNoResultYet() + { + byte ret = NavMoveRequestButNoResultYetNative(); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void NavMoveRequestSubmitNative(ImGuiDir moveDir, ImGuiDir clipDir, ImGuiNavMoveFlags moveFlags, ImGuiScrollFlags scrollFlags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1030])(moveDir, clipDir, moveFlags, scrollFlags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1030])(moveDir, clipDir, moveFlags, scrollFlags); + #endif + } + + /// + /// To be documented. + /// + public static void NavMoveRequestSubmit(ImGuiDir moveDir, ImGuiDir clipDir, ImGuiNavMoveFlags moveFlags, ImGuiScrollFlags scrollFlags) + { + NavMoveRequestSubmitNative(moveDir, clipDir, moveFlags, scrollFlags); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void NavMoveRequestForwardNative(ImGuiDir moveDir, ImGuiDir clipDir, ImGuiNavMoveFlags moveFlags, ImGuiScrollFlags scrollFlags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1031])(moveDir, clipDir, moveFlags, scrollFlags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1031])(moveDir, clipDir, moveFlags, scrollFlags); + #endif + } + + /// + /// To be documented. + /// + public static void NavMoveRequestForward(ImGuiDir moveDir, ImGuiDir clipDir, ImGuiNavMoveFlags moveFlags, ImGuiScrollFlags scrollFlags) + { + NavMoveRequestForwardNative(moveDir, clipDir, moveFlags, scrollFlags); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void NavMoveRequestResolveWithLastItemNative(ImGuiNavItemData* result) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1032])(result); + #else + ((delegate* unmanaged[Cdecl])funcTable[1032])((nint)result); + #endif + } + + /// + /// To be documented. + /// + public static void NavMoveRequestResolveWithLastItem(ImGuiNavItemDataPtr result) + { + NavMoveRequestResolveWithLastItemNative(result); + } + + /// + /// To be documented. + /// + public static void NavMoveRequestResolveWithLastItem(ref ImGuiNavItemData result) + { + fixed (ImGuiNavItemData* presult = &result) + { + NavMoveRequestResolveWithLastItemNative((ImGuiNavItemData*)presult); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void NavMoveRequestCancelNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1033])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1033])(); + #endif + } + + /// + /// To be documented. + /// + public static void NavMoveRequestCancel() + { + NavMoveRequestCancelNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void NavMoveRequestApplyResultNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1034])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1034])(); + #endif + } + + /// + /// To be documented. + /// + public static void NavMoveRequestApplyResult() + { + NavMoveRequestApplyResultNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void NavMoveRequestTryWrappingNative(ImGuiWindow* window, ImGuiNavMoveFlags moveFlags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1035])(window, moveFlags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1035])((nint)window, moveFlags); + #endif + } + + /// + /// To be documented. + /// + public static void NavMoveRequestTryWrapping(ImGuiWindowPtr window, ImGuiNavMoveFlags moveFlags) + { + NavMoveRequestTryWrappingNative(window, moveFlags); + } + + /// + /// To be documented. + /// + public static void NavMoveRequestTryWrapping(ref ImGuiWindow window, ImGuiNavMoveFlags moveFlags) + { + fixed (ImGuiWindow* pwindow = &window) + { + NavMoveRequestTryWrappingNative((ImGuiWindow*)pwindow, moveFlags); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* GetNavInputNameNative(ImGuiNavInput n) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1036])(n); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[1036])(n); + #endif + } + + /// + /// To be documented. + /// + public static byte* GetNavInputName(ImGuiNavInput n) + { + byte* ret = GetNavInputNameNative(n); + return ret; + } + + /// + /// To be documented. + /// + public static string GetNavInputNameS(ImGuiNavInput n) + { + string ret = Utils.DecodeStringUTF8(GetNavInputNameNative(n)); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float GetNavInputAmountNative(ImGuiNavInput n, ImGuiNavReadMode mode) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1037])(n, mode); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[1037])(n, mode); + #endif + } + + /// + /// To be documented. + /// + public static float GetNavInputAmount(ImGuiNavInput n, ImGuiNavReadMode mode) + { + float ret = GetNavInputAmountNative(n, mode); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetNavInputAmount2dNative(Vector2* pOut, ImGuiNavDirSourceFlags dirSources, ImGuiNavReadMode mode, float slowFactor, float fastFactor) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1038])(pOut, dirSources, mode, slowFactor, fastFactor); + #else + ((delegate* unmanaged[Cdecl])funcTable[1038])((nint)pOut, dirSources, mode, slowFactor, fastFactor); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 GetNavInputAmount2d(ImGuiNavDirSourceFlags dirSources, ImGuiNavReadMode mode) + { + Vector2 ret; + GetNavInputAmount2dNative(&ret, dirSources, mode, (float)(0.0f), (float)(0.0f)); + return ret; + } + + /// + /// To be documented. + /// + public static Vector2 GetNavInputAmount2d(ImGuiNavDirSourceFlags dirSources, ImGuiNavReadMode mode, float slowFactor) + { + Vector2 ret; + GetNavInputAmount2dNative(&ret, dirSources, mode, slowFactor, (float)(0.0f)); + return ret; + } + + /// + /// To be documented. + /// + public static void GetNavInputAmount2d(Vector2* pOut, ImGuiNavDirSourceFlags dirSources, ImGuiNavReadMode mode) + { + GetNavInputAmount2dNative(pOut, dirSources, mode, (float)(0.0f), (float)(0.0f)); + } + + /// + /// To be documented. + /// + public static Vector2 GetNavInputAmount2d(ImGuiNavDirSourceFlags dirSources, ImGuiNavReadMode mode, float slowFactor, float fastFactor) + { + Vector2 ret; + GetNavInputAmount2dNative(&ret, dirSources, mode, slowFactor, fastFactor); + return ret; + } + + /// + /// To be documented. + /// + public static void GetNavInputAmount2d(Vector2* pOut, ImGuiNavDirSourceFlags dirSources, ImGuiNavReadMode mode, float slowFactor, float fastFactor) + { + GetNavInputAmount2dNative(pOut, dirSources, mode, slowFactor, fastFactor); + } + + /// + /// To be documented. + /// + public static void GetNavInputAmount2d(Vector2* pOut, ImGuiNavDirSourceFlags dirSources, ImGuiNavReadMode mode, float slowFactor) + { + GetNavInputAmount2dNative(pOut, dirSources, mode, slowFactor, (float)(0.0f)); + } + + /// + /// To be documented. + /// + public static void GetNavInputAmount2d(ref Vector2 pOut, ImGuiNavDirSourceFlags dirSources, ImGuiNavReadMode mode, float slowFactor, float fastFactor) + { + fixed (Vector2* ppOut = &pOut) + { + GetNavInputAmount2dNative((Vector2*)ppOut, dirSources, mode, slowFactor, fastFactor); + } + } + + /// + /// To be documented. + /// + public static void GetNavInputAmount2d(ref Vector2 pOut, ImGuiNavDirSourceFlags dirSources, ImGuiNavReadMode mode, float slowFactor) + { + fixed (Vector2* ppOut = &pOut) + { + GetNavInputAmount2dNative((Vector2*)ppOut, dirSources, mode, slowFactor, (float)(0.0f)); + } + } + + /// + /// To be documented. + /// + public static void GetNavInputAmount2d(ref Vector2 pOut, ImGuiNavDirSourceFlags dirSources, ImGuiNavReadMode mode) + { + fixed (Vector2* ppOut = &pOut) + { + GetNavInputAmount2dNative((Vector2*)ppOut, dirSources, mode, (float)(0.0f), (float)(0.0f)); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int CalcTypematicRepeatAmountNative(float t0, float t1, float repeatDelay, float repeatRate) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1039])(t0, t1, repeatDelay, repeatRate); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[1039])(t0, t1, repeatDelay, repeatRate); + #endif + } + + /// + /// To be documented. + /// + public static int CalcTypematicRepeatAmount(float t0, float t1, float repeatDelay, float repeatRate) + { + int ret = CalcTypematicRepeatAmountNative(t0, t1, repeatDelay, repeatRate); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ActivateItemNative(uint id) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1040])(id); + #else + ((delegate* unmanaged[Cdecl])funcTable[1040])(id); + #endif + } + + /// + /// To be documented. + /// + public static void ActivateItem(uint id) + { + ActivateItemNative(id); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetNavWindowNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1041])(window); + #else + ((delegate* unmanaged[Cdecl])funcTable[1041])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void SetNavWindow(ImGuiWindowPtr window) + { + SetNavWindowNative(window); + } + + /// + /// To be documented. + /// + public static void SetNavWindow(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetNavWindowNative((ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetNavIDNative(uint id, ImGuiNavLayer navLayer, uint focusScopeId, ImRect rectRel) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1042])(id, navLayer, focusScopeId, rectRel); + #else + ((delegate* unmanaged[Cdecl])funcTable[1042])(id, navLayer, focusScopeId, rectRel); + #endif + } + + /// + /// To be documented. + /// + public static void SetNavID(uint id, ImGuiNavLayer navLayer, uint focusScopeId, ImRect rectRel) + { + SetNavIDNative(id, navLayer, focusScopeId, rectRel); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void PushFocusScopeNative(uint id) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1043])(id); + #else + ((delegate* unmanaged[Cdecl])funcTable[1043])(id); + #endif + } + + /// + /// To be documented. + /// + public static void PushFocusScope(uint id) + { + PushFocusScopeNative(id); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void PopFocusScopeNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1044])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1044])(); + #endif + } + + /// + /// To be documented. + /// + public static void PopFocusScope() + { + PopFocusScopeNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetFocusedFocusScopeNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1045])(); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[1045])(); + #endif + } + + /// + /// To be documented. + /// + public static uint GetFocusedFocusScope() + { + uint ret = GetFocusedFocusScopeNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetFocusScopeNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1046])(); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[1046])(); + #endif + } + + /// + /// To be documented. + /// + public static uint GetFocusScope() + { + uint ret = GetFocusScopeNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsNamedKeyNative(ImGuiKey key) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1047])(key); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1047])(key); + #endif + } + + /// + /// To be documented. + /// + public static bool IsNamedKey(ImGuiKey key) + { + byte ret = IsNamedKeyNative(key); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsLegacyKeyNative(ImGuiKey key) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1048])(key); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1048])(key); + #endif + } + + /// + /// To be documented. + /// + public static bool IsLegacyKey(ImGuiKey key) + { + byte ret = IsLegacyKeyNative(key); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsGamepadKeyNative(ImGuiKey key) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1049])(key); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1049])(key); + #endif + } + + /// + /// To be documented. + /// + public static bool IsGamepadKey(ImGuiKey key) + { + byte ret = IsGamepadKeyNative(key); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiKeyData* GetKeyDataNative(ImGuiKey key) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1050])(key); + #else + return (ImGuiKeyData*)((delegate* unmanaged[Cdecl])funcTable[1050])(key); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiKeyDataPtr GetKeyData(ImGuiKey key) + { + ImGuiKeyDataPtr ret = GetKeyDataNative(key); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetItemUsingMouseWheelNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1051])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1051])(); + #endif + } + + /// + /// To be documented. + /// + public static void SetItemUsingMouseWheel() + { + SetItemUsingMouseWheelNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetActiveIdUsingNavAndKeysNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1052])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1052])(); + #endif + } + + /// + /// To be documented. + /// + public static void SetActiveIdUsingNavAndKeys() + { + SetActiveIdUsingNavAndKeysNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsActiveIdUsingNavDirNative(ImGuiDir dir) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1053])(dir); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1053])(dir); + #endif + } + + /// + /// To be documented. + /// + public static bool IsActiveIdUsingNavDir(ImGuiDir dir) + { + byte ret = IsActiveIdUsingNavDirNative(dir); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsActiveIdUsingNavInputNative(ImGuiNavInput input) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1054])(input); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1054])(input); + #endif + } + + /// + /// To be documented. + /// + public static bool IsActiveIdUsingNavInput(ImGuiNavInput input) + { + byte ret = IsActiveIdUsingNavInputNative(input); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsActiveIdUsingKeyNative(ImGuiKey key) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1055])(key); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1055])(key); + #endif + } + + /// + /// To be documented. + /// + public static bool IsActiveIdUsingKey(ImGuiKey key) + { + byte ret = IsActiveIdUsingKeyNative(key); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetActiveIdUsingKeyNative(ImGuiKey key) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1056])(key); + #else + ((delegate* unmanaged[Cdecl])funcTable[1056])(key); + #endif + } + + /// + /// To be documented. + /// + public static void SetActiveIdUsingKey(ImGuiKey key) + { + SetActiveIdUsingKeyNative(key); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsMouseDragPastThresholdNative(ImGuiMouseButton button, float lockThreshold) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1057])(button, lockThreshold); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1057])(button, lockThreshold); + #endif + } + + /// + /// To be documented. + /// + public static bool IsMouseDragPastThreshold(ImGuiMouseButton button, float lockThreshold) + { + byte ret = IsMouseDragPastThresholdNative(button, lockThreshold); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsMouseDragPastThreshold(ImGuiMouseButton button) + { + byte ret = IsMouseDragPastThresholdNative(button, (float)(-1.0f)); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsNavInputDownNative(ImGuiNavInput n) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1058])(n); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1058])(n); + #endif + } + + /// + /// To be documented. + /// + public static bool IsNavInputDown(ImGuiNavInput n) + { + byte ret = IsNavInputDownNative(n); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsNavInputTestNative(ImGuiNavInput n, ImGuiNavReadMode rm) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1059])(n, rm); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1059])(n, rm); + #endif + } + + /// + /// To be documented. + /// + public static bool IsNavInputTest(ImGuiNavInput n, ImGuiNavReadMode rm) + { + byte ret = IsNavInputTestNative(n, rm); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiModFlags GetMergedModFlagsNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1060])(); + #else + return (ImGuiModFlags)((delegate* unmanaged[Cdecl])funcTable[1060])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiModFlags GetMergedModFlags() + { + ImGuiModFlags ret = GetMergedModFlagsNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsKeyPressedMapNative(ImGuiKey key, byte repeat) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1061])(key, repeat); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1061])(key, repeat); + #endif + } + + /// + /// To be documented. + /// + public static bool IsKeyPressedMap(ImGuiKey key, bool repeat) + { + byte ret = IsKeyPressedMapNative(key, repeat ? (byte)1 : (byte)0); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool IsKeyPressedMap(ImGuiKey key) + { + byte ret = IsKeyPressedMapNative(key, (byte)(1)); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockContextInitializeNative(ImGuiContext* ctx) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1062])(ctx); + #else + ((delegate* unmanaged[Cdecl])funcTable[1062])((nint)ctx); + #endif + } + + /// + /// To be documented. + /// + public static void DockContextInitialize(ImGuiContextPtr ctx) + { + DockContextInitializeNative(ctx); + } + + /// + /// To be documented. + /// + public static void DockContextInitialize(ref ImGuiContext ctx) + { + fixed (ImGuiContext* pctx = &ctx) + { + DockContextInitializeNative((ImGuiContext*)pctx); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockContextShutdownNative(ImGuiContext* ctx) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1063])(ctx); + #else + ((delegate* unmanaged[Cdecl])funcTable[1063])((nint)ctx); + #endif + } + + /// + /// To be documented. + /// + public static void DockContextShutdown(ImGuiContextPtr ctx) + { + DockContextShutdownNative(ctx); + } + + /// + /// To be documented. + /// + public static void DockContextShutdown(ref ImGuiContext ctx) + { + fixed (ImGuiContext* pctx = &ctx) + { + DockContextShutdownNative((ImGuiContext*)pctx); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockContextClearNodesNative(ImGuiContext* ctx, uint rootId, byte clearSettingsRefs) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1064])(ctx, rootId, clearSettingsRefs); + #else + ((delegate* unmanaged[Cdecl])funcTable[1064])((nint)ctx, rootId, clearSettingsRefs); + #endif + } + + /// + /// To be documented. + /// + public static void DockContextClearNodes(ImGuiContextPtr ctx, uint rootId, bool clearSettingsRefs) + { + DockContextClearNodesNative(ctx, rootId, clearSettingsRefs ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void DockContextClearNodes(ref ImGuiContext ctx, uint rootId, bool clearSettingsRefs) + { + fixed (ImGuiContext* pctx = &ctx) + { + DockContextClearNodesNative((ImGuiContext*)pctx, rootId, clearSettingsRefs ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockContextRebuildNodesNative(ImGuiContext* ctx) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1065])(ctx); + #else + ((delegate* unmanaged[Cdecl])funcTable[1065])((nint)ctx); + #endif + } + + /// + /// To be documented. + /// + public static void DockContextRebuildNodes(ImGuiContextPtr ctx) + { + DockContextRebuildNodesNative(ctx); + } + + /// + /// To be documented. + /// + public static void DockContextRebuildNodes(ref ImGuiContext ctx) + { + fixed (ImGuiContext* pctx = &ctx) + { + DockContextRebuildNodesNative((ImGuiContext*)pctx); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockContextNewFrameUpdateUndockingNative(ImGuiContext* ctx) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1066])(ctx); + #else + ((delegate* unmanaged[Cdecl])funcTable[1066])((nint)ctx); + #endif + } + + /// + /// To be documented. + /// + public static void DockContextNewFrameUpdateUndocking(ImGuiContextPtr ctx) + { + DockContextNewFrameUpdateUndockingNative(ctx); + } + + /// + /// To be documented. + /// + public static void DockContextNewFrameUpdateUndocking(ref ImGuiContext ctx) + { + fixed (ImGuiContext* pctx = &ctx) + { + DockContextNewFrameUpdateUndockingNative((ImGuiContext*)pctx); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockContextNewFrameUpdateDockingNative(ImGuiContext* ctx) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1067])(ctx); + #else + ((delegate* unmanaged[Cdecl])funcTable[1067])((nint)ctx); + #endif + } + + /// + /// To be documented. + /// + public static void DockContextNewFrameUpdateDocking(ImGuiContextPtr ctx) + { + DockContextNewFrameUpdateDockingNative(ctx); + } + + /// + /// To be documented. + /// + public static void DockContextNewFrameUpdateDocking(ref ImGuiContext ctx) + { + fixed (ImGuiContext* pctx = &ctx) + { + DockContextNewFrameUpdateDockingNative((ImGuiContext*)pctx); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockContextEndFrameNative(ImGuiContext* ctx) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1068])(ctx); + #else + ((delegate* unmanaged[Cdecl])funcTable[1068])((nint)ctx); + #endif + } + + /// + /// To be documented. + /// + public static void DockContextEndFrame(ImGuiContextPtr ctx) + { + DockContextEndFrameNative(ctx); + } + + /// + /// To be documented. + /// + public static void DockContextEndFrame(ref ImGuiContext ctx) + { + fixed (ImGuiContext* pctx = &ctx) + { + DockContextEndFrameNative((ImGuiContext*)pctx); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint DockContextGenNodeIDNative(ImGuiContext* ctx) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1069])(ctx); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[1069])((nint)ctx); + #endif + } + + /// + /// To be documented. + /// + public static uint DockContextGenNodeID(ImGuiContextPtr ctx) + { + uint ret = DockContextGenNodeIDNative(ctx); + return ret; + } + + /// + /// To be documented. + /// + public static uint DockContextGenNodeID(ref ImGuiContext ctx) + { + fixed (ImGuiContext* pctx = &ctx) + { + uint ret = DockContextGenNodeIDNative((ImGuiContext*)pctx); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockContextQueueDockNative(ImGuiContext* ctx, ImGuiWindow* target, ImGuiDockNode* targetNode, ImGuiWindow* payload, ImGuiDir splitDir, float splitRatio, byte splitOuter) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1070])(ctx, target, targetNode, payload, splitDir, splitRatio, splitOuter); + #else + ((delegate* unmanaged[Cdecl])funcTable[1070])((nint)ctx, (nint)target, (nint)targetNode, (nint)payload, splitDir, splitRatio, splitOuter); + #endif + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ImGuiContextPtr ctx, ImGuiWindowPtr target, ImGuiDockNodePtr targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + DockContextQueueDockNative(ctx, target, targetNode, payload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ref ImGuiContext ctx, ImGuiWindowPtr target, ImGuiDockNodePtr targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiContext* pctx = &ctx) + { + DockContextQueueDockNative((ImGuiContext*)pctx, target, targetNode, payload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ImGuiContextPtr ctx, ref ImGuiWindow target, ImGuiDockNodePtr targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiWindow* ptarget = &target) + { + DockContextQueueDockNative(ctx, (ImGuiWindow*)ptarget, targetNode, payload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ref ImGuiContext ctx, ref ImGuiWindow target, ImGuiDockNodePtr targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiContext* pctx = &ctx) + { + fixed (ImGuiWindow* ptarget = &target) + { + DockContextQueueDockNative((ImGuiContext*)pctx, (ImGuiWindow*)ptarget, targetNode, payload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ImGuiContextPtr ctx, ImGuiWindowPtr target, ref ImGuiDockNode targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + DockContextQueueDockNative(ctx, target, (ImGuiDockNode*)ptargetNode, payload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ref ImGuiContext ctx, ImGuiWindowPtr target, ref ImGuiDockNode targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiContext* pctx = &ctx) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + DockContextQueueDockNative((ImGuiContext*)pctx, target, (ImGuiDockNode*)ptargetNode, payload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ImGuiContextPtr ctx, ref ImGuiWindow target, ref ImGuiDockNode targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + DockContextQueueDockNative(ctx, (ImGuiWindow*)ptarget, (ImGuiDockNode*)ptargetNode, payload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ref ImGuiContext ctx, ref ImGuiWindow target, ref ImGuiDockNode targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiContext* pctx = &ctx) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + DockContextQueueDockNative((ImGuiContext*)pctx, (ImGuiWindow*)ptarget, (ImGuiDockNode*)ptargetNode, payload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ImGuiContextPtr ctx, ImGuiWindowPtr target, ImGuiDockNodePtr targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiWindow* ppayload = &payload) + { + DockContextQueueDockNative(ctx, target, targetNode, (ImGuiWindow*)ppayload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ref ImGuiContext ctx, ImGuiWindowPtr target, ImGuiDockNodePtr targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiContext* pctx = &ctx) + { + fixed (ImGuiWindow* ppayload = &payload) + { + DockContextQueueDockNative((ImGuiContext*)pctx, target, targetNode, (ImGuiWindow*)ppayload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ImGuiContextPtr ctx, ref ImGuiWindow target, ImGuiDockNodePtr targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (ImGuiWindow* ppayload = &payload) + { + DockContextQueueDockNative(ctx, (ImGuiWindow*)ptarget, targetNode, (ImGuiWindow*)ppayload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ref ImGuiContext ctx, ref ImGuiWindow target, ImGuiDockNodePtr targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiContext* pctx = &ctx) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (ImGuiWindow* ppayload = &payload) + { + DockContextQueueDockNative((ImGuiContext*)pctx, (ImGuiWindow*)ptarget, targetNode, (ImGuiWindow*)ppayload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ImGuiContextPtr ctx, ImGuiWindowPtr target, ref ImGuiDockNode targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + fixed (ImGuiWindow* ppayload = &payload) + { + DockContextQueueDockNative(ctx, target, (ImGuiDockNode*)ptargetNode, (ImGuiWindow*)ppayload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ref ImGuiContext ctx, ImGuiWindowPtr target, ref ImGuiDockNode targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiContext* pctx = &ctx) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + fixed (ImGuiWindow* ppayload = &payload) + { + DockContextQueueDockNative((ImGuiContext*)pctx, target, (ImGuiDockNode*)ptargetNode, (ImGuiWindow*)ppayload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ImGuiContextPtr ctx, ref ImGuiWindow target, ref ImGuiDockNode targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + fixed (ImGuiWindow* ppayload = &payload) + { + DockContextQueueDockNative(ctx, (ImGuiWindow*)ptarget, (ImGuiDockNode*)ptargetNode, (ImGuiWindow*)ppayload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueDock(ref ImGuiContext ctx, ref ImGuiWindow target, ref ImGuiDockNode targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, float splitRatio, bool splitOuter) + { + fixed (ImGuiContext* pctx = &ctx) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + fixed (ImGuiWindow* ppayload = &payload) + { + DockContextQueueDockNative((ImGuiContext*)pctx, (ImGuiWindow*)ptarget, (ImGuiDockNode*)ptargetNode, (ImGuiWindow*)ppayload, splitDir, splitRatio, splitOuter ? (byte)1 : (byte)0); + } + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockContextQueueUndockWindowNative(ImGuiContext* ctx, ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1071])(ctx, window); + #else + ((delegate* unmanaged[Cdecl])funcTable[1071])((nint)ctx, (nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void DockContextQueueUndockWindow(ImGuiContextPtr ctx, ImGuiWindowPtr window) + { + DockContextQueueUndockWindowNative(ctx, window); + } + + /// + /// To be documented. + /// + public static void DockContextQueueUndockWindow(ref ImGuiContext ctx, ImGuiWindowPtr window) + { + fixed (ImGuiContext* pctx = &ctx) + { + DockContextQueueUndockWindowNative((ImGuiContext*)pctx, window); + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueUndockWindow(ImGuiContextPtr ctx, ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + DockContextQueueUndockWindowNative(ctx, (ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueUndockWindow(ref ImGuiContext ctx, ref ImGuiWindow window) + { + fixed (ImGuiContext* pctx = &ctx) + { + fixed (ImGuiWindow* pwindow = &window) + { + DockContextQueueUndockWindowNative((ImGuiContext*)pctx, (ImGuiWindow*)pwindow); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockContextQueueUndockNodeNative(ImGuiContext* ctx, ImGuiDockNode* node) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1072])(ctx, node); + #else + ((delegate* unmanaged[Cdecl])funcTable[1072])((nint)ctx, (nint)node); + #endif + } + + /// + /// To be documented. + /// + public static void DockContextQueueUndockNode(ImGuiContextPtr ctx, ImGuiDockNodePtr node) + { + DockContextQueueUndockNodeNative(ctx, node); + } + + /// + /// To be documented. + /// + public static void DockContextQueueUndockNode(ref ImGuiContext ctx, ImGuiDockNodePtr node) + { + fixed (ImGuiContext* pctx = &ctx) + { + DockContextQueueUndockNodeNative((ImGuiContext*)pctx, node); + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueUndockNode(ImGuiContextPtr ctx, ref ImGuiDockNode node) + { + fixed (ImGuiDockNode* pnode = &node) + { + DockContextQueueUndockNodeNative(ctx, (ImGuiDockNode*)pnode); + } + } + + /// + /// To be documented. + /// + public static void DockContextQueueUndockNode(ref ImGuiContext ctx, ref ImGuiDockNode node) + { + fixed (ImGuiContext* pctx = &ctx) + { + fixed (ImGuiDockNode* pnode = &node) + { + DockContextQueueUndockNodeNative((ImGuiContext*)pctx, (ImGuiDockNode*)pnode); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte DockContextCalcDropPosForDockingNative(ImGuiWindow* target, ImGuiDockNode* targetNode, ImGuiWindow* payload, ImGuiDir splitDir, byte splitOuter, Vector2* outPos) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1073])(target, targetNode, payload, splitDir, splitOuter, outPos); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1073])((nint)target, (nint)targetNode, (nint)payload, splitDir, splitOuter, (nint)outPos); + #endif + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ImGuiWindowPtr target, ImGuiDockNodePtr targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, bool splitOuter, Vector2* outPos) + { + byte ret = DockContextCalcDropPosForDockingNative(target, targetNode, payload, splitDir, splitOuter ? (byte)1 : (byte)0, outPos); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ref ImGuiWindow target, ImGuiDockNodePtr targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, bool splitOuter, Vector2* outPos) + { + fixed (ImGuiWindow* ptarget = &target) + { + byte ret = DockContextCalcDropPosForDockingNative((ImGuiWindow*)ptarget, targetNode, payload, splitDir, splitOuter ? (byte)1 : (byte)0, outPos); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ImGuiWindowPtr target, ref ImGuiDockNode targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, bool splitOuter, Vector2* outPos) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + byte ret = DockContextCalcDropPosForDockingNative(target, (ImGuiDockNode*)ptargetNode, payload, splitDir, splitOuter ? (byte)1 : (byte)0, outPos); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ref ImGuiWindow target, ref ImGuiDockNode targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, bool splitOuter, Vector2* outPos) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + byte ret = DockContextCalcDropPosForDockingNative((ImGuiWindow*)ptarget, (ImGuiDockNode*)ptargetNode, payload, splitDir, splitOuter ? (byte)1 : (byte)0, outPos); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ImGuiWindowPtr target, ImGuiDockNodePtr targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, bool splitOuter, Vector2* outPos) + { + fixed (ImGuiWindow* ppayload = &payload) + { + byte ret = DockContextCalcDropPosForDockingNative(target, targetNode, (ImGuiWindow*)ppayload, splitDir, splitOuter ? (byte)1 : (byte)0, outPos); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ref ImGuiWindow target, ImGuiDockNodePtr targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, bool splitOuter, Vector2* outPos) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (ImGuiWindow* ppayload = &payload) + { + byte ret = DockContextCalcDropPosForDockingNative((ImGuiWindow*)ptarget, targetNode, (ImGuiWindow*)ppayload, splitDir, splitOuter ? (byte)1 : (byte)0, outPos); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ImGuiWindowPtr target, ref ImGuiDockNode targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, bool splitOuter, Vector2* outPos) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + fixed (ImGuiWindow* ppayload = &payload) + { + byte ret = DockContextCalcDropPosForDockingNative(target, (ImGuiDockNode*)ptargetNode, (ImGuiWindow*)ppayload, splitDir, splitOuter ? (byte)1 : (byte)0, outPos); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ref ImGuiWindow target, ref ImGuiDockNode targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, bool splitOuter, Vector2* outPos) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + fixed (ImGuiWindow* ppayload = &payload) + { + byte ret = DockContextCalcDropPosForDockingNative((ImGuiWindow*)ptarget, (ImGuiDockNode*)ptargetNode, (ImGuiWindow*)ppayload, splitDir, splitOuter ? (byte)1 : (byte)0, outPos); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ImGuiWindowPtr target, ImGuiDockNodePtr targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, bool splitOuter, ref Vector2 outPos) + { + fixed (Vector2* poutPos = &outPos) + { + byte ret = DockContextCalcDropPosForDockingNative(target, targetNode, payload, splitDir, splitOuter ? (byte)1 : (byte)0, (Vector2*)poutPos); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ref ImGuiWindow target, ImGuiDockNodePtr targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, bool splitOuter, ref Vector2 outPos) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (Vector2* poutPos = &outPos) + { + byte ret = DockContextCalcDropPosForDockingNative((ImGuiWindow*)ptarget, targetNode, payload, splitDir, splitOuter ? (byte)1 : (byte)0, (Vector2*)poutPos); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ImGuiWindowPtr target, ref ImGuiDockNode targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, bool splitOuter, ref Vector2 outPos) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + fixed (Vector2* poutPos = &outPos) + { + byte ret = DockContextCalcDropPosForDockingNative(target, (ImGuiDockNode*)ptargetNode, payload, splitDir, splitOuter ? (byte)1 : (byte)0, (Vector2*)poutPos); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ref ImGuiWindow target, ref ImGuiDockNode targetNode, ImGuiWindowPtr payload, ImGuiDir splitDir, bool splitOuter, ref Vector2 outPos) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + fixed (Vector2* poutPos = &outPos) + { + byte ret = DockContextCalcDropPosForDockingNative((ImGuiWindow*)ptarget, (ImGuiDockNode*)ptargetNode, payload, splitDir, splitOuter ? (byte)1 : (byte)0, (Vector2*)poutPos); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ImGuiWindowPtr target, ImGuiDockNodePtr targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, bool splitOuter, ref Vector2 outPos) + { + fixed (ImGuiWindow* ppayload = &payload) + { + fixed (Vector2* poutPos = &outPos) + { + byte ret = DockContextCalcDropPosForDockingNative(target, targetNode, (ImGuiWindow*)ppayload, splitDir, splitOuter ? (byte)1 : (byte)0, (Vector2*)poutPos); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ref ImGuiWindow target, ImGuiDockNodePtr targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, bool splitOuter, ref Vector2 outPos) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (ImGuiWindow* ppayload = &payload) + { + fixed (Vector2* poutPos = &outPos) + { + byte ret = DockContextCalcDropPosForDockingNative((ImGuiWindow*)ptarget, targetNode, (ImGuiWindow*)ppayload, splitDir, splitOuter ? (byte)1 : (byte)0, (Vector2*)poutPos); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ImGuiWindowPtr target, ref ImGuiDockNode targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, bool splitOuter, ref Vector2 outPos) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + fixed (ImGuiWindow* ppayload = &payload) + { + fixed (Vector2* poutPos = &outPos) + { + byte ret = DockContextCalcDropPosForDockingNative(target, (ImGuiDockNode*)ptargetNode, (ImGuiWindow*)ppayload, splitDir, splitOuter ? (byte)1 : (byte)0, (Vector2*)poutPos); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool DockContextCalcDropPosForDocking(ref ImGuiWindow target, ref ImGuiDockNode targetNode, ref ImGuiWindow payload, ImGuiDir splitDir, bool splitOuter, ref Vector2 outPos) + { + fixed (ImGuiWindow* ptarget = &target) + { + fixed (ImGuiDockNode* ptargetNode = &targetNode) + { + fixed (ImGuiWindow* ppayload = &payload) + { + fixed (Vector2* poutPos = &outPos) + { + byte ret = DockContextCalcDropPosForDockingNative((ImGuiWindow*)ptarget, (ImGuiDockNode*)ptargetNode, (ImGuiWindow*)ppayload, splitDir, splitOuter ? (byte)1 : (byte)0, (Vector2*)poutPos); + return ret != 0; + } + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte DockNodeBeginAmendTabBarNative(ImGuiDockNode* node) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1074])(node); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1074])((nint)node); + #endif + } + + /// + /// To be documented. + /// + public static bool DockNodeBeginAmendTabBar(ImGuiDockNodePtr node) + { + byte ret = DockNodeBeginAmendTabBarNative(node); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool DockNodeBeginAmendTabBar(ref ImGuiDockNode node) + { + fixed (ImGuiDockNode* pnode = &node) + { + byte ret = DockNodeBeginAmendTabBarNative((ImGuiDockNode*)pnode); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockNodeEndAmendTabBarNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1075])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1075])(); + #endif + } + + /// + /// To be documented. + /// + public static void DockNodeEndAmendTabBar() + { + DockNodeEndAmendTabBarNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiDockNode* DockNodeGetRootNodeNative(ImGuiDockNode* node) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1076])(node); + #else + return (ImGuiDockNode*)((delegate* unmanaged[Cdecl])funcTable[1076])((nint)node); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiDockNodePtr DockNodeGetRootNode(ImGuiDockNodePtr node) + { + ImGuiDockNodePtr ret = DockNodeGetRootNodeNative(node); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiDockNodePtr DockNodeGetRootNode(ref ImGuiDockNode node) + { + fixed (ImGuiDockNode* pnode = &node) + { + ImGuiDockNodePtr ret = DockNodeGetRootNodeNative((ImGuiDockNode*)pnode); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte DockNodeIsInHierarchyOfNative(ImGuiDockNode* node, ImGuiDockNode* parent) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1077])(node, parent); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1077])((nint)node, (nint)parent); + #endif + } + + /// + /// To be documented. + /// + public static bool DockNodeIsInHierarchyOf(ImGuiDockNodePtr node, ImGuiDockNodePtr parent) + { + byte ret = DockNodeIsInHierarchyOfNative(node, parent); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool DockNodeIsInHierarchyOf(ref ImGuiDockNode node, ImGuiDockNodePtr parent) + { + fixed (ImGuiDockNode* pnode = &node) + { + byte ret = DockNodeIsInHierarchyOfNative((ImGuiDockNode*)pnode, parent); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool DockNodeIsInHierarchyOf(ImGuiDockNodePtr node, ref ImGuiDockNode parent) + { + fixed (ImGuiDockNode* pparent = &parent) + { + byte ret = DockNodeIsInHierarchyOfNative(node, (ImGuiDockNode*)pparent); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool DockNodeIsInHierarchyOf(ref ImGuiDockNode node, ref ImGuiDockNode parent) + { + fixed (ImGuiDockNode* pnode = &node) + { + fixed (ImGuiDockNode* pparent = &parent) + { + byte ret = DockNodeIsInHierarchyOfNative((ImGuiDockNode*)pnode, (ImGuiDockNode*)pparent); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int DockNodeGetDepthNative(ImGuiDockNode* node) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1078])(node); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[1078])((nint)node); + #endif + } + + /// + /// To be documented. + /// + public static int DockNodeGetDepth(ImGuiDockNodePtr node) + { + int ret = DockNodeGetDepthNative(node); + return ret; + } + + /// + /// To be documented. + /// + public static int DockNodeGetDepth(ref ImGuiDockNode node) + { + fixed (ImGuiDockNode* pnode = &node) + { + int ret = DockNodeGetDepthNative((ImGuiDockNode*)pnode); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint DockNodeGetWindowMenuButtonIdNative(ImGuiDockNode* node) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1079])(node); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[1079])((nint)node); + #endif + } + + /// + /// To be documented. + /// + public static uint DockNodeGetWindowMenuButtonId(ImGuiDockNodePtr node) + { + uint ret = DockNodeGetWindowMenuButtonIdNative(node); + return ret; + } + + /// + /// To be documented. + /// + public static uint DockNodeGetWindowMenuButtonId(ref ImGuiDockNode node) + { + fixed (ImGuiDockNode* pnode = &node) + { + uint ret = DockNodeGetWindowMenuButtonIdNative((ImGuiDockNode*)pnode); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiDockNode* GetWindowDockNodeNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1080])(); + #else + return (ImGuiDockNode*)((delegate* unmanaged[Cdecl])funcTable[1080])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiDockNodePtr GetWindowDockNode() + { + ImGuiDockNodePtr ret = GetWindowDockNodeNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte GetWindowAlwaysWantOwnTabBarNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1081])(window); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1081])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static bool GetWindowAlwaysWantOwnTabBar(ImGuiWindowPtr window) + { + byte ret = GetWindowAlwaysWantOwnTabBarNative(window); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool GetWindowAlwaysWantOwnTabBar(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + byte ret = GetWindowAlwaysWantOwnTabBarNative((ImGuiWindow*)pwindow); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void BeginDockedNative(ImGuiWindow* window, bool* pOpen) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1082])(window, pOpen); + #else + ((delegate* unmanaged[Cdecl])funcTable[1082])((nint)window, (nint)pOpen); + #endif + } + + /// + /// To be documented. + /// + public static void BeginDocked(ImGuiWindowPtr window, bool* pOpen) + { + BeginDockedNative(window, pOpen); + } + + /// + /// To be documented. + /// + public static void BeginDocked(ref ImGuiWindow window, bool* pOpen) + { + fixed (ImGuiWindow* pwindow = &window) + { + BeginDockedNative((ImGuiWindow*)pwindow, pOpen); + } + } + + /// + /// To be documented. + /// + public static void BeginDocked(ImGuiWindowPtr window, ref bool pOpen) + { + fixed (bool* ppOpen = &pOpen) + { + BeginDockedNative(window, (bool*)ppOpen); + } + } + + /// + /// To be documented. + /// + public static void BeginDocked(ref ImGuiWindow window, ref bool pOpen) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (bool* ppOpen = &pOpen) + { + BeginDockedNative((ImGuiWindow*)pwindow, (bool*)ppOpen); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void BeginDockableDragDropSourceNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1083])(window); + #else + ((delegate* unmanaged[Cdecl])funcTable[1083])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void BeginDockableDragDropSource(ImGuiWindowPtr window) + { + BeginDockableDragDropSourceNative(window); + } + + /// + /// To be documented. + /// + public static void BeginDockableDragDropSource(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + BeginDockableDragDropSourceNative((ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void BeginDockableDragDropTargetNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1084])(window); + #else + ((delegate* unmanaged[Cdecl])funcTable[1084])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void BeginDockableDragDropTarget(ImGuiWindowPtr window) + { + BeginDockableDragDropTargetNative(window); + } + + /// + /// To be documented. + /// + public static void BeginDockableDragDropTarget(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + BeginDockableDragDropTargetNative((ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetWindowDockNative(ImGuiWindow* window, uint dockId, ImGuiCond cond) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1085])(window, dockId, cond); + #else + ((delegate* unmanaged[Cdecl])funcTable[1085])((nint)window, dockId, cond); + #endif + } + + /// + /// To be documented. + /// + public static void SetWindowDock(ImGuiWindowPtr window, uint dockId, ImGuiCond cond) + { + SetWindowDockNative(window, dockId, cond); + } + + /// + /// To be documented. + /// + public static void SetWindowDock(ref ImGuiWindow window, uint dockId, ImGuiCond cond) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetWindowDockNative((ImGuiWindow*)pwindow, dockId, cond); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockBuilderDockWindowNative(byte* windowName, uint nodeId) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1086])(windowName, nodeId); + #else + ((delegate* unmanaged[Cdecl])funcTable[1086])((nint)windowName, nodeId); + #endif + } + + /// + /// To be documented. + /// + public static void DockBuilderDockWindow(byte* windowName, uint nodeId) + { + DockBuilderDockWindowNative(windowName, nodeId); + } + + /// + /// To be documented. + /// + public static void DockBuilderDockWindow(ref byte windowName, uint nodeId) + { + fixed (byte* pwindowName = &windowName) + { + DockBuilderDockWindowNative((byte*)pwindowName, nodeId); + } + } + + /// + /// To be documented. + /// + public static void DockBuilderDockWindow(ReadOnlySpan windowName, uint nodeId) + { + fixed (byte* pwindowName = windowName) + { + DockBuilderDockWindowNative((byte*)pwindowName, nodeId); + } + } + + /// + /// To be documented. + /// + 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; + } + DockBuilderDockWindowNative(pStr0, nodeId); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiDockNode* DockBuilderGetNodeNative(uint nodeId) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1087])(nodeId); + #else + return (ImGuiDockNode*)((delegate* unmanaged[Cdecl])funcTable[1087])(nodeId); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiDockNodePtr DockBuilderGetNode(uint nodeId) + { + ImGuiDockNodePtr ret = DockBuilderGetNodeNative(nodeId); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiDockNode* DockBuilderGetCentralNodeNative(uint nodeId) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1088])(nodeId); + #else + return (ImGuiDockNode*)((delegate* unmanaged[Cdecl])funcTable[1088])(nodeId); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiDockNodePtr DockBuilderGetCentralNode(uint nodeId) + { + ImGuiDockNodePtr ret = DockBuilderGetCentralNodeNative(nodeId); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint DockBuilderAddNodeNative(uint nodeId, ImGuiDockNodeFlags flags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1089])(nodeId, flags); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[1089])(nodeId, flags); + #endif + } + + /// + /// To be documented. + /// + public static uint DockBuilderAddNode(uint nodeId, ImGuiDockNodeFlags flags) + { + uint ret = DockBuilderAddNodeNative(nodeId, flags); + return ret; + } + + /// + /// To be documented. + /// + public static uint DockBuilderAddNode(uint nodeId) + { + uint ret = DockBuilderAddNodeNative(nodeId, (ImGuiDockNodeFlags)(0)); + return ret; + } + + /// + /// To be documented. + /// + public static uint DockBuilderAddNode() + { + uint ret = DockBuilderAddNodeNative((uint)(0), (ImGuiDockNodeFlags)(0)); + return ret; + } + + /// + /// To be documented. + /// + public static uint DockBuilderAddNode(ImGuiDockNodeFlags flags) + { + uint ret = DockBuilderAddNodeNative((uint)(0), flags); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockBuilderRemoveNodeNative(uint nodeId) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1090])(nodeId); + #else + ((delegate* unmanaged[Cdecl])funcTable[1090])(nodeId); + #endif + } + + /// + /// To be documented. + /// + public static void DockBuilderRemoveNode(uint nodeId) + { + DockBuilderRemoveNodeNative(nodeId); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockBuilderRemoveNodeDockedWindowsNative(uint nodeId, byte clearSettingsRefs) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1091])(nodeId, clearSettingsRefs); + #else + ((delegate* unmanaged[Cdecl])funcTable[1091])(nodeId, clearSettingsRefs); + #endif + } + + /// + /// To be documented. + /// + public static void DockBuilderRemoveNodeDockedWindows(uint nodeId, bool clearSettingsRefs) + { + DockBuilderRemoveNodeDockedWindowsNative(nodeId, clearSettingsRefs ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void DockBuilderRemoveNodeDockedWindows(uint nodeId) + { + DockBuilderRemoveNodeDockedWindowsNative(nodeId, (byte)(1)); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockBuilderRemoveNodeChildNodesNative(uint nodeId) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1092])(nodeId); + #else + ((delegate* unmanaged[Cdecl])funcTable[1092])(nodeId); + #endif + } + + /// + /// To be documented. + /// + public static void DockBuilderRemoveNodeChildNodes(uint nodeId) + { + DockBuilderRemoveNodeChildNodesNative(nodeId); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockBuilderSetNodePosNative(uint nodeId, Vector2 pos) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1093])(nodeId, pos); + #else + ((delegate* unmanaged[Cdecl])funcTable[1093])(nodeId, pos); + #endif + } + + /// + /// To be documented. + /// + public static void DockBuilderSetNodePos(uint nodeId, Vector2 pos) + { + DockBuilderSetNodePosNative(nodeId, pos); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockBuilderSetNodeSizeNative(uint nodeId, Vector2 size) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1094])(nodeId, size); + #else + ((delegate* unmanaged[Cdecl])funcTable[1094])(nodeId, size); + #endif + } + + /// + /// To be documented. + /// + public static void DockBuilderSetNodeSize(uint nodeId, Vector2 size) + { + DockBuilderSetNodeSizeNative(nodeId, size); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint DockBuilderSplitNodeNative(uint nodeId, ImGuiDir splitDir, float sizeRatioForNodeAtDir, uint* outIdAtDir, uint* outIdAtOppositeDir) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1095])(nodeId, splitDir, sizeRatioForNodeAtDir, outIdAtDir, outIdAtOppositeDir); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[1095])(nodeId, splitDir, sizeRatioForNodeAtDir, (nint)outIdAtDir, (nint)outIdAtOppositeDir); + #endif + } + + /// + /// To be documented. + /// + public static uint DockBuilderSplitNode(uint nodeId, ImGuiDir splitDir, float sizeRatioForNodeAtDir, uint* outIdAtDir, uint* outIdAtOppositeDir) + { + uint ret = DockBuilderSplitNodeNative(nodeId, splitDir, sizeRatioForNodeAtDir, outIdAtDir, outIdAtOppositeDir); + return ret; + } + + /// + /// To be documented. + /// + public static uint DockBuilderSplitNode(uint nodeId, ImGuiDir splitDir, float sizeRatioForNodeAtDir, ref uint outIdAtDir, uint* outIdAtOppositeDir) + { + fixed (uint* poutIdAtDir = &outIdAtDir) + { + uint ret = DockBuilderSplitNodeNative(nodeId, splitDir, sizeRatioForNodeAtDir, (uint*)poutIdAtDir, outIdAtOppositeDir); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint DockBuilderSplitNode(uint nodeId, ImGuiDir splitDir, float sizeRatioForNodeAtDir, uint* outIdAtDir, ref uint outIdAtOppositeDir) + { + fixed (uint* poutIdAtOppositeDir = &outIdAtOppositeDir) + { + uint ret = DockBuilderSplitNodeNative(nodeId, splitDir, sizeRatioForNodeAtDir, outIdAtDir, (uint*)poutIdAtOppositeDir); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint DockBuilderSplitNode(uint nodeId, ImGuiDir splitDir, float sizeRatioForNodeAtDir, ref uint outIdAtDir, ref uint outIdAtOppositeDir) + { + fixed (uint* poutIdAtDir = &outIdAtDir) + { + fixed (uint* poutIdAtOppositeDir = &outIdAtOppositeDir) + { + uint ret = DockBuilderSplitNodeNative(nodeId, splitDir, sizeRatioForNodeAtDir, (uint*)poutIdAtDir, (uint*)poutIdAtOppositeDir); + return ret; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockBuilderCopyDockSpaceNative(uint srcDockspaceId, uint dstDockspaceId, ImVector>* inWindowRemapPairs) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl]>*, void>)funcTable[1096])(srcDockspaceId, dstDockspaceId, inWindowRemapPairs); + #else + ((delegate* unmanaged[Cdecl])funcTable[1096])(srcDockspaceId, dstDockspaceId, (nint)inWindowRemapPairs); + #endif + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyDockSpace(uint srcDockspaceId, uint dstDockspaceId, ImVector>* inWindowRemapPairs) + { + DockBuilderCopyDockSpaceNative(srcDockspaceId, dstDockspaceId, inWindowRemapPairs); + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyDockSpace(uint srcDockspaceId, uint dstDockspaceId, ref ImVector> inWindowRemapPairs) + { + fixed (ImVector>* pinWindowRemapPairs = &inWindowRemapPairs) + { + DockBuilderCopyDockSpaceNative(srcDockspaceId, dstDockspaceId, (ImVector>*)pinWindowRemapPairs); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockBuilderCopyNodeNative(uint srcNodeId, uint dstNodeId, ImVector* outNodeRemapPairs) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl]*, void>)funcTable[1097])(srcNodeId, dstNodeId, outNodeRemapPairs); + #else + ((delegate* unmanaged[Cdecl])funcTable[1097])(srcNodeId, dstNodeId, (nint)outNodeRemapPairs); + #endif + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyNode(uint srcNodeId, uint dstNodeId, ImVector* outNodeRemapPairs) + { + DockBuilderCopyNodeNative(srcNodeId, dstNodeId, outNodeRemapPairs); + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyNode(uint srcNodeId, uint dstNodeId, ref ImVector outNodeRemapPairs) + { + fixed (ImVector* poutNodeRemapPairs = &outNodeRemapPairs) + { + DockBuilderCopyNodeNative(srcNodeId, dstNodeId, (ImVector*)poutNodeRemapPairs); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockBuilderCopyWindowSettingsNative(byte* srcName, byte* dstName) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1098])(srcName, dstName); + #else + ((delegate* unmanaged[Cdecl])funcTable[1098])((nint)srcName, (nint)dstName); + #endif + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyWindowSettings(byte* srcName, byte* dstName) + { + DockBuilderCopyWindowSettingsNative(srcName, dstName); + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyWindowSettings(ref byte srcName, byte* dstName) + { + fixed (byte* psrcName = &srcName) + { + DockBuilderCopyWindowSettingsNative((byte*)psrcName, dstName); + } + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyWindowSettings(ReadOnlySpan srcName, byte* dstName) + { + fixed (byte* psrcName = srcName) + { + DockBuilderCopyWindowSettingsNative((byte*)psrcName, dstName); + } + } + + /// + /// To be documented. + /// + 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; + } + DockBuilderCopyWindowSettingsNative(pStr0, dstName); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyWindowSettings(byte* srcName, ref byte dstName) + { + fixed (byte* pdstName = &dstName) + { + DockBuilderCopyWindowSettingsNative(srcName, (byte*)pdstName); + } + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyWindowSettings(byte* srcName, ReadOnlySpan dstName) + { + fixed (byte* pdstName = dstName) + { + DockBuilderCopyWindowSettingsNative(srcName, (byte*)pdstName); + } + } + + /// + /// To be documented. + /// + 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; + } + DockBuilderCopyWindowSettingsNative(srcName, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyWindowSettings(ref byte srcName, ref byte dstName) + { + fixed (byte* psrcName = &srcName) + { + fixed (byte* pdstName = &dstName) + { + DockBuilderCopyWindowSettingsNative((byte*)psrcName, (byte*)pdstName); + } + } + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyWindowSettings(ReadOnlySpan srcName, ReadOnlySpan dstName) + { + fixed (byte* psrcName = srcName) + { + fixed (byte* pdstName = dstName) + { + DockBuilderCopyWindowSettingsNative((byte*)psrcName, (byte*)pdstName); + } + } + } + + /// + /// To be documented. + /// + 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; + } + DockBuilderCopyWindowSettingsNative(pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyWindowSettings(ref byte srcName, ReadOnlySpan dstName) + { + fixed (byte* psrcName = &srcName) + { + fixed (byte* pdstName = dstName) + { + DockBuilderCopyWindowSettingsNative((byte*)psrcName, (byte*)pdstName); + } + } + } + + /// + /// To be documented. + /// + 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; + } + DockBuilderCopyWindowSettingsNative((byte*)psrcName, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void DockBuilderCopyWindowSettings(ReadOnlySpan srcName, ref byte dstName) + { + fixed (byte* psrcName = srcName) + { + fixed (byte* pdstName = &dstName) + { + DockBuilderCopyWindowSettingsNative((byte*)psrcName, (byte*)pdstName); + } + } + } + + /// + /// To be documented. + /// + 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; + } + DockBuilderCopyWindowSettingsNative((byte*)psrcName, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + 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) + { + DockBuilderCopyWindowSettingsNative(pStr0, (byte*)pdstName); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + 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) + { + DockBuilderCopyWindowSettingsNative(pStr0, (byte*)pdstName); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DockBuilderFinishNative(uint nodeId) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1099])(nodeId); + #else + ((delegate* unmanaged[Cdecl])funcTable[1099])(nodeId); + #endif + } + + /// + /// To be documented. + /// + public static void DockBuilderFinish(uint nodeId) + { + DockBuilderFinishNative(nodeId); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsDragDropActiveNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1100])(); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1100])(); + #endif + } + + /// + /// To be documented. + /// + public static bool IsDragDropActive() + { + byte ret = IsDragDropActiveNative(); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte BeginDragDropTargetCustomNative(ImRect bb, uint id) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1101])(bb, id); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1101])(bb, id); + #endif + } + + /// + /// To be documented. + /// + public static bool BeginDragDropTargetCustom(ImRect bb, uint id) + { + byte ret = BeginDragDropTargetCustomNative(bb, id); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ClearDragDropNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1102])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1102])(); + #endif + } + + /// + /// To be documented. + /// + public static void ClearDragDrop() + { + ClearDragDropNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte IsDragDropPayloadBeingAcceptedNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1103])(); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1103])(); + #endif + } + + /// + /// To be documented. + /// + public static bool IsDragDropPayloadBeingAccepted() + { + byte ret = IsDragDropPayloadBeingAcceptedNative(); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SetWindowClipRectBeforeSetChannelNative(ImGuiWindow* window, ImRect clipRect) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1104])(window, clipRect); + #else + ((delegate* unmanaged[Cdecl])funcTable[1104])((nint)window, clipRect); + #endif + } + + /// + /// To be documented. + /// + public static void SetWindowClipRectBeforeSetChannel(ImGuiWindowPtr window, ImRect clipRect) + { + SetWindowClipRectBeforeSetChannelNative(window, clipRect); + } + + /// + /// To be documented. + /// + public static void SetWindowClipRectBeforeSetChannel(ref ImGuiWindow window, ImRect clipRect) + { + fixed (ImGuiWindow* pwindow = &window) + { + SetWindowClipRectBeforeSetChannelNative((ImGuiWindow*)pwindow, clipRect); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void BeginColumnsNative(byte* strId, int count, ImGuiOldColumnFlags flags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1105])(strId, count, flags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1105])((nint)strId, count, flags); + #endif + } + + /// + /// To be documented. + /// + public static void BeginColumns(byte* strId, int count, ImGuiOldColumnFlags flags) + { + BeginColumnsNative(strId, count, flags); + } + + /// + /// To be documented. + /// + public static void BeginColumns(byte* strId, int count) + { + BeginColumnsNative(strId, count, (ImGuiOldColumnFlags)(0)); + } + + /// + /// To be documented. + /// + public static void BeginColumns(ref byte strId, int count, ImGuiOldColumnFlags flags) + { + fixed (byte* pstrId = &strId) + { + BeginColumnsNative((byte*)pstrId, count, flags); + } + } + + /// + /// To be documented. + /// + public static void BeginColumns(ref byte strId, int count) + { + fixed (byte* pstrId = &strId) + { + BeginColumnsNative((byte*)pstrId, count, (ImGuiOldColumnFlags)(0)); + } + } + + /// + /// To be documented. + /// + public static void BeginColumns(ReadOnlySpan strId, int count, ImGuiOldColumnFlags flags) + { + fixed (byte* pstrId = strId) + { + BeginColumnsNative((byte*)pstrId, count, flags); + } + } + + /// + /// To be documented. + /// + public static void BeginColumns(ReadOnlySpan strId, int count) + { + fixed (byte* pstrId = strId) + { + BeginColumnsNative((byte*)pstrId, count, (ImGuiOldColumnFlags)(0)); + } + } + + /// + /// To be documented. + /// + 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; + } + BeginColumnsNative(pStr0, count, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + 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; + } + BeginColumnsNative(pStr0, count, (ImGuiOldColumnFlags)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void EndColumnsNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1106])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1106])(); + #endif + } + + /// + /// To be documented. + /// + public static void EndColumns() + { + EndColumnsNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void PushColumnClipRectNative(int columnIndex) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1107])(columnIndex); + #else + ((delegate* unmanaged[Cdecl])funcTable[1107])(columnIndex); + #endif + } + + /// + /// To be documented. + /// + public static void PushColumnClipRect(int columnIndex) + { + PushColumnClipRectNative(columnIndex); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void PushColumnsBackgroundNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1108])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1108])(); + #endif + } + + /// + /// To be documented. + /// + public static void PushColumnsBackground() + { + PushColumnsBackgroundNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void PopColumnsBackgroundNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1109])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1109])(); + #endif + } + + /// + /// To be documented. + /// + public static void PopColumnsBackground() + { + PopColumnsBackgroundNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetColumnsIDNative(byte* strId, int count) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1110])(strId, count); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[1110])((nint)strId, count); + #endif + } + + /// + /// To be documented. + /// + public static uint GetColumnsID(byte* strId, int count) + { + uint ret = GetColumnsIDNative(strId, count); + return ret; + } + + /// + /// To be documented. + /// + public static uint GetColumnsID(ref byte strId, int count) + { + fixed (byte* pstrId = &strId) + { + uint ret = GetColumnsIDNative((byte*)pstrId, count); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint GetColumnsID(ReadOnlySpan strId, int count) + { + fixed (byte* pstrId = strId) + { + uint ret = GetColumnsIDNative((byte*)pstrId, count); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = GetColumnsIDNative(pStr0, count); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiOldColumns* FindOrCreateColumnsNative(ImGuiWindow* window, uint id) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1111])(window, id); + #else + return (ImGuiOldColumns*)((delegate* unmanaged[Cdecl])funcTable[1111])((nint)window, id); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiOldColumnsPtr FindOrCreateColumns(ImGuiWindowPtr window, uint id) + { + ImGuiOldColumnsPtr ret = FindOrCreateColumnsNative(window, id); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiOldColumnsPtr FindOrCreateColumns(ref ImGuiWindow window, uint id) + { + fixed (ImGuiWindow* pwindow = &window) + { + ImGuiOldColumnsPtr ret = FindOrCreateColumnsNative((ImGuiWindow*)pwindow, id); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float GetColumnOffsetFromNormNative(ImGuiOldColumns* columns, float offsetNorm) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1112])(columns, offsetNorm); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[1112])((nint)columns, offsetNorm); + #endif + } + + /// + /// To be documented. + /// + public static float GetColumnOffsetFromNorm(ImGuiOldColumnsPtr columns, float offsetNorm) + { + float ret = GetColumnOffsetFromNormNative(columns, offsetNorm); + return ret; + } + + /// + /// To be documented. + /// + public static float GetColumnOffsetFromNorm(ref ImGuiOldColumns columns, float offsetNorm) + { + fixed (ImGuiOldColumns* pcolumns = &columns) + { + float ret = GetColumnOffsetFromNormNative((ImGuiOldColumns*)pcolumns, offsetNorm); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float GetColumnNormFromOffsetNative(ImGuiOldColumns* columns, float offset) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1113])(columns, offset); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[1113])((nint)columns, offset); + #endif + } + + /// + /// To be documented. + /// + public static float GetColumnNormFromOffset(ImGuiOldColumnsPtr columns, float offset) + { + float ret = GetColumnNormFromOffsetNative(columns, offset); + return ret; + } + + /// + /// To be documented. + /// + public static float GetColumnNormFromOffset(ref ImGuiOldColumns columns, float offset) + { + fixed (ImGuiOldColumns* pcolumns = &columns) + { + float ret = GetColumnNormFromOffsetNative((ImGuiOldColumns*)pcolumns, offset); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableOpenContextMenuNative(int columnN) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1114])(columnN); + #else + ((delegate* unmanaged[Cdecl])funcTable[1114])(columnN); + #endif + } + + /// + /// To be documented. + /// + public static void TableOpenContextMenu(int columnN) + { + TableOpenContextMenuNative(columnN); + } + + /// + /// To be documented. + /// + public static void TableOpenContextMenu() + { + TableOpenContextMenuNative((int)(-1)); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableSetColumnWidthNative(int columnN, float width) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1115])(columnN, width); + #else + ((delegate* unmanaged[Cdecl])funcTable[1115])(columnN, width); + #endif + } + + /// + /// To be documented. + /// + public static void TableSetColumnWidth(int columnN, float width) + { + TableSetColumnWidthNative(columnN, width); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableSetColumnSortDirectionNative(int columnN, ImGuiSortDirection sortDirection, byte appendToSortSpecs) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1116])(columnN, sortDirection, appendToSortSpecs); + #else + ((delegate* unmanaged[Cdecl])funcTable[1116])(columnN, sortDirection, appendToSortSpecs); + #endif + } + + /// + /// To be documented. + /// + public static void TableSetColumnSortDirection(int columnN, ImGuiSortDirection sortDirection, bool appendToSortSpecs) + { + TableSetColumnSortDirectionNative(columnN, sortDirection, appendToSortSpecs ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int TableGetHoveredColumnNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1117])(); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[1117])(); + #endif + } + + /// + /// To be documented. + /// + public static int TableGetHoveredColumn() + { + int ret = TableGetHoveredColumnNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float TableGetHeaderRowHeightNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1118])(); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[1118])(); + #endif + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.011.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.011.cs new file mode 100644 index 000000000..f95021fbf --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.011.cs @@ -0,0 +1,5030 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + public static float TableGetHeaderRowHeight() + { + float ret = TableGetHeaderRowHeightNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TablePushBackgroundChannelNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1119])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1119])(); + #endif + } + + /// + /// To be documented. + /// + public static void TablePushBackgroundChannel() + { + TablePushBackgroundChannelNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TablePopBackgroundChannelNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1120])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1120])(); + #endif + } + + /// + /// To be documented. + /// + public static void TablePopBackgroundChannel() + { + TablePopBackgroundChannelNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTable* GetCurrentTableNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1121])(); + #else + return (ImGuiTable*)((delegate* unmanaged[Cdecl])funcTable[1121])(); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTablePtr GetCurrentTable() + { + ImGuiTablePtr ret = GetCurrentTableNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTable* TableFindByIDNative(uint id) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1122])(id); + #else + return (ImGuiTable*)((delegate* unmanaged[Cdecl])funcTable[1122])(id); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTablePtr TableFindByID(uint id) + { + ImGuiTablePtr ret = TableFindByIDNative(id); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte BeginTableExNative(byte* name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1123])(name, id, columnsCount, flags, outerSize, innerWidth); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1123])((nint)name, id, columnsCount, flags, outerSize, innerWidth); + #endif + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(byte* name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) + { + byte ret = BeginTableExNative(name, id, columnsCount, flags, outerSize, innerWidth); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(byte* name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize) + { + byte ret = BeginTableExNative(name, id, columnsCount, flags, outerSize, (float)(0.0f)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(byte* name, uint id, int columnsCount, ImGuiTableFlags flags) + { + byte ret = BeginTableExNative(name, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), (float)(0.0f)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(byte* name, uint id, int columnsCount) + { + byte ret = BeginTableExNative(name, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), (float)(0.0f)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(byte* name, uint id, int columnsCount, Vector2 outerSize) + { + byte ret = BeginTableExNative(name, id, columnsCount, (ImGuiTableFlags)(0), outerSize, (float)(0.0f)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(byte* name, uint id, int columnsCount, ImGuiTableFlags flags, float innerWidth) + { + byte ret = BeginTableExNative(name, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), innerWidth); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(byte* name, uint id, int columnsCount, float innerWidth) + { + byte ret = BeginTableExNative(name, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), innerWidth); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(byte* name, uint id, int columnsCount, Vector2 outerSize, float innerWidth) + { + byte ret = BeginTableExNative(name, id, columnsCount, (ImGuiTableFlags)(0), outerSize, innerWidth); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ref byte name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) + { + fixed (byte* pname = &name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, flags, outerSize, innerWidth); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ref byte name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize) + { + fixed (byte* pname = &name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, flags, outerSize, (float)(0.0f)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ref byte name, uint id, int columnsCount, ImGuiTableFlags flags) + { + fixed (byte* pname = &name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), (float)(0.0f)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ref byte name, uint id, int columnsCount) + { + fixed (byte* pname = &name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), (float)(0.0f)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ref byte name, uint id, int columnsCount, Vector2 outerSize) + { + fixed (byte* pname = &name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), outerSize, (float)(0.0f)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ref byte name, uint id, int columnsCount, ImGuiTableFlags flags, float innerWidth) + { + fixed (byte* pname = &name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), innerWidth); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ref byte name, uint id, int columnsCount, float innerWidth) + { + fixed (byte* pname = &name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), innerWidth); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ref byte name, uint id, int columnsCount, Vector2 outerSize, float innerWidth) + { + fixed (byte* pname = &name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), outerSize, innerWidth); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth) + { + fixed (byte* pname = name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, flags, outerSize, innerWidth); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, ImGuiTableFlags flags, Vector2 outerSize) + { + fixed (byte* pname = name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, flags, outerSize, (float)(0.0f)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, ImGuiTableFlags flags) + { + fixed (byte* pname = name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), (float)(0.0f)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount) + { + fixed (byte* pname = name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), (float)(0.0f)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, Vector2 outerSize) + { + fixed (byte* pname = name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), outerSize, (float)(0.0f)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, ImGuiTableFlags flags, float innerWidth) + { + fixed (byte* pname = name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), innerWidth); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, float innerWidth) + { + fixed (byte* pname = name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), innerWidth); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTableEx(ReadOnlySpan name, uint id, int columnsCount, Vector2 outerSize, float innerWidth) + { + fixed (byte* pname = name) + { + byte ret = BeginTableExNative((byte*)pname, id, columnsCount, (ImGuiTableFlags)(0), outerSize, innerWidth); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = BeginTableExNative(pStr0, id, columnsCount, flags, outerSize, innerWidth); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = BeginTableExNative(pStr0, id, columnsCount, flags, outerSize, (float)(0.0f)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = BeginTableExNative(pStr0, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), (float)(0.0f)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = BeginTableExNative(pStr0, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), (float)(0.0f)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = BeginTableExNative(pStr0, id, columnsCount, (ImGuiTableFlags)(0), outerSize, (float)(0.0f)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = BeginTableExNative(pStr0, id, columnsCount, flags, (Vector2)(new Vector2(0,0)), innerWidth); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = BeginTableExNative(pStr0, id, columnsCount, (ImGuiTableFlags)(0), (Vector2)(new Vector2(0,0)), innerWidth); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = BeginTableExNative(pStr0, id, columnsCount, (ImGuiTableFlags)(0), outerSize, innerWidth); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableBeginInitMemoryNative(ImGuiTable* table, int columnsCount) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1124])(table, columnsCount); + #else + ((delegate* unmanaged[Cdecl])funcTable[1124])((nint)table, columnsCount); + #endif + } + + /// + /// To be documented. + /// + public static void TableBeginInitMemory(ImGuiTablePtr table, int columnsCount) + { + TableBeginInitMemoryNative(table, columnsCount); + } + + /// + /// To be documented. + /// + public static void TableBeginInitMemory(ref ImGuiTable table, int columnsCount) + { + fixed (ImGuiTable* ptable = &table) + { + TableBeginInitMemoryNative((ImGuiTable*)ptable, columnsCount); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableBeginApplyRequestsNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1125])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1125])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableBeginApplyRequests(ImGuiTablePtr table) + { + TableBeginApplyRequestsNative(table); + } + + /// + /// To be documented. + /// + public static void TableBeginApplyRequests(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableBeginApplyRequestsNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableSetupDrawChannelsNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1126])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1126])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableSetupDrawChannels(ImGuiTablePtr table) + { + TableSetupDrawChannelsNative(table); + } + + /// + /// To be documented. + /// + public static void TableSetupDrawChannels(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableSetupDrawChannelsNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableUpdateLayoutNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1127])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1127])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableUpdateLayout(ImGuiTablePtr table) + { + TableUpdateLayoutNative(table); + } + + /// + /// To be documented. + /// + public static void TableUpdateLayout(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableUpdateLayoutNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableUpdateBordersNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1128])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1128])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableUpdateBorders(ImGuiTablePtr table) + { + TableUpdateBordersNative(table); + } + + /// + /// To be documented. + /// + public static void TableUpdateBorders(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableUpdateBordersNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableUpdateColumnsWeightFromWidthNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1129])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1129])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableUpdateColumnsWeightFromWidth(ImGuiTablePtr table) + { + TableUpdateColumnsWeightFromWidthNative(table); + } + + /// + /// To be documented. + /// + public static void TableUpdateColumnsWeightFromWidth(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableUpdateColumnsWeightFromWidthNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableDrawBordersNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1130])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1130])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableDrawBorders(ImGuiTablePtr table) + { + TableDrawBordersNative(table); + } + + /// + /// To be documented. + /// + public static void TableDrawBorders(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableDrawBordersNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableDrawContextMenuNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1131])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1131])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableDrawContextMenu(ImGuiTablePtr table) + { + TableDrawContextMenuNative(table); + } + + /// + /// To be documented. + /// + public static void TableDrawContextMenu(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableDrawContextMenuNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableMergeDrawChannelsNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1132])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1132])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableMergeDrawChannels(ImGuiTablePtr table) + { + TableMergeDrawChannelsNative(table); + } + + /// + /// To be documented. + /// + public static void TableMergeDrawChannels(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableMergeDrawChannelsNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTableInstanceData* TableGetInstanceDataNative(ImGuiTable* table, int instanceNo) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1133])(table, instanceNo); + #else + return (ImGuiTableInstanceData*)((delegate* unmanaged[Cdecl])funcTable[1133])((nint)table, instanceNo); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTableInstanceDataPtr TableGetInstanceData(ImGuiTablePtr table, int instanceNo) + { + ImGuiTableInstanceDataPtr ret = TableGetInstanceDataNative(table, instanceNo); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiTableInstanceDataPtr TableGetInstanceData(ref ImGuiTable table, int instanceNo) + { + fixed (ImGuiTable* ptable = &table) + { + ImGuiTableInstanceDataPtr ret = TableGetInstanceDataNative((ImGuiTable*)ptable, instanceNo); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableSortSpecsSanitizeNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1134])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1134])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableSortSpecsSanitize(ImGuiTablePtr table) + { + TableSortSpecsSanitizeNative(table); + } + + /// + /// To be documented. + /// + public static void TableSortSpecsSanitize(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableSortSpecsSanitizeNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableSortSpecsBuildNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1135])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1135])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableSortSpecsBuild(ImGuiTablePtr table) + { + TableSortSpecsBuildNative(table); + } + + /// + /// To be documented. + /// + public static void TableSortSpecsBuild(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableSortSpecsBuildNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiSortDirection TableGetColumnNextSortDirectionNative(ImGuiTableColumn* column) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1136])(column); + #else + return (ImGuiSortDirection)((delegate* unmanaged[Cdecl])funcTable[1136])((nint)column); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiSortDirection TableGetColumnNextSortDirection(ImGuiTableColumnPtr column) + { + ImGuiSortDirection ret = TableGetColumnNextSortDirectionNative(column); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiSortDirection TableGetColumnNextSortDirection(ref ImGuiTableColumn column) + { + fixed (ImGuiTableColumn* pcolumn = &column) + { + ImGuiSortDirection ret = TableGetColumnNextSortDirectionNative((ImGuiTableColumn*)pcolumn); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableFixColumnSortDirectionNative(ImGuiTable* table, ImGuiTableColumn* column) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1137])(table, column); + #else + ((delegate* unmanaged[Cdecl])funcTable[1137])((nint)table, (nint)column); + #endif + } + + /// + /// To be documented. + /// + public static void TableFixColumnSortDirection(ImGuiTablePtr table, ImGuiTableColumnPtr column) + { + TableFixColumnSortDirectionNative(table, column); + } + + /// + /// To be documented. + /// + public static void TableFixColumnSortDirection(ref ImGuiTable table, ImGuiTableColumnPtr column) + { + fixed (ImGuiTable* ptable = &table) + { + TableFixColumnSortDirectionNative((ImGuiTable*)ptable, column); + } + } + + /// + /// To be documented. + /// + public static void TableFixColumnSortDirection(ImGuiTablePtr table, ref ImGuiTableColumn column) + { + fixed (ImGuiTableColumn* pcolumn = &column) + { + TableFixColumnSortDirectionNative(table, (ImGuiTableColumn*)pcolumn); + } + } + + /// + /// To be documented. + /// + public static void TableFixColumnSortDirection(ref ImGuiTable table, ref ImGuiTableColumn column) + { + fixed (ImGuiTable* ptable = &table) + { + fixed (ImGuiTableColumn* pcolumn = &column) + { + TableFixColumnSortDirectionNative((ImGuiTable*)ptable, (ImGuiTableColumn*)pcolumn); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float TableGetColumnWidthAutoNative(ImGuiTable* table, ImGuiTableColumn* column) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1138])(table, column); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[1138])((nint)table, (nint)column); + #endif + } + + /// + /// To be documented. + /// + public static float TableGetColumnWidthAuto(ImGuiTablePtr table, ImGuiTableColumnPtr column) + { + float ret = TableGetColumnWidthAutoNative(table, column); + return ret; + } + + /// + /// To be documented. + /// + public static float TableGetColumnWidthAuto(ref ImGuiTable table, ImGuiTableColumnPtr column) + { + fixed (ImGuiTable* ptable = &table) + { + float ret = TableGetColumnWidthAutoNative((ImGuiTable*)ptable, column); + return ret; + } + } + + /// + /// To be documented. + /// + public static float TableGetColumnWidthAuto(ImGuiTablePtr table, ref ImGuiTableColumn column) + { + fixed (ImGuiTableColumn* pcolumn = &column) + { + float ret = TableGetColumnWidthAutoNative(table, (ImGuiTableColumn*)pcolumn); + return ret; + } + } + + /// + /// To be documented. + /// + public static float TableGetColumnWidthAuto(ref ImGuiTable table, ref ImGuiTableColumn column) + { + fixed (ImGuiTable* ptable = &table) + { + fixed (ImGuiTableColumn* pcolumn = &column) + { + float ret = TableGetColumnWidthAutoNative((ImGuiTable*)ptable, (ImGuiTableColumn*)pcolumn); + return ret; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableBeginRowNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1139])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1139])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableBeginRow(ImGuiTablePtr table) + { + TableBeginRowNative(table); + } + + /// + /// To be documented. + /// + public static void TableBeginRow(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableBeginRowNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableEndRowNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1140])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1140])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableEndRow(ImGuiTablePtr table) + { + TableEndRowNative(table); + } + + /// + /// To be documented. + /// + public static void TableEndRow(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableEndRowNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableBeginCellNative(ImGuiTable* table, int columnN) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1141])(table, columnN); + #else + ((delegate* unmanaged[Cdecl])funcTable[1141])((nint)table, columnN); + #endif + } + + /// + /// To be documented. + /// + public static void TableBeginCell(ImGuiTablePtr table, int columnN) + { + TableBeginCellNative(table, columnN); + } + + /// + /// To be documented. + /// + public static void TableBeginCell(ref ImGuiTable table, int columnN) + { + fixed (ImGuiTable* ptable = &table) + { + TableBeginCellNative((ImGuiTable*)ptable, columnN); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableEndCellNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1142])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1142])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableEndCell(ImGuiTablePtr table) + { + TableEndCellNative(table); + } + + /// + /// To be documented. + /// + public static void TableEndCell(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableEndCellNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableGetCellBgRectNative(ImRect* pOut, ImGuiTable* table, int columnN) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1143])(pOut, table, columnN); + #else + ((delegate* unmanaged[Cdecl])funcTable[1143])((nint)pOut, (nint)table, columnN); + #endif + } + + /// + /// To be documented. + /// + public static ImRect TableGetCellBgRect(ImGuiTablePtr table, int columnN) + { + ImRect ret; + TableGetCellBgRectNative(&ret, table, columnN); + return ret; + } + + /// + /// To be documented. + /// + public static void TableGetCellBgRect(ImRectPtr pOut, ImGuiTablePtr table, int columnN) + { + TableGetCellBgRectNative(pOut, table, columnN); + } + + /// + /// To be documented. + /// + public static void TableGetCellBgRect(ref ImRect pOut, ImGuiTablePtr table, int columnN) + { + fixed (ImRect* ppOut = &pOut) + { + TableGetCellBgRectNative((ImRect*)ppOut, table, columnN); + } + } + + /// + /// To be documented. + /// + public static ImRect TableGetCellBgRect(ref ImGuiTable table, int columnN) + { + fixed (ImGuiTable* ptable = &table) + { + ImRect ret; + TableGetCellBgRectNative(&ret, (ImGuiTable*)ptable, columnN); + return ret; + } + } + + /// + /// To be documented. + /// + public static void TableGetCellBgRect(ImRectPtr pOut, ref ImGuiTable table, int columnN) + { + fixed (ImGuiTable* ptable = &table) + { + TableGetCellBgRectNative(pOut, (ImGuiTable*)ptable, columnN); + } + } + + /// + /// To be documented. + /// + public static void TableGetCellBgRect(ref ImRect pOut, ref ImGuiTable table, int columnN) + { + fixed (ImRect* ppOut = &pOut) + { + fixed (ImGuiTable* ptable = &table) + { + TableGetCellBgRectNative((ImRect*)ppOut, (ImGuiTable*)ptable, columnN); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* TableGetColumnNameNative(ImGuiTable* table, int columnN) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1144])(table, columnN); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[1144])((nint)table, columnN); + #endif + } + + /// + /// To be documented. + /// + public static byte* TableGetColumnName(ImGuiTablePtr table, int columnN) + { + byte* ret = TableGetColumnNameNative(table, columnN); + return ret; + } + + /// + /// To be documented. + /// + public static string TableGetColumnNameS(ImGuiTablePtr table, int columnN) + { + string ret = Utils.DecodeStringUTF8(TableGetColumnNameNative(table, columnN)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* TableGetColumnName(ref ImGuiTable table, int columnN) + { + fixed (ImGuiTable* ptable = &table) + { + byte* ret = TableGetColumnNameNative((ImGuiTable*)ptable, columnN); + return ret; + } + } + + /// + /// To be documented. + /// + public static string TableGetColumnNameS(ref ImGuiTable table, int columnN) + { + fixed (ImGuiTable* ptable = &table) + { + string ret = Utils.DecodeStringUTF8(TableGetColumnNameNative((ImGuiTable*)ptable, columnN)); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint TableGetColumnResizeIDNative(ImGuiTable* table, int columnN, int instanceNo) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1145])(table, columnN, instanceNo); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[1145])((nint)table, columnN, instanceNo); + #endif + } + + /// + /// To be documented. + /// + public static uint TableGetColumnResizeID(ImGuiTablePtr table, int columnN, int instanceNo) + { + uint ret = TableGetColumnResizeIDNative(table, columnN, instanceNo); + return ret; + } + + /// + /// To be documented. + /// + public static uint TableGetColumnResizeID(ImGuiTablePtr table, int columnN) + { + uint ret = TableGetColumnResizeIDNative(table, columnN, (int)(0)); + return ret; + } + + /// + /// To be documented. + /// + public static uint TableGetColumnResizeID(ref ImGuiTable table, int columnN, int instanceNo) + { + fixed (ImGuiTable* ptable = &table) + { + uint ret = TableGetColumnResizeIDNative((ImGuiTable*)ptable, columnN, instanceNo); + return ret; + } + } + + /// + /// To be documented. + /// + public static uint TableGetColumnResizeID(ref ImGuiTable table, int columnN) + { + fixed (ImGuiTable* ptable = &table) + { + uint ret = TableGetColumnResizeIDNative((ImGuiTable*)ptable, columnN, (int)(0)); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float TableGetMaxColumnWidthNative(ImGuiTable* table, int columnN) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1146])(table, columnN); + #else + return (float)((delegate* unmanaged[Cdecl])funcTable[1146])((nint)table, columnN); + #endif + } + + /// + /// To be documented. + /// + public static float TableGetMaxColumnWidth(ImGuiTablePtr table, int columnN) + { + float ret = TableGetMaxColumnWidthNative(table, columnN); + return ret; + } + + /// + /// To be documented. + /// + public static float TableGetMaxColumnWidth(ref ImGuiTable table, int columnN) + { + fixed (ImGuiTable* ptable = &table) + { + float ret = TableGetMaxColumnWidthNative((ImGuiTable*)ptable, columnN); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableSetColumnWidthAutoSingleNative(ImGuiTable* table, int columnN) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1147])(table, columnN); + #else + ((delegate* unmanaged[Cdecl])funcTable[1147])((nint)table, columnN); + #endif + } + + /// + /// To be documented. + /// + public static void TableSetColumnWidthAutoSingle(ImGuiTablePtr table, int columnN) + { + TableSetColumnWidthAutoSingleNative(table, columnN); + } + + /// + /// To be documented. + /// + public static void TableSetColumnWidthAutoSingle(ref ImGuiTable table, int columnN) + { + fixed (ImGuiTable* ptable = &table) + { + TableSetColumnWidthAutoSingleNative((ImGuiTable*)ptable, columnN); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableSetColumnWidthAutoAllNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1148])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1148])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableSetColumnWidthAutoAll(ImGuiTablePtr table) + { + TableSetColumnWidthAutoAllNative(table); + } + + /// + /// To be documented. + /// + public static void TableSetColumnWidthAutoAll(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableSetColumnWidthAutoAllNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableRemoveNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1149])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1149])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableRemove(ImGuiTablePtr table) + { + TableRemoveNative(table); + } + + /// + /// To be documented. + /// + public static void TableRemove(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableRemoveNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableGcCompactTransientBuffersNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1150])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1150])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableGcCompactTransientBuffers(ImGuiTablePtr table) + { + TableGcCompactTransientBuffersNative(table); + } + + /// + /// To be documented. + /// + public static void TableGcCompactTransientBuffers(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableGcCompactTransientBuffersNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableGcCompactTransientBuffersNative(ImGuiTableTempData* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1151])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1151])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableGcCompactTransientBuffers(ImGuiTableTempDataPtr table) + { + TableGcCompactTransientBuffersNative(table); + } + + /// + /// To be documented. + /// + public static void TableGcCompactTransientBuffers(ref ImGuiTableTempData table) + { + fixed (ImGuiTableTempData* ptable = &table) + { + TableGcCompactTransientBuffersNative((ImGuiTableTempData*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableGcCompactSettingsNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1152])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1152])(); + #endif + } + + /// + /// To be documented. + /// + public static void TableGcCompactSettings() + { + TableGcCompactSettingsNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableLoadSettingsNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1153])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1153])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableLoadSettings(ImGuiTablePtr table) + { + TableLoadSettingsNative(table); + } + + /// + /// To be documented. + /// + public static void TableLoadSettings(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableLoadSettingsNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableSaveSettingsNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1154])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1154])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableSaveSettings(ImGuiTablePtr table) + { + TableSaveSettingsNative(table); + } + + /// + /// To be documented. + /// + public static void TableSaveSettings(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableSaveSettingsNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableResetSettingsNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1155])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1155])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void TableResetSettings(ImGuiTablePtr table) + { + TableResetSettingsNative(table); + } + + /// + /// To be documented. + /// + public static void TableResetSettings(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + TableResetSettingsNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTableSettings* TableGetBoundSettingsNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1156])(table); + #else + return (ImGuiTableSettings*)((delegate* unmanaged[Cdecl])funcTable[1156])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTableSettingsPtr TableGetBoundSettings(ImGuiTablePtr table) + { + ImGuiTableSettingsPtr ret = TableGetBoundSettingsNative(table); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiTableSettingsPtr TableGetBoundSettings(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + ImGuiTableSettingsPtr ret = TableGetBoundSettingsNative((ImGuiTable*)ptable); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TableSettingsAddSettingsHandlerNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1157])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1157])(); + #endif + } + + /// + /// To be documented. + /// + public static void TableSettingsAddSettingsHandler() + { + TableSettingsAddSettingsHandlerNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTableSettings* TableSettingsCreateNative(uint id, int columnsCount) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1158])(id, columnsCount); + #else + return (ImGuiTableSettings*)((delegate* unmanaged[Cdecl])funcTable[1158])(id, columnsCount); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTableSettingsPtr TableSettingsCreate(uint id, int columnsCount) + { + ImGuiTableSettingsPtr ret = TableSettingsCreateNative(id, columnsCount); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTableSettings* TableSettingsFindByIDNative(uint id) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1159])(id); + #else + return (ImGuiTableSettings*)((delegate* unmanaged[Cdecl])funcTable[1159])(id); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTableSettingsPtr TableSettingsFindByID(uint id) + { + ImGuiTableSettingsPtr ret = TableSettingsFindByIDNative(id); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte BeginTabBarExNative(ImGuiTabBar* tabBar, ImRect bb, ImGuiTabBarFlags flags, ImGuiDockNode* dockNode) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1160])(tabBar, bb, flags, dockNode); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1160])((nint)tabBar, bb, flags, (nint)dockNode); + #endif + } + + /// + /// To be documented. + /// + public static bool BeginTabBarEx(ImGuiTabBarPtr tabBar, ImRect bb, ImGuiTabBarFlags flags, ImGuiDockNodePtr dockNode) + { + byte ret = BeginTabBarExNative(tabBar, bb, flags, dockNode); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool BeginTabBarEx(ref ImGuiTabBar tabBar, ImRect bb, ImGuiTabBarFlags flags, ImGuiDockNodePtr dockNode) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + byte ret = BeginTabBarExNative((ImGuiTabBar*)ptabBar, bb, flags, dockNode); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTabBarEx(ImGuiTabBarPtr tabBar, ImRect bb, ImGuiTabBarFlags flags, ref ImGuiDockNode dockNode) + { + fixed (ImGuiDockNode* pdockNode = &dockNode) + { + byte ret = BeginTabBarExNative(tabBar, bb, flags, (ImGuiDockNode*)pdockNode); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool BeginTabBarEx(ref ImGuiTabBar tabBar, ImRect bb, ImGuiTabBarFlags flags, ref ImGuiDockNode dockNode) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + fixed (ImGuiDockNode* pdockNode = &dockNode) + { + byte ret = BeginTabBarExNative((ImGuiTabBar*)ptabBar, bb, flags, (ImGuiDockNode*)pdockNode); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTabItem* TabBarFindTabByIDNative(ImGuiTabBar* tabBar, uint tabId) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1161])(tabBar, tabId); + #else + return (ImGuiTabItem*)((delegate* unmanaged[Cdecl])funcTable[1161])((nint)tabBar, tabId); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTabItemPtr TabBarFindTabByID(ImGuiTabBarPtr tabBar, uint tabId) + { + ImGuiTabItemPtr ret = TabBarFindTabByIDNative(tabBar, tabId); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiTabItemPtr TabBarFindTabByID(ref ImGuiTabBar tabBar, uint tabId) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + ImGuiTabItemPtr ret = TabBarFindTabByIDNative((ImGuiTabBar*)ptabBar, tabId); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiTabItem* TabBarFindMostRecentlySelectedTabForActiveWindowNative(ImGuiTabBar* tabBar) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1162])(tabBar); + #else + return (ImGuiTabItem*)((delegate* unmanaged[Cdecl])funcTable[1162])((nint)tabBar); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiTabItemPtr TabBarFindMostRecentlySelectedTabForActiveWindow(ImGuiTabBarPtr tabBar) + { + ImGuiTabItemPtr ret = TabBarFindMostRecentlySelectedTabForActiveWindowNative(tabBar); + return ret; + } + + /// + /// To be documented. + /// + public static ImGuiTabItemPtr TabBarFindMostRecentlySelectedTabForActiveWindow(ref ImGuiTabBar tabBar) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + ImGuiTabItemPtr ret = TabBarFindMostRecentlySelectedTabForActiveWindowNative((ImGuiTabBar*)ptabBar); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TabBarAddTabNative(ImGuiTabBar* tabBar, ImGuiTabItemFlags tabFlags, ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1163])(tabBar, tabFlags, window); + #else + ((delegate* unmanaged[Cdecl])funcTable[1163])((nint)tabBar, tabFlags, (nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void TabBarAddTab(ImGuiTabBarPtr tabBar, ImGuiTabItemFlags tabFlags, ImGuiWindowPtr window) + { + TabBarAddTabNative(tabBar, tabFlags, window); + } + + /// + /// To be documented. + /// + public static void TabBarAddTab(ref ImGuiTabBar tabBar, ImGuiTabItemFlags tabFlags, ImGuiWindowPtr window) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + TabBarAddTabNative((ImGuiTabBar*)ptabBar, tabFlags, window); + } + } + + /// + /// To be documented. + /// + public static void TabBarAddTab(ImGuiTabBarPtr tabBar, ImGuiTabItemFlags tabFlags, ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + TabBarAddTabNative(tabBar, tabFlags, (ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + public static void TabBarAddTab(ref ImGuiTabBar tabBar, ImGuiTabItemFlags tabFlags, ref ImGuiWindow window) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + fixed (ImGuiWindow* pwindow = &window) + { + TabBarAddTabNative((ImGuiTabBar*)ptabBar, tabFlags, (ImGuiWindow*)pwindow); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TabBarRemoveTabNative(ImGuiTabBar* tabBar, uint tabId) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1164])(tabBar, tabId); + #else + ((delegate* unmanaged[Cdecl])funcTable[1164])((nint)tabBar, tabId); + #endif + } + + /// + /// To be documented. + /// + public static void TabBarRemoveTab(ImGuiTabBarPtr tabBar, uint tabId) + { + TabBarRemoveTabNative(tabBar, tabId); + } + + /// + /// To be documented. + /// + public static void TabBarRemoveTab(ref ImGuiTabBar tabBar, uint tabId) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + TabBarRemoveTabNative((ImGuiTabBar*)ptabBar, tabId); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TabBarCloseTabNative(ImGuiTabBar* tabBar, ImGuiTabItem* tab) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1165])(tabBar, tab); + #else + ((delegate* unmanaged[Cdecl])funcTable[1165])((nint)tabBar, (nint)tab); + #endif + } + + /// + /// To be documented. + /// + public static void TabBarCloseTab(ImGuiTabBarPtr tabBar, ImGuiTabItemPtr tab) + { + TabBarCloseTabNative(tabBar, tab); + } + + /// + /// To be documented. + /// + public static void TabBarCloseTab(ref ImGuiTabBar tabBar, ImGuiTabItemPtr tab) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + TabBarCloseTabNative((ImGuiTabBar*)ptabBar, tab); + } + } + + /// + /// To be documented. + /// + public static void TabBarCloseTab(ImGuiTabBarPtr tabBar, ref ImGuiTabItem tab) + { + fixed (ImGuiTabItem* ptab = &tab) + { + TabBarCloseTabNative(tabBar, (ImGuiTabItem*)ptab); + } + } + + /// + /// To be documented. + /// + public static void TabBarCloseTab(ref ImGuiTabBar tabBar, ref ImGuiTabItem tab) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + fixed (ImGuiTabItem* ptab = &tab) + { + TabBarCloseTabNative((ImGuiTabBar*)ptabBar, (ImGuiTabItem*)ptab); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TabBarQueueReorderNative(ImGuiTabBar* tabBar, ImGuiTabItem* tab, int offset) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1166])(tabBar, tab, offset); + #else + ((delegate* unmanaged[Cdecl])funcTable[1166])((nint)tabBar, (nint)tab, offset); + #endif + } + + /// + /// To be documented. + /// + public static void TabBarQueueReorder(ImGuiTabBarPtr tabBar, ImGuiTabItemPtr tab, int offset) + { + TabBarQueueReorderNative(tabBar, tab, offset); + } + + /// + /// To be documented. + /// + public static void TabBarQueueReorder(ref ImGuiTabBar tabBar, ImGuiTabItemPtr tab, int offset) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + TabBarQueueReorderNative((ImGuiTabBar*)ptabBar, tab, offset); + } + } + + /// + /// To be documented. + /// + public static void TabBarQueueReorder(ImGuiTabBarPtr tabBar, ref ImGuiTabItem tab, int offset) + { + fixed (ImGuiTabItem* ptab = &tab) + { + TabBarQueueReorderNative(tabBar, (ImGuiTabItem*)ptab, offset); + } + } + + /// + /// To be documented. + /// + public static void TabBarQueueReorder(ref ImGuiTabBar tabBar, ref ImGuiTabItem tab, int offset) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + fixed (ImGuiTabItem* ptab = &tab) + { + TabBarQueueReorderNative((ImGuiTabBar*)ptabBar, (ImGuiTabItem*)ptab, offset); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TabBarQueueReorderFromMousePosNative(ImGuiTabBar* tabBar, ImGuiTabItem* tab, Vector2 mousePos) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1167])(tabBar, tab, mousePos); + #else + ((delegate* unmanaged[Cdecl])funcTable[1167])((nint)tabBar, (nint)tab, mousePos); + #endif + } + + /// + /// To be documented. + /// + public static void TabBarQueueReorderFromMousePos(ImGuiTabBarPtr tabBar, ImGuiTabItemPtr tab, Vector2 mousePos) + { + TabBarQueueReorderFromMousePosNative(tabBar, tab, mousePos); + } + + /// + /// To be documented. + /// + public static void TabBarQueueReorderFromMousePos(ref ImGuiTabBar tabBar, ImGuiTabItemPtr tab, Vector2 mousePos) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + TabBarQueueReorderFromMousePosNative((ImGuiTabBar*)ptabBar, tab, mousePos); + } + } + + /// + /// To be documented. + /// + public static void TabBarQueueReorderFromMousePos(ImGuiTabBarPtr tabBar, ref ImGuiTabItem tab, Vector2 mousePos) + { + fixed (ImGuiTabItem* ptab = &tab) + { + TabBarQueueReorderFromMousePosNative(tabBar, (ImGuiTabItem*)ptab, mousePos); + } + } + + /// + /// To be documented. + /// + public static void TabBarQueueReorderFromMousePos(ref ImGuiTabBar tabBar, ref ImGuiTabItem tab, Vector2 mousePos) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + fixed (ImGuiTabItem* ptab = &tab) + { + TabBarQueueReorderFromMousePosNative((ImGuiTabBar*)ptabBar, (ImGuiTabItem*)ptab, mousePos); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte TabBarProcessReorderNative(ImGuiTabBar* tabBar) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1168])(tabBar); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1168])((nint)tabBar); + #endif + } + + /// + /// To be documented. + /// + public static bool TabBarProcessReorder(ImGuiTabBarPtr tabBar) + { + byte ret = TabBarProcessReorderNative(tabBar); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TabBarProcessReorder(ref ImGuiTabBar tabBar) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + byte ret = TabBarProcessReorderNative((ImGuiTabBar*)ptabBar); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte TabItemExNative(ImGuiTabBar* tabBar, byte* label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindow* dockedWindow) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1169])(tabBar, label, pOpen, flags, dockedWindow); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1169])((nint)tabBar, (nint)label, (nint)pOpen, flags, (nint)dockedWindow); + #endif + } + + /// + /// To be documented. + /// + public static bool TabItemEx(ImGuiTabBarPtr tabBar, byte* label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) + { + byte ret = TabItemExNative(tabBar, label, pOpen, flags, dockedWindow); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TabItemEx(ref ImGuiTabBar tabBar, byte* label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + byte ret = TabItemExNative((ImGuiTabBar*)ptabBar, label, pOpen, flags, dockedWindow); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TabItemEx(ImGuiTabBarPtr tabBar, ref byte label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) + { + fixed (byte* plabel = &label) + { + byte ret = TabItemExNative(tabBar, (byte*)plabel, pOpen, flags, dockedWindow); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TabItemEx(ImGuiTabBarPtr tabBar, ReadOnlySpan label, bool* pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) + { + fixed (byte* plabel = label) + { + byte ret = TabItemExNative(tabBar, (byte*)plabel, pOpen, flags, dockedWindow); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative(tabBar, pStr0, pOpen, flags, dockedWindow); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, (byte*)plabel, pOpen, flags, dockedWindow); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, (byte*)plabel, pOpen, flags, dockedWindow); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, pStr0, pOpen, flags, dockedWindow); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TabItemEx(ImGuiTabBarPtr tabBar, byte* label, ref bool pOpen, ImGuiTabItemFlags flags, ImGuiWindowPtr dockedWindow) + { + fixed (bool* ppOpen = &pOpen) + { + byte ret = TabItemExNative(tabBar, label, (bool*)ppOpen, flags, dockedWindow); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, label, (bool*)ppOpen, flags, dockedWindow); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative(tabBar, (byte*)plabel, (bool*)ppOpen, flags, dockedWindow); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative(tabBar, (byte*)plabel, (bool*)ppOpen, flags, dockedWindow); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative(tabBar, pStr0, (bool*)ppOpen, flags, dockedWindow); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, (byte*)plabel, (bool*)ppOpen, flags, dockedWindow); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, (byte*)plabel, (bool*)ppOpen, flags, dockedWindow); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, pStr0, (bool*)ppOpen, flags, dockedWindow); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool TabItemEx(ImGuiTabBarPtr tabBar, byte* label, bool* pOpen, ImGuiTabItemFlags flags, ref ImGuiWindow dockedWindow) + { + fixed (ImGuiWindow* pdockedWindow = &dockedWindow) + { + byte ret = TabItemExNative(tabBar, label, pOpen, flags, (ImGuiWindow*)pdockedWindow); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, label, pOpen, flags, (ImGuiWindow*)pdockedWindow); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative(tabBar, (byte*)plabel, pOpen, flags, (ImGuiWindow*)pdockedWindow); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative(tabBar, (byte*)plabel, pOpen, flags, (ImGuiWindow*)pdockedWindow); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative(tabBar, pStr0, pOpen, flags, (ImGuiWindow*)pdockedWindow); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, (byte*)plabel, pOpen, flags, (ImGuiWindow*)pdockedWindow); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, (byte*)plabel, pOpen, flags, (ImGuiWindow*)pdockedWindow); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, pStr0, pOpen, flags, (ImGuiWindow*)pdockedWindow); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative(tabBar, label, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, label, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative(tabBar, (byte*)plabel, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative(tabBar, (byte*)plabel, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative(tabBar, pStr0, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, (byte*)plabel, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); + return ret != 0; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, (byte*)plabel, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); + return ret != 0; + } + } + } + } + } + + /// + /// To be documented. + /// + 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 = TabItemExNative((ImGuiTabBar*)ptabBar, pStr0, (bool*)ppOpen, flags, (ImGuiWindow*)pdockedWindow); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TabItemCalcSizeNative(Vector2* pOut, byte* label, byte hasCloseButton) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1170])(pOut, label, hasCloseButton); + #else + ((delegate* unmanaged[Cdecl])funcTable[1170])((nint)pOut, (nint)label, hasCloseButton); + #endif + } + + /// + /// To be documented. + /// + public static Vector2 TabItemCalcSize(byte* label, bool hasCloseButton) + { + Vector2 ret; + TabItemCalcSizeNative(&ret, label, hasCloseButton ? (byte)1 : (byte)0); + return ret; + } + + /// + /// To be documented. + /// + public static void TabItemCalcSize(Vector2* pOut, byte* label, bool hasCloseButton) + { + TabItemCalcSizeNative(pOut, label, hasCloseButton ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void TabItemCalcSize(ref Vector2 pOut, byte* label, bool hasCloseButton) + { + fixed (Vector2* ppOut = &pOut) + { + TabItemCalcSizeNative((Vector2*)ppOut, label, hasCloseButton ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static Vector2 TabItemCalcSize(ref byte label, bool hasCloseButton) + { + fixed (byte* plabel = &label) + { + Vector2 ret; + TabItemCalcSizeNative(&ret, (byte*)plabel, hasCloseButton ? (byte)1 : (byte)0); + return ret; + } + } + + /// + /// To be documented. + /// + public static Vector2 TabItemCalcSize(ReadOnlySpan label, bool hasCloseButton) + { + fixed (byte* plabel = label) + { + Vector2 ret; + TabItemCalcSizeNative(&ret, (byte*)plabel, hasCloseButton ? (byte)1 : (byte)0); + return ret; + } + } + + /// + /// To be documented. + /// + 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; + TabItemCalcSizeNative(&ret, pStr0, hasCloseButton ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static void TabItemCalcSize(ref Vector2 pOut, ref byte label, bool hasCloseButton) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (byte* plabel = &label) + { + TabItemCalcSizeNative((Vector2*)ppOut, (byte*)plabel, hasCloseButton ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void TabItemCalcSize(ref Vector2 pOut, ReadOnlySpan label, bool hasCloseButton) + { + fixed (Vector2* ppOut = &pOut) + { + fixed (byte* plabel = label) + { + TabItemCalcSizeNative((Vector2*)ppOut, (byte*)plabel, hasCloseButton ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + 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; + } + TabItemCalcSizeNative((Vector2*)ppOut, pStr0, hasCloseButton ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void TabItemCalcSize(Vector2* pOut, ref byte label, bool hasCloseButton) + { + fixed (byte* plabel = &label) + { + TabItemCalcSizeNative(pOut, (byte*)plabel, hasCloseButton ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void TabItemCalcSize(Vector2* pOut, ReadOnlySpan label, bool hasCloseButton) + { + fixed (byte* plabel = label) + { + TabItemCalcSizeNative(pOut, (byte*)plabel, hasCloseButton ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + 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; + } + TabItemCalcSizeNative(pOut, pStr0, hasCloseButton ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TabItemBackgroundNative(ImDrawList* drawList, ImRect bb, ImGuiTabItemFlags flags, uint col) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1171])(drawList, bb, flags, col); + #else + ((delegate* unmanaged[Cdecl])funcTable[1171])((nint)drawList, bb, flags, col); + #endif + } + + /// + /// To be documented. + /// + public static void TabItemBackground(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, uint col) + { + TabItemBackgroundNative(drawList, bb, flags, col); + } + + /// + /// To be documented. + /// + public static void TabItemBackground(ref ImDrawList drawList, ImRect bb, ImGuiTabItemFlags flags, uint col) + { + fixed (ImDrawList* pdrawList = &drawList) + { + TabItemBackgroundNative((ImDrawList*)pdrawList, bb, flags, col); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TabItemLabelAndCloseButtonNative(ImDrawList* drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, byte* label, uint tabId, uint closeButtonId, byte isContentsVisible, bool* outJustClosed, bool* outTextClipped) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1172])(drawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible, outJustClosed, outTextClipped); + #else + ((delegate* unmanaged[Cdecl])funcTable[1172])((nint)drawList, bb, flags, framePadding, (nint)label, tabId, closeButtonId, isContentsVisible, (nint)outJustClosed, (nint)outTextClipped); + #endif + } + + /// + /// To be documented. + /// + public static void TabItemLabelAndCloseButton(ImDrawListPtr drawList, ImRect bb, ImGuiTabItemFlags flags, Vector2 framePadding, byte* label, uint tabId, uint closeButtonId, bool isContentsVisible, bool* outJustClosed, bool* outTextClipped) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); + } + } + + /// + /// To be documented. + /// + 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; + } + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); + } + } + } + + /// + /// To be documented. + /// + 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; + } + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, outTextClipped); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, outTextClipped); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, outJustClosed, (bool*)poutTextClipped); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, label, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative(drawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); + } + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, (byte*)plabel, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); + } + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + TabItemLabelAndCloseButtonNative((ImDrawList*)pdrawList, bb, flags, framePadding, pStr0, tabId, closeButtonId, isContentsVisible ? (byte)1 : (byte)0, (bool*)poutJustClosed, (bool*)poutTextClipped); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderTextNative(Vector2 pos, byte* text, byte* textEnd, byte hideTextAfterHash) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1173])(pos, text, textEnd, hideTextAfterHash); + #else + ((delegate* unmanaged[Cdecl])funcTable[1173])(pos, (nint)text, (nint)textEnd, hideTextAfterHash); + #endif + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, byte* text, byte* textEnd, bool hideTextAfterHash) + { + RenderTextNative(pos, text, textEnd, hideTextAfterHash ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, byte* text, byte* textEnd) + { + RenderTextNative(pos, text, textEnd, (byte)(1)); + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, byte* text) + { + RenderTextNative(pos, text, (byte*)(default), (byte)(1)); + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, byte* text, bool hideTextAfterHash) + { + RenderTextNative(pos, text, (byte*)(default), hideTextAfterHash ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ref byte text, byte* textEnd, bool hideTextAfterHash) + { + fixed (byte* ptext = &text) + { + RenderTextNative(pos, (byte*)ptext, textEnd, hideTextAfterHash ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ref byte text, byte* textEnd) + { + fixed (byte* ptext = &text) + { + RenderTextNative(pos, (byte*)ptext, textEnd, (byte)(1)); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ref byte text) + { + fixed (byte* ptext = &text) + { + RenderTextNative(pos, (byte*)ptext, (byte*)(default), (byte)(1)); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ref byte text, bool hideTextAfterHash) + { + fixed (byte* ptext = &text) + { + RenderTextNative(pos, (byte*)ptext, (byte*)(default), hideTextAfterHash ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ReadOnlySpan text, byte* textEnd, bool hideTextAfterHash) + { + fixed (byte* ptext = text) + { + RenderTextNative(pos, (byte*)ptext, textEnd, hideTextAfterHash ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ReadOnlySpan text, byte* textEnd) + { + fixed (byte* ptext = text) + { + RenderTextNative(pos, (byte*)ptext, textEnd, (byte)(1)); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ReadOnlySpan text) + { + fixed (byte* ptext = text) + { + RenderTextNative(pos, (byte*)ptext, (byte*)(default), (byte)(1)); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ReadOnlySpan text, bool hideTextAfterHash) + { + fixed (byte* ptext = text) + { + RenderTextNative(pos, (byte*)ptext, (byte*)(default), hideTextAfterHash ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, string text, byte* textEnd, bool hideTextAfterHash) + { + 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; + } + RenderTextNative(pos, pStr0, textEnd, hideTextAfterHash ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, string text, byte* textEnd) + { + 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; + } + RenderTextNative(pos, pStr0, textEnd, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, 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; + } + RenderTextNative(pos, pStr0, (byte*)(default), (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, string text, bool hideTextAfterHash) + { + 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; + } + RenderTextNative(pos, pStr0, (byte*)(default), hideTextAfterHash ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, byte* text, ref byte textEnd, bool hideTextAfterHash) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextNative(pos, text, (byte*)ptextEnd, hideTextAfterHash ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, byte* text, ref byte textEnd) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextNative(pos, text, (byte*)ptextEnd, (byte)(1)); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, byte* text, ReadOnlySpan textEnd, bool hideTextAfterHash) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextNative(pos, text, (byte*)ptextEnd, hideTextAfterHash ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, byte* text, ReadOnlySpan textEnd) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextNative(pos, text, (byte*)ptextEnd, (byte)(1)); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, byte* text, string textEnd, bool hideTextAfterHash) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextNative(pos, text, pStr0, hideTextAfterHash ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, byte* text, string textEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextNative(pos, text, pStr0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ref byte text, ref byte textEnd, bool hideTextAfterHash) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextNative(pos, (byte*)ptext, (byte*)ptextEnd, hideTextAfterHash ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ref byte text, ref byte textEnd) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextNative(pos, (byte*)ptext, (byte*)ptextEnd, (byte)(1)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ReadOnlySpan text, ReadOnlySpan textEnd, bool hideTextAfterHash) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextNative(pos, (byte*)ptext, (byte*)ptextEnd, hideTextAfterHash ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ReadOnlySpan text, ReadOnlySpan textEnd) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextNative(pos, (byte*)ptext, (byte*)ptextEnd, (byte)(1)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, string text, string textEnd, bool hideTextAfterHash) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextNative(pos, pStr0, pStr1, hideTextAfterHash ? (byte)1 : (byte)0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, string text, string textEnd) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextNative(pos, pStr0, pStr1, (byte)(1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ref byte text, ReadOnlySpan textEnd, bool hideTextAfterHash) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextNative(pos, (byte*)ptext, (byte*)ptextEnd, hideTextAfterHash ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ref byte text, ReadOnlySpan textEnd) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextNative(pos, (byte*)ptext, (byte*)ptextEnd, (byte)(1)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ref byte text, string textEnd, bool hideTextAfterHash) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextNative(pos, (byte*)ptext, pStr0, hideTextAfterHash ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ref byte text, string textEnd) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextNative(pos, (byte*)ptext, pStr0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ReadOnlySpan text, ref byte textEnd, bool hideTextAfterHash) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextNative(pos, (byte*)ptext, (byte*)ptextEnd, hideTextAfterHash ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ReadOnlySpan text, ref byte textEnd) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextNative(pos, (byte*)ptext, (byte*)ptextEnd, (byte)(1)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ReadOnlySpan text, string textEnd, bool hideTextAfterHash) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextNative(pos, (byte*)ptext, pStr0, hideTextAfterHash ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, ReadOnlySpan text, string textEnd) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextNative(pos, (byte*)ptext, pStr0, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, string text, ref byte textEnd, bool hideTextAfterHash) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextNative(pos, pStr0, (byte*)ptextEnd, hideTextAfterHash ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, string text, ref byte textEnd) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextNative(pos, pStr0, (byte*)ptextEnd, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, string text, ReadOnlySpan textEnd, bool hideTextAfterHash) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextNative(pos, pStr0, (byte*)ptextEnd, hideTextAfterHash ? (byte)1 : (byte)0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderText(Vector2 pos, string text, ReadOnlySpan textEnd) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextNative(pos, pStr0, (byte*)ptextEnd, (byte)(1)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderTextWrappedNative(Vector2 pos, byte* text, byte* textEnd, float wrapWidth) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1174])(pos, text, textEnd, wrapWidth); + #else + ((delegate* unmanaged[Cdecl])funcTable[1174])(pos, (nint)text, (nint)textEnd, wrapWidth); + #endif + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, byte* text, byte* textEnd, float wrapWidth) + { + RenderTextWrappedNative(pos, text, textEnd, wrapWidth); + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, ref byte text, byte* textEnd, float wrapWidth) + { + fixed (byte* ptext = &text) + { + RenderTextWrappedNative(pos, (byte*)ptext, textEnd, wrapWidth); + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, ReadOnlySpan text, byte* textEnd, float wrapWidth) + { + fixed (byte* ptext = text) + { + RenderTextWrappedNative(pos, (byte*)ptext, textEnd, wrapWidth); + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, string text, byte* textEnd, float wrapWidth) + { + 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; + } + RenderTextWrappedNative(pos, pStr0, textEnd, wrapWidth); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, byte* text, ref byte textEnd, float wrapWidth) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextWrappedNative(pos, text, (byte*)ptextEnd, wrapWidth); + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, byte* text, ReadOnlySpan textEnd, float wrapWidth) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextWrappedNative(pos, text, (byte*)ptextEnd, wrapWidth); + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, byte* text, string textEnd, float wrapWidth) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextWrappedNative(pos, text, pStr0, wrapWidth); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, ref byte text, ref byte textEnd, float wrapWidth) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextWrappedNative(pos, (byte*)ptext, (byte*)ptextEnd, wrapWidth); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, ReadOnlySpan text, ReadOnlySpan textEnd, float wrapWidth) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextWrappedNative(pos, (byte*)ptext, (byte*)ptextEnd, wrapWidth); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, string text, string textEnd, float wrapWidth) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextWrappedNative(pos, pStr0, pStr1, wrapWidth); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, ref byte text, ReadOnlySpan textEnd, float wrapWidth) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextWrappedNative(pos, (byte*)ptext, (byte*)ptextEnd, wrapWidth); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, ref byte text, string textEnd, float wrapWidth) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextWrappedNative(pos, (byte*)ptext, pStr0, wrapWidth); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, ReadOnlySpan text, ref byte textEnd, float wrapWidth) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextWrappedNative(pos, (byte*)ptext, (byte*)ptextEnd, wrapWidth); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, ReadOnlySpan text, string textEnd, float wrapWidth) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextWrappedNative(pos, (byte*)ptext, pStr0, wrapWidth); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, string text, ref byte textEnd, float wrapWidth) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextWrappedNative(pos, pStr0, (byte*)ptextEnd, wrapWidth); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextWrapped(Vector2 pos, string text, ReadOnlySpan textEnd, float wrapWidth) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextWrappedNative(pos, pStr0, (byte*)ptextEnd, wrapWidth); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.012.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.012.cs new file mode 100644 index 000000000..9e322409d --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.012.cs @@ -0,0 +1,5033 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderTextClippedNative(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRect* clipRect) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1175])(posMin, posMax, text, textEnd, textSizeIfKnown, align, clipRect); + #else + ((delegate* unmanaged[Cdecl])funcTable[1175])(posMin, posMax, (nint)text, (nint)textEnd, (nint)textSizeIfKnown, align, (nint)clipRect); + #endif + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + RenderTextClippedNative(posMin, posMax, text, textEnd, textSizeIfKnown, align, clipRect); + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + RenderTextClippedNative(posMin, posMax, text, textEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + RenderTextClippedNative(posMin, posMax, text, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = text) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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; + } + RenderTextClippedNative(posMin, posMax, pStr0, textEnd, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + 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; + } + RenderTextClippedNative(posMin, posMax, pStr0, textEnd, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown) + { + 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; + } + RenderTextClippedNative(posMin, posMax, pStr0, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + 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; + } + RenderTextClippedNative(posMin, posMax, pStr0, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedNative(posMin, posMax, text, pStr0, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedNative(posMin, posMax, text, pStr0, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedNative(posMin, posMax, text, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedNative(posMin, posMax, text, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextClippedNative(posMin, posMax, pStr0, pStr1, textSizeIfKnown, align, clipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextClippedNative(posMin, posMax, pStr0, pStr1, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextClippedNative(posMin, posMax, pStr0, pStr1, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextClippedNative(posMin, posMax, pStr0, pStr1, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, textEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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 (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, textEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + 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 (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, pStr0, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, pStr1, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, pStr1, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClipped(Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedNative(posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderTextClippedExNative(ImDrawList* drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRect* clipRect) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1176])(drawList, posMin, posMax, text, textEnd, textSizeIfKnown, align, clipRect); + #else + ((delegate* unmanaged[Cdecl])funcTable[1176])((nint)drawList, posMin, posMax, (nint)text, (nint)textEnd, (nint)textSizeIfKnown, align, (nint)clipRect); + #endif + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, textEnd, textSizeIfKnown, align, clipRect); + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, textEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, textEnd, textSizeIfKnown, align, clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, textEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = text) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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; + } + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, textEnd, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + 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; + } + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, textEnd, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown) + { + 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; + } + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + 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; + } + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.013.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.013.cs new file mode 100644 index 000000000..1dd7a6cb4 --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.013.cs @@ -0,0 +1,5035 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, textEnd, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, textEnd, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, text, pStr0, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, text, pStr0, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, text, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, text, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, pStr0, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, pStr0, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, textSizeIfKnown, align, clipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, textSizeIfKnown, align, clipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.014.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.014.cs new file mode 100644 index 000000000..514328750 --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.014.cs @@ -0,0 +1,5048 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ImRectPtr clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), clipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, textEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, textEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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 (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, textEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + 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 (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, textEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, textEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, pStr0, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, pStr0, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, textSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, byte* textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, textEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, byte* text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, text, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + fixed (ImRect* pclipRect = &clipRect) + { + RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderTextEllipsisNative(ImDrawList* drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, byte* textEnd, Vector2* textSizeIfKnown) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1177])(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, textEnd, textSizeIfKnown); + #else + ((delegate* unmanaged[Cdecl])funcTable[1177])((nint)drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (nint)text, (nint)textEnd, (nint)textSizeIfKnown); + #endif + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, byte* textEnd, Vector2* textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, textEnd, textSizeIfKnown); + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, textEnd, textSizeIfKnown); + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, textSizeIfKnown); + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = text) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, textSizeIfKnown); + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, byte* textEnd, Vector2* textSizeIfKnown) + { + 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; + } + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, textEnd, textSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, textSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, textSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, byte* textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, textEnd, textSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, textSizeIfKnown); + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, textSizeIfKnown); + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, string textEnd, Vector2* textSizeIfKnown) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, pStr0, textSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, textSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, textSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, pStr0, textSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, string textEnd, Vector2* textSizeIfKnown) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, pStr1, textSizeIfKnown); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, textSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, textSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ref byte textEnd, Vector2* textSizeIfKnown) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, textSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, textSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, pStr1, textSizeIfKnown); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, textSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.015.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.015.cs new file mode 100644 index 000000000..056e22877 --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.015.cs @@ -0,0 +1,5033 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, string textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, textSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ref byte textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, textSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ReadOnlySpan textEnd, Vector2* textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, textSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, textEnd, (Vector2*)ptextSizeIfKnown); + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, textEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, textEnd, (Vector2*)ptextSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, byte* textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, textEnd, (Vector2*)ptextSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, string textEnd, ref Vector2 textSizeIfKnown) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, pStr0, (Vector2*)ptextSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, pStr0, (Vector2*)ptextSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, string textEnd, ref Vector2 textSizeIfKnown) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, pStr1, (Vector2*)ptextSizeIfKnown); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, pStr1, (Vector2*)ptextSizeIfKnown); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan text, string textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ref byte textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = &textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ReadOnlySpan textEnd, ref Vector2 textSizeIfKnown) + { + fixed (ImDrawList* pdrawList = &drawList) + { + 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 (byte* ptextEnd = textEnd) + { + fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown) + { + RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderFrameNative(Vector2 pMin, Vector2 pMax, uint fillCol, byte border, float rounding) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1178])(pMin, pMax, fillCol, border, rounding); + #else + ((delegate* unmanaged[Cdecl])funcTable[1178])(pMin, pMax, fillCol, border, rounding); + #endif + } + + /// + /// To be documented. + /// + public static void RenderFrame(Vector2 pMin, Vector2 pMax, uint fillCol, bool border, float rounding) + { + RenderFrameNative(pMin, pMax, fillCol, border ? (byte)1 : (byte)0, rounding); + } + + /// + /// To be documented. + /// + public static void RenderFrame(Vector2 pMin, Vector2 pMax, uint fillCol, bool border) + { + RenderFrameNative(pMin, pMax, fillCol, border ? (byte)1 : (byte)0, (float)(0.0f)); + } + + /// + /// To be documented. + /// + public static void RenderFrame(Vector2 pMin, Vector2 pMax, uint fillCol) + { + RenderFrameNative(pMin, pMax, fillCol, (byte)(1), (float)(0.0f)); + } + + /// + /// To be documented. + /// + public static void RenderFrame(Vector2 pMin, Vector2 pMax, uint fillCol, float rounding) + { + RenderFrameNative(pMin, pMax, fillCol, (byte)(1), rounding); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderFrameBorderNative(Vector2 pMin, Vector2 pMax, float rounding) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1179])(pMin, pMax, rounding); + #else + ((delegate* unmanaged[Cdecl])funcTable[1179])(pMin, pMax, rounding); + #endif + } + + /// + /// To be documented. + /// + public static void RenderFrameBorder(Vector2 pMin, Vector2 pMax, float rounding) + { + RenderFrameBorderNative(pMin, pMax, rounding); + } + + /// + /// To be documented. + /// + public static void RenderFrameBorder(Vector2 pMin, Vector2 pMax) + { + RenderFrameBorderNative(pMin, pMax, (float)(0.0f)); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderColorRectWithAlphaCheckerboardNative(ImDrawList* drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, float rounding, ImDrawFlags flags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1180])(drawList, pMin, pMax, fillCol, gridStep, gridOff, rounding, flags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1180])((nint)drawList, pMin, pMax, fillCol, gridStep, gridOff, rounding, flags); + #endif + } + + /// + /// To be documented. + /// + public static void RenderColorRectWithAlphaCheckerboard(ImDrawListPtr drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, float rounding, ImDrawFlags flags) + { + RenderColorRectWithAlphaCheckerboardNative(drawList, pMin, pMax, fillCol, gridStep, gridOff, rounding, flags); + } + + /// + /// To be documented. + /// + public static void RenderColorRectWithAlphaCheckerboard(ImDrawListPtr drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, float rounding) + { + RenderColorRectWithAlphaCheckerboardNative(drawList, pMin, pMax, fillCol, gridStep, gridOff, rounding, (ImDrawFlags)(0)); + } + + /// + /// To be documented. + /// + public static void RenderColorRectWithAlphaCheckerboard(ImDrawListPtr drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff) + { + RenderColorRectWithAlphaCheckerboardNative(drawList, pMin, pMax, fillCol, gridStep, gridOff, (float)(0.0f), (ImDrawFlags)(0)); + } + + /// + /// To be documented. + /// + public static void RenderColorRectWithAlphaCheckerboard(ImDrawListPtr drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, ImDrawFlags flags) + { + RenderColorRectWithAlphaCheckerboardNative(drawList, pMin, pMax, fillCol, gridStep, gridOff, (float)(0.0f), flags); + } + + /// + /// To be documented. + /// + public static void RenderColorRectWithAlphaCheckerboard(ref ImDrawList drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, float rounding, ImDrawFlags flags) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderColorRectWithAlphaCheckerboardNative((ImDrawList*)pdrawList, pMin, pMax, fillCol, gridStep, gridOff, rounding, flags); + } + } + + /// + /// To be documented. + /// + public static void RenderColorRectWithAlphaCheckerboard(ref ImDrawList drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, float rounding) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderColorRectWithAlphaCheckerboardNative((ImDrawList*)pdrawList, pMin, pMax, fillCol, gridStep, gridOff, rounding, (ImDrawFlags)(0)); + } + } + + /// + /// To be documented. + /// + public static void RenderColorRectWithAlphaCheckerboard(ref ImDrawList drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderColorRectWithAlphaCheckerboardNative((ImDrawList*)pdrawList, pMin, pMax, fillCol, gridStep, gridOff, (float)(0.0f), (ImDrawFlags)(0)); + } + } + + /// + /// To be documented. + /// + public static void RenderColorRectWithAlphaCheckerboard(ref ImDrawList drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, ImDrawFlags flags) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderColorRectWithAlphaCheckerboardNative((ImDrawList*)pdrawList, pMin, pMax, fillCol, gridStep, gridOff, (float)(0.0f), flags); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderNavHighlightNative(ImRect bb, uint id, ImGuiNavHighlightFlags flags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1181])(bb, id, flags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1181])(bb, id, flags); + #endif + } + + /// + /// To be documented. + /// + public static void RenderNavHighlight(ImRect bb, uint id, ImGuiNavHighlightFlags flags) + { + RenderNavHighlightNative(bb, id, flags); + } + + /// + /// To be documented. + /// + public static void RenderNavHighlight(ImRect bb, uint id) + { + RenderNavHighlightNative(bb, id, (ImGuiNavHighlightFlags)(ImGuiNavHighlightFlags.TypeDefault)); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* FindRenderedTextEndNative(byte* text, byte* textEnd) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1182])(text, textEnd); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[1182])((nint)text, (nint)textEnd); + #endif + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(byte* text, byte* textEnd) + { + byte* ret = FindRenderedTextEndNative(text, textEnd); + return ret; + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(byte* text) + { + byte* ret = FindRenderedTextEndNative(text, (byte*)(default)); + return ret; + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(byte* text) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(text, (byte*)(default))); + return ret; + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(byte* text, byte* textEnd) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(text, textEnd)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(ref byte text, byte* textEnd) + { + fixed (byte* ptext = &text) + { + byte* ret = FindRenderedTextEndNative((byte*)ptext, textEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(ref byte text) + { + fixed (byte* ptext = &text) + { + byte* ret = FindRenderedTextEndNative((byte*)ptext, (byte*)(default)); + return ret; + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(ref byte text) + { + fixed (byte* ptext = &text) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, (byte*)(default))); + return ret; + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(ref byte text, byte* textEnd) + { + fixed (byte* ptext = &text) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, textEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(ReadOnlySpan text, byte* textEnd) + { + fixed (byte* ptext = text) + { + byte* ret = FindRenderedTextEndNative((byte*)ptext, textEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(ReadOnlySpan text) + { + fixed (byte* ptext = text) + { + byte* ret = FindRenderedTextEndNative((byte*)ptext, (byte*)(default)); + return ret; + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(ReadOnlySpan text) + { + fixed (byte* ptext = text) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, (byte*)(default))); + return ret; + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(ReadOnlySpan text, byte* textEnd) + { + fixed (byte* ptext = text) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, textEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(string text, byte* textEnd) + { + 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; + } + byte* ret = FindRenderedTextEndNative(pStr0, textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(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; + } + byte* ret = FindRenderedTextEndNative(pStr0, (byte*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(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; + } + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(pStr0, (byte*)(default))); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(string text, byte* textEnd) + { + 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; + } + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(pStr0, textEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(byte* text, ref byte textEnd) + { + fixed (byte* ptextEnd = &textEnd) + { + byte* ret = FindRenderedTextEndNative(text, (byte*)ptextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(byte* text, ref byte textEnd) + { + fixed (byte* ptextEnd = &textEnd) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(text, (byte*)ptextEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(byte* text, ReadOnlySpan textEnd) + { + fixed (byte* ptextEnd = textEnd) + { + byte* ret = FindRenderedTextEndNative(text, (byte*)ptextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(byte* text, ReadOnlySpan textEnd) + { + fixed (byte* ptextEnd = textEnd) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(text, (byte*)ptextEnd)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(byte* text, string textEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = FindRenderedTextEndNative(text, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(byte* text, string textEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(text, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(ref byte text, ref byte textEnd) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + byte* ret = FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(ref byte text, ref byte textEnd) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(ReadOnlySpan text, ReadOnlySpan textEnd) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + byte* ret = FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(ReadOnlySpan text, ReadOnlySpan textEnd) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(string text, string textEnd) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* ret = FindRenderedTextEndNative(pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(string text, string textEnd) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(pStr0, pStr1)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(ref byte text, ReadOnlySpan textEnd) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + byte* ret = FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(ref byte text, ReadOnlySpan textEnd) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(ref byte text, string textEnd) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = FindRenderedTextEndNative((byte*)ptext, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(ref byte text, string textEnd) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(ReadOnlySpan text, ref byte textEnd) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + byte* ret = FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(ReadOnlySpan text, ref byte textEnd) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(ReadOnlySpan text, string textEnd) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* ret = FindRenderedTextEndNative((byte*)ptext, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(ReadOnlySpan text, string textEnd) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, pStr0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(string text, ref byte textEnd) + { + 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 (byte* ptextEnd = &textEnd) + { + byte* ret = FindRenderedTextEndNative(pStr0, (byte*)ptextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(string text, ref byte textEnd) + { + 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 (byte* ptextEnd = &textEnd) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(pStr0, (byte*)ptextEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* FindRenderedTextEnd(string text, ReadOnlySpan textEnd) + { + 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 (byte* ptextEnd = textEnd) + { + byte* ret = FindRenderedTextEndNative(pStr0, (byte*)ptextEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string FindRenderedTextEndS(string text, ReadOnlySpan textEnd) + { + 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 (byte* ptextEnd = textEnd) + { + string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(pStr0, (byte*)ptextEnd)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderMouseCursorNative(Vector2 pos, float scale, ImGuiMouseCursor mouseCursor, uint colFill, uint colBorder, uint colShadow) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1183])(pos, scale, mouseCursor, colFill, colBorder, colShadow); + #else + ((delegate* unmanaged[Cdecl])funcTable[1183])(pos, scale, mouseCursor, colFill, colBorder, colShadow); + #endif + } + + /// + /// To be documented. + /// + public static void RenderMouseCursor(Vector2 pos, float scale, ImGuiMouseCursor mouseCursor, uint colFill, uint colBorder, uint colShadow) + { + RenderMouseCursorNative(pos, scale, mouseCursor, colFill, colBorder, colShadow); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderArrowNative(ImDrawList* drawList, Vector2 pos, uint col, ImGuiDir dir, float scale) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1184])(drawList, pos, col, dir, scale); + #else + ((delegate* unmanaged[Cdecl])funcTable[1184])((nint)drawList, pos, col, dir, scale); + #endif + } + + /// + /// To be documented. + /// + public static void RenderArrow(ImDrawListPtr drawList, Vector2 pos, uint col, ImGuiDir dir, float scale) + { + RenderArrowNative(drawList, pos, col, dir, scale); + } + + /// + /// To be documented. + /// + public static void RenderArrow(ImDrawListPtr drawList, Vector2 pos, uint col, ImGuiDir dir) + { + RenderArrowNative(drawList, pos, col, dir, (float)(1.0f)); + } + + /// + /// To be documented. + /// + public static void RenderArrow(ref ImDrawList drawList, Vector2 pos, uint col, ImGuiDir dir, float scale) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderArrowNative((ImDrawList*)pdrawList, pos, col, dir, scale); + } + } + + /// + /// To be documented. + /// + public static void RenderArrow(ref ImDrawList drawList, Vector2 pos, uint col, ImGuiDir dir) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderArrowNative((ImDrawList*)pdrawList, pos, col, dir, (float)(1.0f)); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderBulletNative(ImDrawList* drawList, Vector2 pos, uint col) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1185])(drawList, pos, col); + #else + ((delegate* unmanaged[Cdecl])funcTable[1185])((nint)drawList, pos, col); + #endif + } + + /// + /// To be documented. + /// + public static void RenderBullet(ImDrawListPtr drawList, Vector2 pos, uint col) + { + RenderBulletNative(drawList, pos, col); + } + + /// + /// To be documented. + /// + public static void RenderBullet(ref ImDrawList drawList, Vector2 pos, uint col) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderBulletNative((ImDrawList*)pdrawList, pos, col); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderCheckMarkNative(ImDrawList* drawList, Vector2 pos, uint col, float sz) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1186])(drawList, pos, col, sz); + #else + ((delegate* unmanaged[Cdecl])funcTable[1186])((nint)drawList, pos, col, sz); + #endif + } + + /// + /// To be documented. + /// + public static void RenderCheckMark(ImDrawListPtr drawList, Vector2 pos, uint col, float sz) + { + RenderCheckMarkNative(drawList, pos, col, sz); + } + + /// + /// To be documented. + /// + public static void RenderCheckMark(ref ImDrawList drawList, Vector2 pos, uint col, float sz) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderCheckMarkNative((ImDrawList*)pdrawList, pos, col, sz); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderArrowPointingAtNative(ImDrawList* drawList, Vector2 pos, Vector2 halfSz, ImGuiDir direction, uint col) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1187])(drawList, pos, halfSz, direction, col); + #else + ((delegate* unmanaged[Cdecl])funcTable[1187])((nint)drawList, pos, halfSz, direction, col); + #endif + } + + /// + /// To be documented. + /// + public static void RenderArrowPointingAt(ImDrawListPtr drawList, Vector2 pos, Vector2 halfSz, ImGuiDir direction, uint col) + { + RenderArrowPointingAtNative(drawList, pos, halfSz, direction, col); + } + + /// + /// To be documented. + /// + public static void RenderArrowPointingAt(ref ImDrawList drawList, Vector2 pos, Vector2 halfSz, ImGuiDir direction, uint col) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderArrowPointingAtNative((ImDrawList*)pdrawList, pos, halfSz, direction, col); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderArrowDockMenuNative(ImDrawList* drawList, Vector2 pMin, float sz, uint col) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1188])(drawList, pMin, sz, col); + #else + ((delegate* unmanaged[Cdecl])funcTable[1188])((nint)drawList, pMin, sz, col); + #endif + } + + /// + /// To be documented. + /// + public static void RenderArrowDockMenu(ImDrawListPtr drawList, Vector2 pMin, float sz, uint col) + { + RenderArrowDockMenuNative(drawList, pMin, sz, col); + } + + /// + /// To be documented. + /// + public static void RenderArrowDockMenu(ref ImDrawList drawList, Vector2 pMin, float sz, uint col) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderArrowDockMenuNative((ImDrawList*)pdrawList, pMin, sz, col); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderRectFilledRangeHNative(ImDrawList* drawList, ImRect rect, uint col, float xStartNorm, float xEndNorm, float rounding) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1189])(drawList, rect, col, xStartNorm, xEndNorm, rounding); + #else + ((delegate* unmanaged[Cdecl])funcTable[1189])((nint)drawList, rect, col, xStartNorm, xEndNorm, rounding); + #endif + } + + /// + /// To be documented. + /// + public static void RenderRectFilledRangeH(ImDrawListPtr drawList, ImRect rect, uint col, float xStartNorm, float xEndNorm, float rounding) + { + RenderRectFilledRangeHNative(drawList, rect, col, xStartNorm, xEndNorm, rounding); + } + + /// + /// To be documented. + /// + public static void RenderRectFilledRangeH(ref ImDrawList drawList, ImRect rect, uint col, float xStartNorm, float xEndNorm, float rounding) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderRectFilledRangeHNative((ImDrawList*)pdrawList, rect, col, xStartNorm, xEndNorm, rounding); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void RenderRectFilledWithHoleNative(ImDrawList* drawList, ImRect outer, ImRect inner, uint col, float rounding) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1190])(drawList, outer, inner, col, rounding); + #else + ((delegate* unmanaged[Cdecl])funcTable[1190])((nint)drawList, outer, inner, col, rounding); + #endif + } + + /// + /// To be documented. + /// + public static void RenderRectFilledWithHole(ImDrawListPtr drawList, ImRect outer, ImRect inner, uint col, float rounding) + { + RenderRectFilledWithHoleNative(drawList, outer, inner, col, rounding); + } + + /// + /// To be documented. + /// + public static void RenderRectFilledWithHole(ref ImDrawList drawList, ImRect outer, ImRect inner, uint col, float rounding) + { + fixed (ImDrawList* pdrawList = &drawList) + { + RenderRectFilledWithHoleNative((ImDrawList*)pdrawList, outer, inner, col, rounding); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImDrawFlags CalcRoundingFlagsForRectInRectNative(ImRect rIn, ImRect rOuter, float threshold) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1191])(rIn, rOuter, threshold); + #else + return (ImDrawFlags)((delegate* unmanaged[Cdecl])funcTable[1191])(rIn, rOuter, threshold); + #endif + } + + /// + /// To be documented. + /// + public static ImDrawFlags CalcRoundingFlagsForRectInRect(ImRect rIn, ImRect rOuter, float threshold) + { + ImDrawFlags ret = CalcRoundingFlagsForRectInRectNative(rIn, rOuter, threshold); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TextExNative(byte* text, byte* textEnd, ImGuiTextFlags flags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1192])(text, textEnd, flags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1192])((nint)text, (nint)textEnd, flags); + #endif + } + + /// + /// To be documented. + /// + public static void TextEx(byte* text, byte* textEnd, ImGuiTextFlags flags) + { + TextExNative(text, textEnd, flags); + } + + /// + /// To be documented. + /// + public static void TextEx(byte* text, byte* textEnd) + { + TextExNative(text, textEnd, (ImGuiTextFlags)(0)); + } + + /// + /// To be documented. + /// + public static void TextEx(byte* text) + { + TextExNative(text, (byte*)(default), (ImGuiTextFlags)(0)); + } + + /// + /// To be documented. + /// + public static void TextEx(byte* text, ImGuiTextFlags flags) + { + TextExNative(text, (byte*)(default), flags); + } + + /// + /// To be documented. + /// + public static void TextEx(ref byte text, byte* textEnd, ImGuiTextFlags flags) + { + fixed (byte* ptext = &text) + { + TextExNative((byte*)ptext, textEnd, flags); + } + } + + /// + /// To be documented. + /// + public static void TextEx(ref byte text, byte* textEnd) + { + fixed (byte* ptext = &text) + { + TextExNative((byte*)ptext, textEnd, (ImGuiTextFlags)(0)); + } + } + + /// + /// To be documented. + /// + public static void TextEx(ref byte text) + { + fixed (byte* ptext = &text) + { + TextExNative((byte*)ptext, (byte*)(default), (ImGuiTextFlags)(0)); + } + } + + /// + /// To be documented. + /// + public static void TextEx(ref byte text, ImGuiTextFlags flags) + { + fixed (byte* ptext = &text) + { + TextExNative((byte*)ptext, (byte*)(default), flags); + } + } + + /// + /// To be documented. + /// + public static void TextEx(ReadOnlySpan text, byte* textEnd, ImGuiTextFlags flags) + { + fixed (byte* ptext = text) + { + TextExNative((byte*)ptext, textEnd, flags); + } + } + + /// + /// To be documented. + /// + public static void TextEx(ReadOnlySpan text, byte* textEnd) + { + fixed (byte* ptext = text) + { + TextExNative((byte*)ptext, textEnd, (ImGuiTextFlags)(0)); + } + } + + /// + /// To be documented. + /// + public static void TextEx(ReadOnlySpan text) + { + fixed (byte* ptext = text) + { + TextExNative((byte*)ptext, (byte*)(default), (ImGuiTextFlags)(0)); + } + } + + /// + /// To be documented. + /// + public static void TextEx(ReadOnlySpan text, ImGuiTextFlags flags) + { + fixed (byte* ptext = text) + { + TextExNative((byte*)ptext, (byte*)(default), flags); + } + } + + /// + /// To be documented. + /// + public static void TextEx(string text, byte* textEnd, ImGuiTextFlags 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; + } + TextExNative(pStr0, textEnd, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void TextEx(string text, byte* textEnd) + { + 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; + } + TextExNative(pStr0, textEnd, (ImGuiTextFlags)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void TextEx(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; + } + TextExNative(pStr0, (byte*)(default), (ImGuiTextFlags)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void TextEx(string text, ImGuiTextFlags 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; + } + TextExNative(pStr0, (byte*)(default), flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void TextEx(byte* text, ref byte textEnd, ImGuiTextFlags flags) + { + fixed (byte* ptextEnd = &textEnd) + { + TextExNative(text, (byte*)ptextEnd, flags); + } + } + + /// + /// To be documented. + /// + public static void TextEx(byte* text, ref byte textEnd) + { + fixed (byte* ptextEnd = &textEnd) + { + TextExNative(text, (byte*)ptextEnd, (ImGuiTextFlags)(0)); + } + } + + /// + /// To be documented. + /// + public static void TextEx(byte* text, ReadOnlySpan textEnd, ImGuiTextFlags flags) + { + fixed (byte* ptextEnd = textEnd) + { + TextExNative(text, (byte*)ptextEnd, flags); + } + } + + /// + /// To be documented. + /// + public static void TextEx(byte* text, ReadOnlySpan textEnd) + { + fixed (byte* ptextEnd = textEnd) + { + TextExNative(text, (byte*)ptextEnd, (ImGuiTextFlags)(0)); + } + } + + /// + /// To be documented. + /// + public static void TextEx(byte* text, string textEnd, ImGuiTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + TextExNative(text, pStr0, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void TextEx(byte* text, string textEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + TextExNative(text, pStr0, (ImGuiTextFlags)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void TextEx(ref byte text, ref byte textEnd, ImGuiTextFlags flags) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + TextExNative((byte*)ptext, (byte*)ptextEnd, flags); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(ref byte text, ref byte textEnd) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = &textEnd) + { + TextExNative((byte*)ptext, (byte*)ptextEnd, (ImGuiTextFlags)(0)); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(ReadOnlySpan text, ReadOnlySpan textEnd, ImGuiTextFlags flags) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + TextExNative((byte*)ptext, (byte*)ptextEnd, flags); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(ReadOnlySpan text, ReadOnlySpan textEnd) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = textEnd) + { + TextExNative((byte*)ptext, (byte*)ptextEnd, (ImGuiTextFlags)(0)); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(string text, string textEnd, ImGuiTextFlags 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + TextExNative(pStr0, pStr1, flags); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void TextEx(string text, string textEnd) + { + 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; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (textEnd != null) + { + pStrSize1 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + TextExNative(pStr0, pStr1, (ImGuiTextFlags)(0)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void TextEx(ref byte text, ReadOnlySpan textEnd, ImGuiTextFlags flags) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + TextExNative((byte*)ptext, (byte*)ptextEnd, flags); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(ref byte text, ReadOnlySpan textEnd) + { + fixed (byte* ptext = &text) + { + fixed (byte* ptextEnd = textEnd) + { + TextExNative((byte*)ptext, (byte*)ptextEnd, (ImGuiTextFlags)(0)); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(ref byte text, string textEnd, ImGuiTextFlags flags) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + TextExNative((byte*)ptext, pStr0, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(ref byte text, string textEnd) + { + fixed (byte* ptext = &text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + TextExNative((byte*)ptext, pStr0, (ImGuiTextFlags)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(ReadOnlySpan text, ref byte textEnd, ImGuiTextFlags flags) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + TextExNative((byte*)ptext, (byte*)ptextEnd, flags); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(ReadOnlySpan text, ref byte textEnd) + { + fixed (byte* ptext = text) + { + fixed (byte* ptextEnd = &textEnd) + { + TextExNative((byte*)ptext, (byte*)ptextEnd, (ImGuiTextFlags)(0)); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(ReadOnlySpan text, string textEnd, ImGuiTextFlags flags) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + TextExNative((byte*)ptext, pStr0, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(ReadOnlySpan text, string textEnd) + { + fixed (byte* ptext = text) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (textEnd != null) + { + pStrSize0 = Utils.GetByteCountUTF8(textEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + TextExNative((byte*)ptext, pStr0, (ImGuiTextFlags)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(string text, ref byte textEnd, ImGuiTextFlags 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 (byte* ptextEnd = &textEnd) + { + TextExNative(pStr0, (byte*)ptextEnd, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(string text, ref byte textEnd) + { + 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 (byte* ptextEnd = &textEnd) + { + TextExNative(pStr0, (byte*)ptextEnd, (ImGuiTextFlags)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(string text, ReadOnlySpan textEnd, ImGuiTextFlags 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 (byte* ptextEnd = textEnd) + { + TextExNative(pStr0, (byte*)ptextEnd, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void TextEx(string text, ReadOnlySpan textEnd) + { + 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 (byte* ptextEnd = textEnd) + { + TextExNative(pStr0, (byte*)ptextEnd, (ImGuiTextFlags)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ButtonExNative(byte* label, Vector2 sizeArg, ImGuiButtonFlags flags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1193])(label, sizeArg, flags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1193])((nint)label, sizeArg, flags); + #endif + } + + /// + /// To be documented. + /// + public static bool ButtonEx(byte* label, Vector2 sizeArg, ImGuiButtonFlags flags) + { + byte ret = ButtonExNative(label, sizeArg, flags); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ButtonEx(byte* label, Vector2 sizeArg) + { + byte ret = ButtonExNative(label, sizeArg, (ImGuiButtonFlags)(0)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ButtonEx(byte* label) + { + byte ret = ButtonExNative(label, (Vector2)(new Vector2(0,0)), (ImGuiButtonFlags)(0)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ButtonEx(byte* label, ImGuiButtonFlags flags) + { + byte ret = ButtonExNative(label, (Vector2)(new Vector2(0,0)), flags); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ButtonEx(ref byte label, Vector2 sizeArg, ImGuiButtonFlags flags) + { + fixed (byte* plabel = &label) + { + byte ret = ButtonExNative((byte*)plabel, sizeArg, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ButtonEx(ref byte label, Vector2 sizeArg) + { + fixed (byte* plabel = &label) + { + byte ret = ButtonExNative((byte*)plabel, sizeArg, (ImGuiButtonFlags)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ButtonEx(ref byte label) + { + fixed (byte* plabel = &label) + { + byte ret = ButtonExNative((byte*)plabel, (Vector2)(new Vector2(0,0)), (ImGuiButtonFlags)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ButtonEx(ref byte label, ImGuiButtonFlags flags) + { + fixed (byte* plabel = &label) + { + byte ret = ButtonExNative((byte*)plabel, (Vector2)(new Vector2(0,0)), flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ButtonEx(ReadOnlySpan label, Vector2 sizeArg, ImGuiButtonFlags flags) + { + fixed (byte* plabel = label) + { + byte ret = ButtonExNative((byte*)plabel, sizeArg, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ButtonEx(ReadOnlySpan label, Vector2 sizeArg) + { + fixed (byte* plabel = label) + { + byte ret = ButtonExNative((byte*)plabel, sizeArg, (ImGuiButtonFlags)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ButtonEx(ReadOnlySpan label) + { + fixed (byte* plabel = label) + { + byte ret = ButtonExNative((byte*)plabel, (Vector2)(new Vector2(0,0)), (ImGuiButtonFlags)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ButtonEx(ReadOnlySpan label, ImGuiButtonFlags flags) + { + fixed (byte* plabel = label) + { + byte ret = ButtonExNative((byte*)plabel, (Vector2)(new Vector2(0,0)), flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = ButtonExNative(pStr0, sizeArg, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = ButtonExNative(pStr0, sizeArg, (ImGuiButtonFlags)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = ButtonExNative(pStr0, (Vector2)(new Vector2(0,0)), (ImGuiButtonFlags)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = ButtonExNative(pStr0, (Vector2)(new Vector2(0,0)), flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte CloseButtonNative(uint id, Vector2 pos) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1194])(id, pos); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1194])(id, pos); + #endif + } + + /// + /// To be documented. + /// + public static bool CloseButton(uint id, Vector2 pos) + { + byte ret = CloseButtonNative(id, pos); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte CollapseButtonNative(uint id, Vector2 pos, ImGuiDockNode* dockNode) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1195])(id, pos, dockNode); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1195])(id, pos, (nint)dockNode); + #endif + } + + /// + /// To be documented. + /// + public static bool CollapseButton(uint id, Vector2 pos, ImGuiDockNodePtr dockNode) + { + byte ret = CollapseButtonNative(id, pos, dockNode); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool CollapseButton(uint id, Vector2 pos, ref ImGuiDockNode dockNode) + { + fixed (ImGuiDockNode* pdockNode = &dockNode) + { + byte ret = CollapseButtonNative(id, pos, (ImGuiDockNode*)pdockNode); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ArrowButtonExNative(byte* strId, ImGuiDir dir, Vector2 sizeArg, ImGuiButtonFlags flags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1196])(strId, dir, sizeArg, flags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1196])((nint)strId, dir, sizeArg, flags); + #endif + } + + /// + /// To be documented. + /// + public static bool ArrowButtonEx(byte* strId, ImGuiDir dir, Vector2 sizeArg, ImGuiButtonFlags flags) + { + byte ret = ArrowButtonExNative(strId, dir, sizeArg, flags); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ArrowButtonEx(byte* strId, ImGuiDir dir, Vector2 sizeArg) + { + byte ret = ArrowButtonExNative(strId, dir, sizeArg, (ImGuiButtonFlags)(0)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ArrowButtonEx(ref byte strId, ImGuiDir dir, Vector2 sizeArg, ImGuiButtonFlags flags) + { + fixed (byte* pstrId = &strId) + { + byte ret = ArrowButtonExNative((byte*)pstrId, dir, sizeArg, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ArrowButtonEx(ref byte strId, ImGuiDir dir, Vector2 sizeArg) + { + fixed (byte* pstrId = &strId) + { + byte ret = ArrowButtonExNative((byte*)pstrId, dir, sizeArg, (ImGuiButtonFlags)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ArrowButtonEx(ReadOnlySpan strId, ImGuiDir dir, Vector2 sizeArg, ImGuiButtonFlags flags) + { + fixed (byte* pstrId = strId) + { + byte ret = ArrowButtonExNative((byte*)pstrId, dir, sizeArg, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ArrowButtonEx(ReadOnlySpan strId, ImGuiDir dir, Vector2 sizeArg) + { + fixed (byte* pstrId = strId) + { + byte ret = ArrowButtonExNative((byte*)pstrId, dir, sizeArg, (ImGuiButtonFlags)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = ArrowButtonExNative(pStr0, dir, sizeArg, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = ArrowButtonExNative(pStr0, dir, sizeArg, (ImGuiButtonFlags)(0)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ScrollbarNative(ImGuiAxis axis) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1197])(axis); + #else + ((delegate* unmanaged[Cdecl])funcTable[1197])(axis); + #endif + } + + /// + /// To be documented. + /// + public static void Scrollbar(ImGuiAxis axis) + { + ScrollbarNative(axis); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ScrollbarExNative(ImRect bb, uint id, ImGuiAxis axis, long* pScrollV, long availV, long contentsV, ImDrawFlags flags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1198])(bb, id, axis, pScrollV, availV, contentsV, flags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1198])(bb, id, axis, (nint)pScrollV, availV, contentsV, flags); + #endif + } + + /// + /// To be documented. + /// + public static bool ScrollbarEx(ImRect bb, uint id, ImGuiAxis axis, long* pScrollV, long availV, long contentsV, ImDrawFlags flags) + { + byte ret = ScrollbarExNative(bb, id, axis, pScrollV, availV, contentsV, flags); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ScrollbarEx(ImRect bb, uint id, ImGuiAxis axis, ref long pScrollV, long availV, long contentsV, ImDrawFlags flags) + { + fixed (long* ppScrollV = &pScrollV) + { + byte ret = ScrollbarExNative(bb, id, axis, (long*)ppScrollV, availV, contentsV, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ImageButtonExNative(uint id, ImTextureID textureId, Vector2 size, Vector2 uv0, Vector2 uv1, Vector2 padding, Vector4 bgCol, Vector4 tintCol) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1199])(id, textureId, size, uv0, uv1, padding, bgCol, tintCol); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1199])(id, textureId, size, uv0, uv1, padding, bgCol, tintCol); + #endif + } + + /// + /// To be documented. + /// + public static bool ImageButtonEx(uint id, ImTextureID textureId, Vector2 size, Vector2 uv0, Vector2 uv1, Vector2 padding, Vector4 bgCol, Vector4 tintCol) + { + byte ret = ImageButtonExNative(id, textureId, size, uv0, uv1, padding, bgCol, tintCol); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GetWindowScrollbarRectNative(ImRect* pOut, ImGuiWindow* window, ImGuiAxis axis) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1200])(pOut, window, axis); + #else + ((delegate* unmanaged[Cdecl])funcTable[1200])((nint)pOut, (nint)window, axis); + #endif + } + + /// + /// To be documented. + /// + public static ImRect GetWindowScrollbarRect(ImGuiWindowPtr window, ImGuiAxis axis) + { + ImRect ret; + GetWindowScrollbarRectNative(&ret, window, axis); + return ret; + } + + /// + /// To be documented. + /// + public static void GetWindowScrollbarRect(ImRectPtr pOut, ImGuiWindowPtr window, ImGuiAxis axis) + { + GetWindowScrollbarRectNative(pOut, window, axis); + } + + /// + /// To be documented. + /// + public static void GetWindowScrollbarRect(ref ImRect pOut, ImGuiWindowPtr window, ImGuiAxis axis) + { + fixed (ImRect* ppOut = &pOut) + { + GetWindowScrollbarRectNative((ImRect*)ppOut, window, axis); + } + } + + /// + /// To be documented. + /// + public static ImRect GetWindowScrollbarRect(ref ImGuiWindow window, ImGuiAxis axis) + { + fixed (ImGuiWindow* pwindow = &window) + { + ImRect ret; + GetWindowScrollbarRectNative(&ret, (ImGuiWindow*)pwindow, axis); + return ret; + } + } + + /// + /// To be documented. + /// + public static void GetWindowScrollbarRect(ImRectPtr pOut, ref ImGuiWindow window, ImGuiAxis axis) + { + fixed (ImGuiWindow* pwindow = &window) + { + GetWindowScrollbarRectNative(pOut, (ImGuiWindow*)pwindow, axis); + } + } + + /// + /// To be documented. + /// + public static void GetWindowScrollbarRect(ref ImRect pOut, ref ImGuiWindow window, ImGuiAxis axis) + { + fixed (ImRect* ppOut = &pOut) + { + fixed (ImGuiWindow* pwindow = &window) + { + GetWindowScrollbarRectNative((ImRect*)ppOut, (ImGuiWindow*)pwindow, axis); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetWindowScrollbarIDNative(ImGuiWindow* window, ImGuiAxis axis) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1201])(window, axis); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[1201])((nint)window, axis); + #endif + } + + /// + /// To be documented. + /// + public static uint GetWindowScrollbarID(ImGuiWindowPtr window, ImGuiAxis axis) + { + uint ret = GetWindowScrollbarIDNative(window, axis); + return ret; + } + + /// + /// To be documented. + /// + public static uint GetWindowScrollbarID(ref ImGuiWindow window, ImGuiAxis axis) + { + fixed (ImGuiWindow* pwindow = &window) + { + uint ret = GetWindowScrollbarIDNative((ImGuiWindow*)pwindow, axis); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetWindowResizeCornerIDNative(ImGuiWindow* window, int n) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1202])(window, n); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[1202])((nint)window, n); + #endif + } + + /// + /// To be documented. + /// + public static uint GetWindowResizeCornerID(ImGuiWindowPtr window, int n) + { + uint ret = GetWindowResizeCornerIDNative(window, n); + return ret; + } + + /// + /// To be documented. + /// + public static uint GetWindowResizeCornerID(ref ImGuiWindow window, int n) + { + fixed (ImGuiWindow* pwindow = &window) + { + uint ret = GetWindowResizeCornerIDNative((ImGuiWindow*)pwindow, n); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint GetWindowResizeBorderIDNative(ImGuiWindow* window, ImGuiDir dir) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1203])(window, dir); + #else + return (uint)((delegate* unmanaged[Cdecl])funcTable[1203])((nint)window, dir); + #endif + } + + /// + /// To be documented. + /// + public static uint GetWindowResizeBorderID(ImGuiWindowPtr window, ImGuiDir dir) + { + uint ret = GetWindowResizeBorderIDNative(window, dir); + return ret; + } + + /// + /// To be documented. + /// + public static uint GetWindowResizeBorderID(ref ImGuiWindow window, ImGuiDir dir) + { + fixed (ImGuiWindow* pwindow = &window) + { + uint ret = GetWindowResizeBorderIDNative((ImGuiWindow*)pwindow, dir); + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void SeparatorExNative(ImGuiSeparatorFlags flags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1204])(flags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1204])(flags); + #endif + } + + /// + /// To be documented. + /// + public static void SeparatorEx(ImGuiSeparatorFlags flags) + { + SeparatorExNative(flags); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte CheckboxFlagsNative(byte* label, long* flags, long flagsValue) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1205])(label, flags, flagsValue); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1205])((nint)label, (nint)flags, flagsValue); + #endif + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(byte* label, long* flags, long flagsValue) + { + byte ret = CheckboxFlagsNative(label, flags, flagsValue); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(ref byte label, long* flags, long flagsValue) + { + fixed (byte* plabel = &label) + { + byte ret = CheckboxFlagsNative((byte*)plabel, flags, flagsValue); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(ReadOnlySpan label, long* flags, long flagsValue) + { + fixed (byte* plabel = label) + { + byte ret = CheckboxFlagsNative((byte*)plabel, flags, flagsValue); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = CheckboxFlagsNative(pStr0, flags, flagsValue); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(byte* label, ref long flags, long flagsValue) + { + fixed (long* pflags = &flags) + { + byte ret = CheckboxFlagsNative(label, (long*)pflags, flagsValue); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(ref byte label, ref long flags, long flagsValue) + { + fixed (byte* plabel = &label) + { + fixed (long* pflags = &flags) + { + byte ret = CheckboxFlagsNative((byte*)plabel, (long*)pflags, flagsValue); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(ReadOnlySpan label, ref long flags, long flagsValue) + { + fixed (byte* plabel = label) + { + fixed (long* pflags = &flags) + { + byte ret = CheckboxFlagsNative((byte*)plabel, (long*)pflags, flagsValue); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(string label, ref 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; + } + fixed (long* pflags = &flags) + { + byte ret = CheckboxFlagsNative(pStr0, (long*)pflags, flagsValue); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte CheckboxFlagsNative(byte* label, ulong* flags, ulong flagsValue) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1206])(label, flags, flagsValue); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1206])((nint)label, (nint)flags, flagsValue); + #endif + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(byte* label, ulong* flags, ulong flagsValue) + { + byte ret = CheckboxFlagsNative(label, flags, flagsValue); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(ref byte label, ulong* flags, ulong flagsValue) + { + fixed (byte* plabel = &label) + { + byte ret = CheckboxFlagsNative((byte*)plabel, flags, flagsValue); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(ReadOnlySpan label, ulong* flags, ulong flagsValue) + { + fixed (byte* plabel = label) + { + byte ret = CheckboxFlagsNative((byte*)plabel, flags, flagsValue); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = CheckboxFlagsNative(pStr0, flags, flagsValue); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(byte* label, ref ulong flags, ulong flagsValue) + { + fixed (ulong* pflags = &flags) + { + byte ret = CheckboxFlagsNative(label, (ulong*)pflags, flagsValue); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(ref byte label, ref ulong flags, ulong flagsValue) + { + fixed (byte* plabel = &label) + { + fixed (ulong* pflags = &flags) + { + byte ret = CheckboxFlagsNative((byte*)plabel, (ulong*)pflags, flagsValue); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(ReadOnlySpan label, ref ulong flags, ulong flagsValue) + { + fixed (byte* plabel = label) + { + fixed (ulong* pflags = &flags) + { + byte ret = CheckboxFlagsNative((byte*)plabel, (ulong*)pflags, flagsValue); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool CheckboxFlags(string label, ref 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; + } + fixed (ulong* pflags = &flags) + { + byte ret = CheckboxFlagsNative(pStr0, (ulong*)pflags, flagsValue); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte ButtonBehaviorNative(ImRect bb, uint id, bool* outHovered, bool* outHeld, ImGuiButtonFlags flags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1207])(bb, id, outHovered, outHeld, flags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1207])(bb, id, (nint)outHovered, (nint)outHeld, flags); + #endif + } + + /// + /// To be documented. + /// + public static bool ButtonBehavior(ImRect bb, uint id, bool* outHovered, bool* outHeld, ImGuiButtonFlags flags) + { + byte ret = ButtonBehaviorNative(bb, id, outHovered, outHeld, flags); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ButtonBehavior(ImRect bb, uint id, bool* outHovered, bool* outHeld) + { + byte ret = ButtonBehaviorNative(bb, id, outHovered, outHeld, (ImGuiButtonFlags)(0)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool ButtonBehavior(ImRect bb, uint id, ref bool outHovered, bool* outHeld, ImGuiButtonFlags flags) + { + fixed (bool* poutHovered = &outHovered) + { + byte ret = ButtonBehaviorNative(bb, id, (bool*)poutHovered, outHeld, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ButtonBehavior(ImRect bb, uint id, ref bool outHovered, bool* outHeld) + { + fixed (bool* poutHovered = &outHovered) + { + byte ret = ButtonBehaviorNative(bb, id, (bool*)poutHovered, outHeld, (ImGuiButtonFlags)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ButtonBehavior(ImRect bb, uint id, bool* outHovered, ref bool outHeld, ImGuiButtonFlags flags) + { + fixed (bool* poutHeld = &outHeld) + { + byte ret = ButtonBehaviorNative(bb, id, outHovered, (bool*)poutHeld, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ButtonBehavior(ImRect bb, uint id, bool* outHovered, ref bool outHeld) + { + fixed (bool* poutHeld = &outHeld) + { + byte ret = ButtonBehaviorNative(bb, id, outHovered, (bool*)poutHeld, (ImGuiButtonFlags)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool ButtonBehavior(ImRect bb, uint id, ref bool outHovered, ref bool outHeld, ImGuiButtonFlags flags) + { + fixed (bool* poutHovered = &outHovered) + { + fixed (bool* poutHeld = &outHeld) + { + byte ret = ButtonBehaviorNative(bb, id, (bool*)poutHovered, (bool*)poutHeld, flags); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool ButtonBehavior(ImRect bb, uint id, ref bool outHovered, ref bool outHeld) + { + fixed (bool* poutHovered = &outHovered) + { + fixed (bool* poutHeld = &outHeld) + { + byte ret = ButtonBehaviorNative(bb, id, (bool*)poutHovered, (bool*)poutHeld, (ImGuiButtonFlags)(0)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte DragBehaviorNative(uint id, ImGuiDataType dataType, void* pV, float vSpeed, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1208])(id, dataType, pV, vSpeed, pMin, pMax, format, flags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1208])(id, dataType, (nint)pV, vSpeed, (nint)pMin, (nint)pMax, (nint)format, flags); + #endif + } + + /// + /// To be documented. + /// + public static bool DragBehavior(uint id, ImGuiDataType dataType, void* pV, float vSpeed, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags) + { + byte ret = DragBehaviorNative(id, dataType, pV, vSpeed, pMin, pMax, format, flags); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool DragBehavior(uint id, ImGuiDataType dataType, void* pV, float vSpeed, void* pMin, void* pMax, ref byte format, ImGuiSliderFlags flags) + { + fixed (byte* pformat = &format) + { + byte ret = DragBehaviorNative(id, dataType, pV, vSpeed, pMin, pMax, (byte*)pformat, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool DragBehavior(uint id, ImGuiDataType dataType, void* pV, float vSpeed, void* pMin, void* pMax, ReadOnlySpan format, ImGuiSliderFlags flags) + { + fixed (byte* pformat = format) + { + byte ret = DragBehaviorNative(id, dataType, pV, vSpeed, pMin, pMax, (byte*)pformat, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool DragBehavior(uint id, ImGuiDataType dataType, void* pV, float vSpeed, void* pMin, void* pMax, string format, ImGuiSliderFlags flags) + { + 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 = DragBehaviorNative(id, dataType, pV, vSpeed, pMin, pMax, pStr0, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte SliderBehaviorNative(ImRect bb, uint id, ImGuiDataType dataType, void* pV, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags, ImRect* outGrabBb) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1209])(bb, id, dataType, pV, pMin, pMax, format, flags, outGrabBb); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1209])(bb, id, dataType, (nint)pV, (nint)pMin, (nint)pMax, (nint)format, flags, (nint)outGrabBb); + #endif + } + + /// + /// To be documented. + /// + public static bool SliderBehavior(ImRect bb, uint id, ImGuiDataType dataType, void* pV, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags, ImRectPtr outGrabBb) + { + byte ret = SliderBehaviorNative(bb, id, dataType, pV, pMin, pMax, format, flags, outGrabBb); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool SliderBehavior(ImRect bb, uint id, ImGuiDataType dataType, void* pV, void* pMin, void* pMax, ref byte format, ImGuiSliderFlags flags, ImRectPtr outGrabBb) + { + fixed (byte* pformat = &format) + { + byte ret = SliderBehaviorNative(bb, id, dataType, pV, pMin, pMax, (byte*)pformat, flags, outGrabBb); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SliderBehavior(ImRect bb, uint id, ImGuiDataType dataType, void* pV, void* pMin, void* pMax, ReadOnlySpan format, ImGuiSliderFlags flags, ImRectPtr outGrabBb) + { + fixed (byte* pformat = format) + { + byte ret = SliderBehaviorNative(bb, id, dataType, pV, pMin, pMax, (byte*)pformat, flags, outGrabBb); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SliderBehavior(ImRect bb, uint id, ImGuiDataType dataType, void* pV, void* pMin, void* pMax, string format, ImGuiSliderFlags flags, ImRectPtr outGrabBb) + { + 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 = SliderBehaviorNative(bb, id, dataType, pV, pMin, pMax, pStr0, flags, outGrabBb); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool SliderBehavior(ImRect bb, uint id, ImGuiDataType dataType, void* pV, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags, ref ImRect outGrabBb) + { + fixed (ImRect* poutGrabBb = &outGrabBb) + { + byte ret = SliderBehaviorNative(bb, id, dataType, pV, pMin, pMax, format, flags, (ImRect*)poutGrabBb); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SliderBehavior(ImRect bb, uint id, ImGuiDataType dataType, void* pV, void* pMin, void* pMax, ref byte format, ImGuiSliderFlags flags, ref ImRect outGrabBb) + { + fixed (byte* pformat = &format) + { + fixed (ImRect* poutGrabBb = &outGrabBb) + { + byte ret = SliderBehaviorNative(bb, id, dataType, pV, pMin, pMax, (byte*)pformat, flags, (ImRect*)poutGrabBb); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool SliderBehavior(ImRect bb, uint id, ImGuiDataType dataType, void* pV, void* pMin, void* pMax, ReadOnlySpan format, ImGuiSliderFlags flags, ref ImRect outGrabBb) + { + fixed (byte* pformat = format) + { + fixed (ImRect* poutGrabBb = &outGrabBb) + { + byte ret = SliderBehaviorNative(bb, id, dataType, pV, pMin, pMax, (byte*)pformat, flags, (ImRect*)poutGrabBb); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool SliderBehavior(ImRect bb, uint id, ImGuiDataType dataType, void* pV, void* pMin, void* pMax, string format, ImGuiSliderFlags flags, ref ImRect outGrabBb) + { + 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; + } + fixed (ImRect* poutGrabBb = &outGrabBb) + { + byte ret = SliderBehaviorNative(bb, id, dataType, pV, pMin, pMax, pStr0, flags, (ImRect*)poutGrabBb); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte SplitterBehaviorNative(ImRect bb, uint id, ImGuiAxis axis, float* size1, float* size2, float minsize1, float minsize2, float hoverExtend, float hoverVisibilityDelay, uint bgCol) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1210])(bb, id, axis, size1, size2, minsize1, minsize2, hoverExtend, hoverVisibilityDelay, bgCol); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1210])(bb, id, axis, (nint)size1, (nint)size2, minsize1, minsize2, hoverExtend, hoverVisibilityDelay, bgCol); + #endif + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, float* size1, float* size2, float minsize1, float minsize2, float hoverExtend, float hoverVisibilityDelay, uint bgCol) + { + byte ret = SplitterBehaviorNative(bb, id, axis, size1, size2, minsize1, minsize2, hoverExtend, hoverVisibilityDelay, bgCol); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, float* size1, float* size2, float minsize1, float minsize2, float hoverExtend, float hoverVisibilityDelay) + { + byte ret = SplitterBehaviorNative(bb, id, axis, size1, size2, minsize1, minsize2, hoverExtend, hoverVisibilityDelay, (uint)(0)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, float* size1, float* size2, float minsize1, float minsize2, float hoverExtend) + { + byte ret = SplitterBehaviorNative(bb, id, axis, size1, size2, minsize1, minsize2, hoverExtend, (float)(0.0f), (uint)(0)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, float* size1, float* size2, float minsize1, float minsize2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, size1, size2, minsize1, minsize2, (float)(0.0f), (float)(0.0f), (uint)(0)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, float* size1, float* size2, float minsize1, float minsize2, float hoverExtend, uint bgCol) + { + byte ret = SplitterBehaviorNative(bb, id, axis, size1, size2, minsize1, minsize2, hoverExtend, (float)(0.0f), bgCol); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, float* size1, float* size2, float minsize1, float minsize2, uint bgCol) + { + byte ret = SplitterBehaviorNative(bb, id, axis, size1, size2, minsize1, minsize2, (float)(0.0f), (float)(0.0f), bgCol); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, ref float size1, float* size2, float minsize1, float minsize2, float hoverExtend, float hoverVisibilityDelay, uint bgCol) + { + fixed (float* psize1 = &size1) + { + byte ret = SplitterBehaviorNative(bb, id, axis, (float*)psize1, size2, minsize1, minsize2, hoverExtend, hoverVisibilityDelay, bgCol); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, ref float size1, float* size2, float minsize1, float minsize2, float hoverExtend, float hoverVisibilityDelay) + { + fixed (float* psize1 = &size1) + { + byte ret = SplitterBehaviorNative(bb, id, axis, (float*)psize1, size2, minsize1, minsize2, hoverExtend, hoverVisibilityDelay, (uint)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, ref float size1, float* size2, float minsize1, float minsize2, float hoverExtend) + { + fixed (float* psize1 = &size1) + { + byte ret = SplitterBehaviorNative(bb, id, axis, (float*)psize1, size2, minsize1, minsize2, hoverExtend, (float)(0.0f), (uint)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, ref float size1, float* size2, float minsize1, float minsize2) + { + fixed (float* psize1 = &size1) + { + byte ret = SplitterBehaviorNative(bb, id, axis, (float*)psize1, size2, minsize1, minsize2, (float)(0.0f), (float)(0.0f), (uint)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, ref float size1, float* size2, float minsize1, float minsize2, float hoverExtend, uint bgCol) + { + fixed (float* psize1 = &size1) + { + byte ret = SplitterBehaviorNative(bb, id, axis, (float*)psize1, size2, minsize1, minsize2, hoverExtend, (float)(0.0f), bgCol); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, ref float size1, float* size2, float minsize1, float minsize2, uint bgCol) + { + fixed (float* psize1 = &size1) + { + byte ret = SplitterBehaviorNative(bb, id, axis, (float*)psize1, size2, minsize1, minsize2, (float)(0.0f), (float)(0.0f), bgCol); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, float* size1, ref float size2, float minsize1, float minsize2, float hoverExtend, float hoverVisibilityDelay, uint bgCol) + { + fixed (float* psize2 = &size2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, size1, (float*)psize2, minsize1, minsize2, hoverExtend, hoverVisibilityDelay, bgCol); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, float* size1, ref float size2, float minsize1, float minsize2, float hoverExtend, float hoverVisibilityDelay) + { + fixed (float* psize2 = &size2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, size1, (float*)psize2, minsize1, minsize2, hoverExtend, hoverVisibilityDelay, (uint)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, float* size1, ref float size2, float minsize1, float minsize2, float hoverExtend) + { + fixed (float* psize2 = &size2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, size1, (float*)psize2, minsize1, minsize2, hoverExtend, (float)(0.0f), (uint)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, float* size1, ref float size2, float minsize1, float minsize2) + { + fixed (float* psize2 = &size2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, size1, (float*)psize2, minsize1, minsize2, (float)(0.0f), (float)(0.0f), (uint)(0)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, float* size1, ref float size2, float minsize1, float minsize2, float hoverExtend, uint bgCol) + { + fixed (float* psize2 = &size2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, size1, (float*)psize2, minsize1, minsize2, hoverExtend, (float)(0.0f), bgCol); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, float* size1, ref float size2, float minsize1, float minsize2, uint bgCol) + { + fixed (float* psize2 = &size2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, size1, (float*)psize2, minsize1, minsize2, (float)(0.0f), (float)(0.0f), bgCol); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, ref float size1, ref float size2, float minsize1, float minsize2, float hoverExtend, float hoverVisibilityDelay, uint bgCol) + { + fixed (float* psize1 = &size1) + { + fixed (float* psize2 = &size2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, (float*)psize1, (float*)psize2, minsize1, minsize2, hoverExtend, hoverVisibilityDelay, bgCol); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, ref float size1, ref float size2, float minsize1, float minsize2, float hoverExtend, float hoverVisibilityDelay) + { + fixed (float* psize1 = &size1) + { + fixed (float* psize2 = &size2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, (float*)psize1, (float*)psize2, minsize1, minsize2, hoverExtend, hoverVisibilityDelay, (uint)(0)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, ref float size1, ref float size2, float minsize1, float minsize2, float hoverExtend) + { + fixed (float* psize1 = &size1) + { + fixed (float* psize2 = &size2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, (float*)psize1, (float*)psize2, minsize1, minsize2, hoverExtend, (float)(0.0f), (uint)(0)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, ref float size1, ref float size2, float minsize1, float minsize2) + { + fixed (float* psize1 = &size1) + { + fixed (float* psize2 = &size2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, (float*)psize1, (float*)psize2, minsize1, minsize2, (float)(0.0f), (float)(0.0f), (uint)(0)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, ref float size1, ref float size2, float minsize1, float minsize2, float hoverExtend, uint bgCol) + { + fixed (float* psize1 = &size1) + { + fixed (float* psize2 = &size2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, (float*)psize1, (float*)psize2, minsize1, minsize2, hoverExtend, (float)(0.0f), bgCol); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool SplitterBehavior(ImRect bb, uint id, ImGuiAxis axis, ref float size1, ref float size2, float minsize1, float minsize2, uint bgCol) + { + fixed (float* psize1 = &size1) + { + fixed (float* psize2 = &size2) + { + byte ret = SplitterBehaviorNative(bb, id, axis, (float*)psize1, (float*)psize2, minsize1, minsize2, (float)(0.0f), (float)(0.0f), bgCol); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte TreeNodeBehaviorNative(uint id, ImGuiTreeNodeFlags flags, byte* label, byte* labelEnd) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1211])(id, flags, label, labelEnd); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1211])(id, flags, (nint)label, (nint)labelEnd); + #endif + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, byte* label, byte* labelEnd) + { + byte ret = TreeNodeBehaviorNative(id, flags, label, labelEnd); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, byte* label) + { + byte ret = TreeNodeBehaviorNative(id, flags, label, (byte*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ref byte label, byte* labelEnd) + { + fixed (byte* plabel = &label) + { + byte ret = TreeNodeBehaviorNative(id, flags, (byte*)plabel, labelEnd); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ref byte label) + { + fixed (byte* plabel = &label) + { + byte ret = TreeNodeBehaviorNative(id, flags, (byte*)plabel, (byte*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ReadOnlySpan label, byte* labelEnd) + { + fixed (byte* plabel = label) + { + byte ret = TreeNodeBehaviorNative(id, flags, (byte*)plabel, labelEnd); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ReadOnlySpan label) + { + fixed (byte* plabel = label) + { + byte ret = TreeNodeBehaviorNative(id, flags, (byte*)plabel, (byte*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TreeNodeBehaviorNative(id, flags, pStr0, labelEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = TreeNodeBehaviorNative(id, flags, pStr0, (byte*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, byte* label, ref byte labelEnd) + { + fixed (byte* plabelEnd = &labelEnd) + { + byte ret = TreeNodeBehaviorNative(id, flags, label, (byte*)plabelEnd); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, byte* label, ReadOnlySpan labelEnd) + { + fixed (byte* plabelEnd = labelEnd) + { + byte ret = TreeNodeBehaviorNative(id, flags, label, (byte*)plabelEnd); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TreeNodeBehaviorNative(id, flags, label, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ref byte label, ref byte labelEnd) + { + fixed (byte* plabel = &label) + { + fixed (byte* plabelEnd = &labelEnd) + { + byte ret = TreeNodeBehaviorNative(id, flags, (byte*)plabel, (byte*)plabelEnd); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ReadOnlySpan label, ReadOnlySpan labelEnd) + { + fixed (byte* plabel = label) + { + fixed (byte* plabelEnd = labelEnd) + { + byte ret = TreeNodeBehaviorNative(id, flags, (byte*)plabel, (byte*)plabelEnd); + return ret != 0; + } + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.016.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.016.cs new file mode 100644 index 000000000..6cff0aac4 --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.016.cs @@ -0,0 +1,4968 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + 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 = TreeNodeBehaviorNative(id, flags, pStr0, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ref byte label, ReadOnlySpan labelEnd) + { + fixed (byte* plabel = &label) + { + fixed (byte* plabelEnd = labelEnd) + { + byte ret = TreeNodeBehaviorNative(id, flags, (byte*)plabel, (byte*)plabelEnd); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TreeNodeBehaviorNative(id, flags, (byte*)plabel, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehavior(uint id, ImGuiTreeNodeFlags flags, ReadOnlySpan label, ref byte labelEnd) + { + fixed (byte* plabel = label) + { + fixed (byte* plabelEnd = &labelEnd) + { + byte ret = TreeNodeBehaviorNative(id, flags, (byte*)plabel, (byte*)plabelEnd); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TreeNodeBehaviorNative(id, flags, (byte*)plabel, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TreeNodeBehaviorNative(id, flags, pStr0, (byte*)plabelEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TreeNodeBehaviorNative(id, flags, pStr0, (byte*)plabelEnd); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte TreeNodeBehaviorIsOpenNative(uint id, ImGuiTreeNodeFlags flags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1212])(id, flags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1212])(id, flags); + #endif + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehaviorIsOpen(uint id, ImGuiTreeNodeFlags flags) + { + byte ret = TreeNodeBehaviorIsOpenNative(id, flags); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TreeNodeBehaviorIsOpen(uint id) + { + byte ret = TreeNodeBehaviorIsOpenNative(id, (ImGuiTreeNodeFlags)(0)); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void TreePushOverrideIDNative(uint id) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1213])(id); + #else + ((delegate* unmanaged[Cdecl])funcTable[1213])(id); + #endif + } + + /// + /// To be documented. + /// + public static void TreePushOverrideID(uint id) + { + TreePushOverrideIDNative(id); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiDataTypeInfo* DataTypeGetInfoNative(ImGuiDataType dataType) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1214])(dataType); + #else + return (ImGuiDataTypeInfo*)((delegate* unmanaged[Cdecl])funcTable[1214])(dataType); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiDataTypeInfoPtr DataTypeGetInfo(ImGuiDataType dataType) + { + ImGuiDataTypeInfoPtr ret = DataTypeGetInfoNative(dataType); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DataTypeApplyOpNative(ImGuiDataType dataType, int op, void* output, void* arg1, void* arg2) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1215])(dataType, op, output, arg1, arg2); + #else + ((delegate* unmanaged[Cdecl])funcTable[1215])(dataType, op, (nint)output, (nint)arg1, (nint)arg2); + #endif + } + + /// + /// To be documented. + /// + public static void DataTypeApplyOp(ImGuiDataType dataType, int op, void* output, void* arg1, void* arg2) + { + DataTypeApplyOpNative(dataType, op, output, arg1, arg2); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte DataTypeApplyFromTextNative(byte* buf, ImGuiDataType dataType, void* pData, byte* format) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1216])(buf, dataType, pData, format); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1216])((nint)buf, dataType, (nint)pData, (nint)format); + #endif + } + + /// + /// To be documented. + /// + public static bool DataTypeApplyFromText(byte* buf, ImGuiDataType dataType, void* pData, byte* format) + { + byte ret = DataTypeApplyFromTextNative(buf, dataType, pData, format); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool DataTypeApplyFromText(ref byte buf, ImGuiDataType dataType, void* pData, byte* format) + { + fixed (byte* pbuf = &buf) + { + byte ret = DataTypeApplyFromTextNative((byte*)pbuf, dataType, pData, format); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool DataTypeApplyFromText(ReadOnlySpan buf, ImGuiDataType dataType, void* pData, byte* format) + { + fixed (byte* pbuf = buf) + { + byte ret = DataTypeApplyFromTextNative((byte*)pbuf, dataType, pData, format); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = DataTypeApplyFromTextNative(pStr0, dataType, pData, format); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool DataTypeApplyFromText(byte* buf, ImGuiDataType dataType, void* pData, ref byte format) + { + fixed (byte* pformat = &format) + { + byte ret = DataTypeApplyFromTextNative(buf, dataType, pData, (byte*)pformat); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool DataTypeApplyFromText(byte* buf, ImGuiDataType dataType, void* pData, ReadOnlySpan format) + { + fixed (byte* pformat = format) + { + byte ret = DataTypeApplyFromTextNative(buf, dataType, pData, (byte*)pformat); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = DataTypeApplyFromTextNative(buf, dataType, pData, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool DataTypeApplyFromText(ref byte buf, ImGuiDataType dataType, void* pData, ref byte format) + { + fixed (byte* pbuf = &buf) + { + fixed (byte* pformat = &format) + { + byte ret = DataTypeApplyFromTextNative((byte*)pbuf, dataType, pData, (byte*)pformat); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool DataTypeApplyFromText(ReadOnlySpan buf, ImGuiDataType dataType, void* pData, ReadOnlySpan format) + { + fixed (byte* pbuf = buf) + { + fixed (byte* pformat = format) + { + byte ret = DataTypeApplyFromTextNative((byte*)pbuf, dataType, pData, (byte*)pformat); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = DataTypeApplyFromTextNative(pStr0, dataType, pData, pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool DataTypeApplyFromText(ref byte buf, ImGuiDataType dataType, void* pData, ReadOnlySpan format) + { + fixed (byte* pbuf = &buf) + { + fixed (byte* pformat = format) + { + byte ret = DataTypeApplyFromTextNative((byte*)pbuf, dataType, pData, (byte*)pformat); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = DataTypeApplyFromTextNative((byte*)pbuf, dataType, pData, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool DataTypeApplyFromText(ReadOnlySpan buf, ImGuiDataType dataType, void* pData, ref byte format) + { + fixed (byte* pbuf = buf) + { + fixed (byte* pformat = &format) + { + byte ret = DataTypeApplyFromTextNative((byte*)pbuf, dataType, pData, (byte*)pformat); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = DataTypeApplyFromTextNative((byte*)pbuf, dataType, pData, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = DataTypeApplyFromTextNative(pStr0, dataType, pData, (byte*)pformat); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = DataTypeApplyFromTextNative(pStr0, dataType, pData, (byte*)pformat); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int DataTypeCompareNative(ImGuiDataType dataType, void* arg1, void* arg2) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1217])(dataType, arg1, arg2); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[1217])(dataType, (nint)arg1, (nint)arg2); + #endif + } + + /// + /// To be documented. + /// + public static int DataTypeCompare(ImGuiDataType dataType, void* arg1, void* arg2) + { + int ret = DataTypeCompareNative(dataType, arg1, arg2); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte DataTypeClampNative(ImGuiDataType dataType, void* pData, void* pMin, void* pMax) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1218])(dataType, pData, pMin, pMax); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1218])(dataType, (nint)pData, (nint)pMin, (nint)pMax); + #endif + } + + /// + /// To be documented. + /// + public static bool DataTypeClamp(ImGuiDataType dataType, void* pData, void* pMin, void* pMax) + { + byte ret = DataTypeClampNative(dataType, pData, pMin, pMax); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte TempInputScalarNative(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin, void* pClampMax) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1219])(bb, id, label, dataType, pData, format, pClampMin, pClampMax); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1219])(bb, id, (nint)label, dataType, (nint)pData, (nint)format, (nint)pClampMin, (nint)pClampMax); + #endif + } + + /// + /// To be documented. + /// + public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin, void* pClampMax) + { + byte ret = TempInputScalarNative(bb, id, label, dataType, pData, format, pClampMin, pClampMax); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin) + { + byte ret = TempInputScalarNative(bb, id, label, dataType, pData, format, pClampMin, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, byte* format) + { + byte ret = TempInputScalarNative(bb, id, label, dataType, pData, format, (void*)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, format, pClampMin, pClampMax); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, format, pClampMin, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TempInputScalar(ImRect bb, uint id, ref byte label, ImGuiDataType dataType, void* pData, byte* format) + { + fixed (byte* plabel = &label) + { + byte ret = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, format, (void*)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, format, pClampMin, pClampMax); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin) + { + fixed (byte* plabel = label) + { + byte ret = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, format, pClampMin, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TempInputScalar(ImRect bb, uint id, ReadOnlySpan label, ImGuiDataType dataType, void* pData, byte* format) + { + fixed (byte* plabel = label) + { + byte ret = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, format, (void*)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, pStr0, dataType, pData, format, pClampMin, pClampMax); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, pStr0, dataType, pData, format, pClampMin, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, pStr0, dataType, pData, format, (void*)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, label, dataType, pData, (byte*)pformat, pClampMin, pClampMax); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, label, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, ref byte format) + { + fixed (byte* pformat = &format) + { + byte ret = TempInputScalarNative(bb, id, label, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, label, dataType, pData, (byte*)pformat, pClampMin, pClampMax); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, ReadOnlySpan format, void* pClampMin) + { + fixed (byte* pformat = format) + { + byte ret = TempInputScalarNative(bb, id, label, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TempInputScalar(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, ReadOnlySpan format) + { + fixed (byte* pformat = format) + { + byte ret = TempInputScalarNative(bb, id, label, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, label, dataType, pData, pStr0, pClampMin, pClampMax); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, label, dataType, pData, pStr0, pClampMin, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, label, dataType, pData, pStr0, (void*)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, pClampMax); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, pClampMax); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(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; + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(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; + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(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; + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, pClampMax); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, pStr0, pClampMin, pClampMax); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, pStr0, pClampMin, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, pStr0, (void*)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, pClampMax); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, pStr0, pClampMin, pClampMax); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, pStr0, pClampMin, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, (byte*)plabel, dataType, pData, pStr0, (void*)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, pStr0, dataType, pData, (byte*)pformat, pClampMin, pClampMax); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, pStr0, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, pStr0, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, pStr0, dataType, pData, (byte*)pformat, pClampMin, pClampMax); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, pStr0, dataType, pData, (byte*)pformat, pClampMin, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + 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 = TempInputScalarNative(bb, id, pStr0, dataType, pData, (byte*)pformat, (void*)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte TempInputIsActiveNative(uint id) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1220])(id); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1220])(id); + #endif + } + + /// + /// To be documented. + /// + public static bool TempInputIsActive(uint id) + { + byte ret = TempInputIsActiveNative(id); + return ret != 0; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImGuiInputTextState* GetInputTextStateNative(uint id) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1221])(id); + #else + return (ImGuiInputTextState*)((delegate* unmanaged[Cdecl])funcTable[1221])(id); + #endif + } + + /// + /// To be documented. + /// + public static ImGuiInputTextStatePtr GetInputTextState(uint id) + { + ImGuiInputTextStatePtr ret = GetInputTextStateNative(id); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ColorTooltipNative(byte* text, float* col, ImGuiColorEditFlags flags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1222])(text, col, flags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1222])((nint)text, (nint)col, flags); + #endif + } + + /// + /// To be documented. + /// + public static void ColorTooltip(byte* text, float* col, ImGuiColorEditFlags flags) + { + ColorTooltipNative(text, col, flags); + } + + /// + /// To be documented. + /// + public static void ColorTooltip(ref byte text, float* col, ImGuiColorEditFlags flags) + { + fixed (byte* ptext = &text) + { + ColorTooltipNative((byte*)ptext, col, flags); + } + } + + /// + /// To be documented. + /// + public static void ColorTooltip(ReadOnlySpan text, float* col, ImGuiColorEditFlags flags) + { + fixed (byte* ptext = text) + { + ColorTooltipNative((byte*)ptext, col, flags); + } + } + + /// + /// To be documented. + /// + 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; + } + ColorTooltipNative(pStr0, col, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void ColorTooltip(byte* text, ref float col, ImGuiColorEditFlags flags) + { + fixed (float* pcol = &col) + { + ColorTooltipNative(text, (float*)pcol, flags); + } + } + + /// + /// To be documented. + /// + public static void ColorTooltip(ref byte text, ref float col, ImGuiColorEditFlags flags) + { + fixed (byte* ptext = &text) + { + fixed (float* pcol = &col) + { + ColorTooltipNative((byte*)ptext, (float*)pcol, flags); + } + } + } + + /// + /// To be documented. + /// + public static void ColorTooltip(ReadOnlySpan text, ref float col, ImGuiColorEditFlags flags) + { + fixed (byte* ptext = text) + { + fixed (float* pcol = &col) + { + ColorTooltipNative((byte*)ptext, (float*)pcol, flags); + } + } + } + + /// + /// To be documented. + /// + 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) + { + ColorTooltipNative(pStr0, (float*)pcol, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ColorEditOptionsPopupNative(float* col, ImGuiColorEditFlags flags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1223])(col, flags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1223])((nint)col, flags); + #endif + } + + /// + /// To be documented. + /// + public static void ColorEditOptionsPopup(float* col, ImGuiColorEditFlags flags) + { + ColorEditOptionsPopupNative(col, flags); + } + + /// + /// To be documented. + /// + public static void ColorEditOptionsPopup(ref float col, ImGuiColorEditFlags flags) + { + fixed (float* pcol = &col) + { + ColorEditOptionsPopupNative((float*)pcol, flags); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ColorPickerOptionsPopupNative(float* refCol, ImGuiColorEditFlags flags) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1224])(refCol, flags); + #else + ((delegate* unmanaged[Cdecl])funcTable[1224])((nint)refCol, flags); + #endif + } + + /// + /// To be documented. + /// + public static void ColorPickerOptionsPopup(float* refCol, ImGuiColorEditFlags flags) + { + ColorPickerOptionsPopupNative(refCol, flags); + } + + /// + /// To be documented. + /// + public static void ColorPickerOptionsPopup(ref float refCol, ImGuiColorEditFlags flags) + { + fixed (float* prefCol = &refCol) + { + ColorPickerOptionsPopupNative((float*)prefCol, flags); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + 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) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl], void*, int, int, byte*, float, float, Vector2, float>, void*, int, int, byte*, float, float, Vector2, int>)funcTable[1225])(plotType, label, valuesGetter, data, valuesCount, valuesOffset, overlayText, scaleMin, scaleMax, frameSize); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[1225])(plotType, (nint)label, (nint)valuesGetter, (nint)data, valuesCount, valuesOffset, (nint)overlayText, scaleMin, scaleMax, frameSize); + #endif + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, label, valuesGetter, data, valuesCount, valuesOffset, overlayText, scaleMin, scaleMax, frameSize); + return ret; + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, overlayText, scaleMin, scaleMax, frameSize); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, overlayText, scaleMin, scaleMax, frameSize); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, pStr0, valuesGetter, data, valuesCount, valuesOffset, overlayText, scaleMin, scaleMax, frameSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, label, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, label, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); + return ret; + } + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, label, valuesGetter, data, valuesCount, valuesOffset, pStr0, scaleMin, scaleMax, frameSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = PlotExNative(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; + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, pStr0, scaleMin, scaleMax, frameSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); + return ret; + } + } + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, (byte*)plabel, valuesGetter, data, valuesCount, valuesOffset, pStr0, scaleMin, scaleMax, frameSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, pStr0, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + 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 = PlotExNative(plotType, pStr0, valuesGetter, data, valuesCount, valuesOffset, (byte*)poverlayText, scaleMin, scaleMax, frameSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ShadeVertsLinearColorGradientKeepAlphaNative(ImDrawList* drawList, int vertStartIdx, int vertEndIdx, Vector2 gradientp0, Vector2 gradientp1, uint col0, uint col1) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1226])(drawList, vertStartIdx, vertEndIdx, gradientp0, gradientp1, col0, col1); + #else + ((delegate* unmanaged[Cdecl])funcTable[1226])((nint)drawList, vertStartIdx, vertEndIdx, gradientp0, gradientp1, col0, col1); + #endif + } + + /// + /// To be documented. + /// + public static void ShadeVertsLinearColorGradientKeepAlpha(ImDrawListPtr drawList, int vertStartIdx, int vertEndIdx, Vector2 gradientp0, Vector2 gradientp1, uint col0, uint col1) + { + ShadeVertsLinearColorGradientKeepAlphaNative(drawList, vertStartIdx, vertEndIdx, gradientp0, gradientp1, col0, col1); + } + + /// + /// To be documented. + /// + public static void ShadeVertsLinearColorGradientKeepAlpha(ref ImDrawList drawList, int vertStartIdx, int vertEndIdx, Vector2 gradientp0, Vector2 gradientp1, uint col0, uint col1) + { + fixed (ImDrawList* pdrawList = &drawList) + { + ShadeVertsLinearColorGradientKeepAlphaNative((ImDrawList*)pdrawList, vertStartIdx, vertEndIdx, gradientp0, gradientp1, col0, col1); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ShadeVertsLinearUVNative(ImDrawList* drawList, int vertStartIdx, int vertEndIdx, Vector2 a, Vector2 b, Vector2 uvA, Vector2 uvB, byte clamp) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1227])(drawList, vertStartIdx, vertEndIdx, a, b, uvA, uvB, clamp); + #else + ((delegate* unmanaged[Cdecl])funcTable[1227])((nint)drawList, vertStartIdx, vertEndIdx, a, b, uvA, uvB, clamp); + #endif + } + + /// + /// To be documented. + /// + public static void ShadeVertsLinearUV(ImDrawListPtr drawList, int vertStartIdx, int vertEndIdx, Vector2 a, Vector2 b, Vector2 uvA, Vector2 uvB, bool clamp) + { + ShadeVertsLinearUVNative(drawList, vertStartIdx, vertEndIdx, a, b, uvA, uvB, clamp ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void ShadeVertsLinearUV(ref ImDrawList drawList, int vertStartIdx, int vertEndIdx, Vector2 a, Vector2 b, Vector2 uvA, Vector2 uvB, bool clamp) + { + fixed (ImDrawList* pdrawList = &drawList) + { + ShadeVertsLinearUVNative((ImDrawList*)pdrawList, vertStartIdx, vertEndIdx, a, b, uvA, uvB, clamp ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GcCompactTransientMiscBuffersNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1228])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1228])(); + #endif + } + + /// + /// To be documented. + /// + public static void GcCompactTransientMiscBuffers() + { + GcCompactTransientMiscBuffersNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GcCompactTransientWindowBuffersNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1229])(window); + #else + ((delegate* unmanaged[Cdecl])funcTable[1229])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void GcCompactTransientWindowBuffers(ImGuiWindowPtr window) + { + GcCompactTransientWindowBuffersNative(window); + } + + /// + /// To be documented. + /// + public static void GcCompactTransientWindowBuffers(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + GcCompactTransientWindowBuffersNative((ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void GcAwakeTransientWindowBuffersNative(ImGuiWindow* window) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1230])(window); + #else + ((delegate* unmanaged[Cdecl])funcTable[1230])((nint)window); + #endif + } + + /// + /// To be documented. + /// + public static void GcAwakeTransientWindowBuffers(ImGuiWindowPtr window) + { + GcAwakeTransientWindowBuffersNative(window); + } + + /// + /// To be documented. + /// + public static void GcAwakeTransientWindowBuffers(ref ImGuiWindow window) + { + fixed (ImGuiWindow* pwindow = &window) + { + GcAwakeTransientWindowBuffersNative((ImGuiWindow*)pwindow); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugLogNative(byte* fmt) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1231])(fmt); + #else + ((delegate* unmanaged[Cdecl])funcTable[1231])((nint)fmt); + #endif + } + + /// + /// To be documented. + /// + public static void DebugLog(byte* fmt) + { + DebugLogNative(fmt); + } + + /// + /// To be documented. + /// + public static void DebugLog(ref byte fmt) + { + fixed (byte* pfmt = &fmt) + { + DebugLogNative((byte*)pfmt); + } + } + + /// + /// To be documented. + /// + public static void DebugLog(ReadOnlySpan fmt) + { + fixed (byte* pfmt = fmt) + { + DebugLogNative((byte*)pfmt); + } + } + + /// + /// To be documented. + /// + public static void DebugLog(string fmt) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + DebugLogNative(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugLogVNative(byte* fmt, nuint args) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1232])(fmt, args); + #else + ((delegate* unmanaged[Cdecl])funcTable[1232])((nint)fmt, args); + #endif + } + + /// + /// To be documented. + /// + public static void DebugLogV(byte* fmt, nuint args) + { + DebugLogVNative(fmt, args); + } + + /// + /// To be documented. + /// + public static void DebugLogV(ref byte fmt, nuint args) + { + fixed (byte* pfmt = &fmt) + { + DebugLogVNative((byte*)pfmt, args); + } + } + + /// + /// To be documented. + /// + public static void DebugLogV(ReadOnlySpan fmt, nuint args) + { + fixed (byte* pfmt = fmt) + { + DebugLogVNative((byte*)pfmt, args); + } + } + + /// + /// To be documented. + /// + public static void DebugLogV(string fmt, nuint args) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + DebugLogVNative(pStr0, args); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ErrorCheckEndFrameRecoverNative(ImGuiErrorLogCallback logCallback, void* userData) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl], void*, void>)funcTable[1233])((delegate*)Utils.GetFunctionPointerForDelegate(logCallback), userData); + #else + ((delegate* unmanaged[Cdecl])funcTable[1233])((nint)Utils.GetFunctionPointerForDelegate(logCallback), (nint)userData); + #endif + } + + /// + /// To be documented. + /// + public static void ErrorCheckEndFrameRecover(ImGuiErrorLogCallback logCallback, void* userData) + { + ErrorCheckEndFrameRecoverNative(logCallback, userData); + } + + /// + /// To be documented. + /// + public static void ErrorCheckEndFrameRecover(ImGuiErrorLogCallback logCallback) + { + ErrorCheckEndFrameRecoverNative(logCallback, (void*)(default)); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ErrorCheckEndWindowRecoverNative(ImGuiErrorLogCallback logCallback, void* userData) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl], void*, void>)funcTable[1234])((delegate*)Utils.GetFunctionPointerForDelegate(logCallback), userData); + #else + ((delegate* unmanaged[Cdecl])funcTable[1234])((nint)Utils.GetFunctionPointerForDelegate(logCallback), (nint)userData); + #endif + } + + /// + /// To be documented. + /// + public static void ErrorCheckEndWindowRecover(ImGuiErrorLogCallback logCallback, void* userData) + { + ErrorCheckEndWindowRecoverNative(logCallback, userData); + } + + /// + /// To be documented. + /// + public static void ErrorCheckEndWindowRecover(ImGuiErrorLogCallback logCallback) + { + ErrorCheckEndWindowRecoverNative(logCallback, (void*)(default)); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugDrawItemRectNative(uint col) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1235])(col); + #else + ((delegate* unmanaged[Cdecl])funcTable[1235])(col); + #endif + } + + /// + /// To be documented. + /// + public static void DebugDrawItemRect(uint col) + { + DebugDrawItemRectNative(col); + } + + /// + /// To be documented. + /// + public static void DebugDrawItemRect() + { + DebugDrawItemRectNative((uint)(4278190335)); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugStartItemPickerNative() + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1236])(); + #else + ((delegate* unmanaged[Cdecl])funcTable[1236])(); + #endif + } + + /// + /// To be documented. + /// + public static void DebugStartItemPicker() + { + DebugStartItemPickerNative(); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ShowFontAtlasNative(ImFontAtlas* atlas) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1237])(atlas); + #else + ((delegate* unmanaged[Cdecl])funcTable[1237])((nint)atlas); + #endif + } + + /// + /// To be documented. + /// + public static void ShowFontAtlas(ImFontAtlasPtr atlas) + { + ShowFontAtlasNative(atlas); + } + + /// + /// To be documented. + /// + public static void ShowFontAtlas(ref ImFontAtlas atlas) + { + fixed (ImFontAtlas* patlas = &atlas) + { + ShowFontAtlasNative((ImFontAtlas*)patlas); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugHookIdInfoNative(uint id, ImGuiDataType dataType, void* dataId, void* dataIdEnd) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1238])(id, dataType, dataId, dataIdEnd); + #else + ((delegate* unmanaged[Cdecl])funcTable[1238])(id, dataType, (nint)dataId, (nint)dataIdEnd); + #endif + } + + /// + /// To be documented. + /// + public static void DebugHookIdInfo(uint id, ImGuiDataType dataType, void* dataId, void* dataIdEnd) + { + DebugHookIdInfoNative(id, dataType, dataId, dataIdEnd); + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeColumnsNative(ImGuiOldColumns* columns) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1239])(columns); + #else + ((delegate* unmanaged[Cdecl])funcTable[1239])((nint)columns); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeColumns(ImGuiOldColumnsPtr columns) + { + DebugNodeColumnsNative(columns); + } + + /// + /// To be documented. + /// + public static void DebugNodeColumns(ref ImGuiOldColumns columns) + { + fixed (ImGuiOldColumns* pcolumns = &columns) + { + DebugNodeColumnsNative((ImGuiOldColumns*)pcolumns); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeDockNodeNative(ImGuiDockNode* node, byte* label) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1240])(node, label); + #else + ((delegate* unmanaged[Cdecl])funcTable[1240])((nint)node, (nint)label); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeDockNode(ImGuiDockNodePtr node, byte* label) + { + DebugNodeDockNodeNative(node, label); + } + + /// + /// To be documented. + /// + public static void DebugNodeDockNode(ref ImGuiDockNode node, byte* label) + { + fixed (ImGuiDockNode* pnode = &node) + { + DebugNodeDockNodeNative((ImGuiDockNode*)pnode, label); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDockNode(ImGuiDockNodePtr node, ref byte label) + { + fixed (byte* plabel = &label) + { + DebugNodeDockNodeNative(node, (byte*)plabel); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDockNode(ImGuiDockNodePtr node, ReadOnlySpan label) + { + fixed (byte* plabel = label) + { + DebugNodeDockNodeNative(node, (byte*)plabel); + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeDockNodeNative(node, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDockNode(ref ImGuiDockNode node, ref byte label) + { + fixed (ImGuiDockNode* pnode = &node) + { + fixed (byte* plabel = &label) + { + DebugNodeDockNodeNative((ImGuiDockNode*)pnode, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDockNode(ref ImGuiDockNode node, ReadOnlySpan label) + { + fixed (ImGuiDockNode* pnode = &node) + { + fixed (byte* plabel = label) + { + DebugNodeDockNodeNative((ImGuiDockNode*)pnode, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeDockNodeNative((ImGuiDockNode*)pnode, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeDrawListNative(ImGuiWindow* window, ImGuiViewportP* viewport, ImDrawList* drawList, byte* label) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1241])(window, viewport, drawList, label); + #else + ((delegate* unmanaged[Cdecl])funcTable[1241])((nint)window, (nint)viewport, (nint)drawList, (nint)label); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, byte* label) + { + DebugNodeDrawListNative(window, viewport, drawList, label); + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ref ImGuiWindow window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, byte* label) + { + fixed (ImGuiWindow* pwindow = &window) + { + DebugNodeDrawListNative((ImGuiWindow*)pwindow, viewport, drawList, label); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ImGuiWindowPtr window, ref ImGuiViewportP viewport, ImDrawListPtr drawList, byte* label) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + DebugNodeDrawListNative(window, (ImGuiViewportP*)pviewport, drawList, label); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ref ImGuiWindow window, ref ImGuiViewportP viewport, ImDrawListPtr drawList, byte* label) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + DebugNodeDrawListNative((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, drawList, label); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ref ImDrawList drawList, byte* label) + { + fixed (ImDrawList* pdrawList = &drawList) + { + DebugNodeDrawListNative(window, viewport, (ImDrawList*)pdrawList, label); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ref ImGuiWindow window, ImGuiViewportPPtr viewport, ref ImDrawList drawList, byte* label) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (ImDrawList* pdrawList = &drawList) + { + DebugNodeDrawListNative((ImGuiWindow*)pwindow, viewport, (ImDrawList*)pdrawList, label); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ImGuiWindowPtr window, ref ImGuiViewportP viewport, ref ImDrawList drawList, byte* label) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + fixed (ImDrawList* pdrawList = &drawList) + { + DebugNodeDrawListNative(window, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, label); + } + } + } + + /// + /// To be documented. + /// + 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) + { + DebugNodeDrawListNative((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, label); + } + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, ref byte label) + { + fixed (byte* plabel = &label) + { + DebugNodeDrawListNative(window, viewport, drawList, (byte*)plabel); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, ReadOnlySpan label) + { + fixed (byte* plabel = label) + { + DebugNodeDrawListNative(window, viewport, drawList, (byte*)plabel); + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeDrawListNative(window, viewport, drawList, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ref ImGuiWindow window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, ref byte label) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (byte* plabel = &label) + { + DebugNodeDrawListNative((ImGuiWindow*)pwindow, viewport, drawList, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ref ImGuiWindow window, ImGuiViewportPPtr viewport, ImDrawListPtr drawList, ReadOnlySpan label) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (byte* plabel = label) + { + DebugNodeDrawListNative((ImGuiWindow*)pwindow, viewport, drawList, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeDrawListNative((ImGuiWindow*)pwindow, viewport, drawList, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ImGuiWindowPtr window, ref ImGuiViewportP viewport, ImDrawListPtr drawList, ref byte label) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + fixed (byte* plabel = &label) + { + DebugNodeDrawListNative(window, (ImGuiViewportP*)pviewport, drawList, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ImGuiWindowPtr window, ref ImGuiViewportP viewport, ImDrawListPtr drawList, ReadOnlySpan label) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + fixed (byte* plabel = label) + { + DebugNodeDrawListNative(window, (ImGuiViewportP*)pviewport, drawList, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeDrawListNative(window, (ImGuiViewportP*)pviewport, drawList, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + 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) + { + DebugNodeDrawListNative((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, drawList, (byte*)plabel); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + DebugNodeDrawListNative((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, drawList, (byte*)plabel); + } + } + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeDrawListNative((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, drawList, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ref ImDrawList drawList, ref byte label) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* plabel = &label) + { + DebugNodeDrawListNative(window, viewport, (ImDrawList*)pdrawList, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawList(ImGuiWindowPtr window, ImGuiViewportPPtr viewport, ref ImDrawList drawList, ReadOnlySpan label) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (byte* plabel = label) + { + DebugNodeDrawListNative(window, viewport, (ImDrawList*)pdrawList, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeDrawListNative(window, viewport, (ImDrawList*)pdrawList, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + 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) + { + DebugNodeDrawListNative((ImGuiWindow*)pwindow, viewport, (ImDrawList*)pdrawList, (byte*)plabel); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + DebugNodeDrawListNative((ImGuiWindow*)pwindow, viewport, (ImDrawList*)pdrawList, (byte*)plabel); + } + } + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeDrawListNative((ImGuiWindow*)pwindow, viewport, (ImDrawList*)pdrawList, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + DebugNodeDrawListNative(window, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, (byte*)plabel); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + DebugNodeDrawListNative(window, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, (byte*)plabel); + } + } + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeDrawListNative(window, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + DebugNodeDrawListNative((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, (byte*)plabel); + } + } + } + } + } + + /// + /// To be documented. + /// + 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) + { + DebugNodeDrawListNative((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, (byte*)plabel); + } + } + } + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeDrawListNative((ImGuiWindow*)pwindow, (ImGuiViewportP*)pviewport, (ImDrawList*)pdrawList, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeDrawCmdShowMeshAndBoundingBoxNative(ImDrawList* outDrawList, ImDrawList* drawList, ImDrawCmd* drawCmd, byte showMesh, byte showAabb) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1242])(outDrawList, drawList, drawCmd, showMesh, showAabb); + #else + ((delegate* unmanaged[Cdecl])funcTable[1242])((nint)outDrawList, (nint)drawList, (nint)drawCmd, showMesh, showAabb); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawListPtr outDrawList, ImDrawListPtr drawList, ImDrawCmdPtr drawCmd, bool showMesh, bool showAabb) + { + DebugNodeDrawCmdShowMeshAndBoundingBoxNative(outDrawList, drawList, drawCmd, showMesh ? (byte)1 : (byte)0, showAabb ? (byte)1 : (byte)0); + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawCmdShowMeshAndBoundingBox(ref ImDrawList outDrawList, ImDrawListPtr drawList, ImDrawCmdPtr drawCmd, bool showMesh, bool showAabb) + { + fixed (ImDrawList* poutDrawList = &outDrawList) + { + DebugNodeDrawCmdShowMeshAndBoundingBoxNative((ImDrawList*)poutDrawList, drawList, drawCmd, showMesh ? (byte)1 : (byte)0, showAabb ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawListPtr outDrawList, ref ImDrawList drawList, ImDrawCmdPtr drawCmd, bool showMesh, bool showAabb) + { + fixed (ImDrawList* pdrawList = &drawList) + { + DebugNodeDrawCmdShowMeshAndBoundingBoxNative(outDrawList, (ImDrawList*)pdrawList, drawCmd, showMesh ? (byte)1 : (byte)0, showAabb ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawCmdShowMeshAndBoundingBox(ref ImDrawList outDrawList, ref ImDrawList drawList, ImDrawCmdPtr drawCmd, bool showMesh, bool showAabb) + { + fixed (ImDrawList* poutDrawList = &outDrawList) + { + fixed (ImDrawList* pdrawList = &drawList) + { + DebugNodeDrawCmdShowMeshAndBoundingBoxNative((ImDrawList*)poutDrawList, (ImDrawList*)pdrawList, drawCmd, showMesh ? (byte)1 : (byte)0, showAabb ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawListPtr outDrawList, ImDrawListPtr drawList, ref ImDrawCmd drawCmd, bool showMesh, bool showAabb) + { + fixed (ImDrawCmd* pdrawCmd = &drawCmd) + { + DebugNodeDrawCmdShowMeshAndBoundingBoxNative(outDrawList, drawList, (ImDrawCmd*)pdrawCmd, showMesh ? (byte)1 : (byte)0, showAabb ? (byte)1 : (byte)0); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawCmdShowMeshAndBoundingBox(ref ImDrawList outDrawList, ImDrawListPtr drawList, ref ImDrawCmd drawCmd, bool showMesh, bool showAabb) + { + fixed (ImDrawList* poutDrawList = &outDrawList) + { + fixed (ImDrawCmd* pdrawCmd = &drawCmd) + { + DebugNodeDrawCmdShowMeshAndBoundingBoxNative((ImDrawList*)poutDrawList, drawList, (ImDrawCmd*)pdrawCmd, showMesh ? (byte)1 : (byte)0, showAabb ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawListPtr outDrawList, ref ImDrawList drawList, ref ImDrawCmd drawCmd, bool showMesh, bool showAabb) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (ImDrawCmd* pdrawCmd = &drawCmd) + { + DebugNodeDrawCmdShowMeshAndBoundingBoxNative(outDrawList, (ImDrawList*)pdrawList, (ImDrawCmd*)pdrawCmd, showMesh ? (byte)1 : (byte)0, showAabb ? (byte)1 : (byte)0); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeDrawCmdShowMeshAndBoundingBox(ref ImDrawList outDrawList, ref ImDrawList drawList, ref ImDrawCmd drawCmd, bool showMesh, bool showAabb) + { + fixed (ImDrawList* poutDrawList = &outDrawList) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (ImDrawCmd* pdrawCmd = &drawCmd) + { + DebugNodeDrawCmdShowMeshAndBoundingBoxNative((ImDrawList*)poutDrawList, (ImDrawList*)pdrawList, (ImDrawCmd*)pdrawCmd, showMesh ? (byte)1 : (byte)0, showAabb ? (byte)1 : (byte)0); + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeFontNative(ImFont* font) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1243])(font); + #else + ((delegate* unmanaged[Cdecl])funcTable[1243])((nint)font); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeFont(ImFontPtr font) + { + DebugNodeFontNative(font); + } + + /// + /// To be documented. + /// + public static void DebugNodeFont(ref ImFont font) + { + fixed (ImFont* pfont = &font) + { + DebugNodeFontNative((ImFont*)pfont); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeFontGlyphNative(ImFont* font, ImFontGlyph* glyph) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1244])(font, glyph); + #else + ((delegate* unmanaged[Cdecl])funcTable[1244])((nint)font, (nint)glyph); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeFontGlyph(ImFontPtr font, ImFontGlyphPtr glyph) + { + DebugNodeFontGlyphNative(font, glyph); + } + + /// + /// To be documented. + /// + public static void DebugNodeFontGlyph(ref ImFont font, ImFontGlyphPtr glyph) + { + fixed (ImFont* pfont = &font) + { + DebugNodeFontGlyphNative((ImFont*)pfont, glyph); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeFontGlyph(ImFontPtr font, ref ImFontGlyph glyph) + { + fixed (ImFontGlyph* pglyph = &glyph) + { + DebugNodeFontGlyphNative(font, (ImFontGlyph*)pglyph); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeFontGlyph(ref ImFont font, ref ImFontGlyph glyph) + { + fixed (ImFont* pfont = &font) + { + fixed (ImFontGlyph* pglyph = &glyph) + { + DebugNodeFontGlyphNative((ImFont*)pfont, (ImFontGlyph*)pglyph); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeStorageNative(ImGuiStorage* storage, byte* label) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1245])(storage, label); + #else + ((delegate* unmanaged[Cdecl])funcTable[1245])((nint)storage, (nint)label); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeStorage(ImGuiStoragePtr storage, byte* label) + { + DebugNodeStorageNative(storage, label); + } + + /// + /// To be documented. + /// + public static void DebugNodeStorage(ref ImGuiStorage storage, byte* label) + { + fixed (ImGuiStorage* pstorage = &storage) + { + DebugNodeStorageNative((ImGuiStorage*)pstorage, label); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeStorage(ImGuiStoragePtr storage, ref byte label) + { + fixed (byte* plabel = &label) + { + DebugNodeStorageNative(storage, (byte*)plabel); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeStorage(ImGuiStoragePtr storage, ReadOnlySpan label) + { + fixed (byte* plabel = label) + { + DebugNodeStorageNative(storage, (byte*)plabel); + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeStorageNative(storage, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeStorage(ref ImGuiStorage storage, ref byte label) + { + fixed (ImGuiStorage* pstorage = &storage) + { + fixed (byte* plabel = &label) + { + DebugNodeStorageNative((ImGuiStorage*)pstorage, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeStorage(ref ImGuiStorage storage, ReadOnlySpan label) + { + fixed (ImGuiStorage* pstorage = &storage) + { + fixed (byte* plabel = label) + { + DebugNodeStorageNative((ImGuiStorage*)pstorage, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeStorageNative((ImGuiStorage*)pstorage, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeTabBarNative(ImGuiTabBar* tabBar, byte* label) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1246])(tabBar, label); + #else + ((delegate* unmanaged[Cdecl])funcTable[1246])((nint)tabBar, (nint)label); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeTabBar(ImGuiTabBarPtr tabBar, byte* label) + { + DebugNodeTabBarNative(tabBar, label); + } + + /// + /// To be documented. + /// + public static void DebugNodeTabBar(ref ImGuiTabBar tabBar, byte* label) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + DebugNodeTabBarNative((ImGuiTabBar*)ptabBar, label); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeTabBar(ImGuiTabBarPtr tabBar, ref byte label) + { + fixed (byte* plabel = &label) + { + DebugNodeTabBarNative(tabBar, (byte*)plabel); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeTabBar(ImGuiTabBarPtr tabBar, ReadOnlySpan label) + { + fixed (byte* plabel = label) + { + DebugNodeTabBarNative(tabBar, (byte*)plabel); + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeTabBarNative(tabBar, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeTabBar(ref ImGuiTabBar tabBar, ref byte label) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + fixed (byte* plabel = &label) + { + DebugNodeTabBarNative((ImGuiTabBar*)ptabBar, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeTabBar(ref ImGuiTabBar tabBar, ReadOnlySpan label) + { + fixed (ImGuiTabBar* ptabBar = &tabBar) + { + fixed (byte* plabel = label) + { + DebugNodeTabBarNative((ImGuiTabBar*)ptabBar, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeTabBarNative((ImGuiTabBar*)ptabBar, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeTableNative(ImGuiTable* table) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1247])(table); + #else + ((delegate* unmanaged[Cdecl])funcTable[1247])((nint)table); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeTable(ImGuiTablePtr table) + { + DebugNodeTableNative(table); + } + + /// + /// To be documented. + /// + public static void DebugNodeTable(ref ImGuiTable table) + { + fixed (ImGuiTable* ptable = &table) + { + DebugNodeTableNative((ImGuiTable*)ptable); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeTableSettingsNative(ImGuiTableSettings* settings) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1248])(settings); + #else + ((delegate* unmanaged[Cdecl])funcTable[1248])((nint)settings); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeTableSettings(ImGuiTableSettingsPtr settings) + { + DebugNodeTableSettingsNative(settings); + } + + /// + /// To be documented. + /// + public static void DebugNodeTableSettings(ref ImGuiTableSettings settings) + { + fixed (ImGuiTableSettings* psettings = &settings) + { + DebugNodeTableSettingsNative((ImGuiTableSettings*)psettings); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeInputTextStateNative(ImGuiInputTextState* state) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1249])(state); + #else + ((delegate* unmanaged[Cdecl])funcTable[1249])((nint)state); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeInputTextState(ImGuiInputTextStatePtr state) + { + DebugNodeInputTextStateNative(state); + } + + /// + /// To be documented. + /// + public static void DebugNodeInputTextState(ref ImGuiInputTextState state) + { + fixed (ImGuiInputTextState* pstate = &state) + { + DebugNodeInputTextStateNative((ImGuiInputTextState*)pstate); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeWindowNative(ImGuiWindow* window, byte* label) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1250])(window, label); + #else + ((delegate* unmanaged[Cdecl])funcTable[1250])((nint)window, (nint)label); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeWindow(ImGuiWindowPtr window, byte* label) + { + DebugNodeWindowNative(window, label); + } + + /// + /// To be documented. + /// + public static void DebugNodeWindow(ref ImGuiWindow window, byte* label) + { + fixed (ImGuiWindow* pwindow = &window) + { + DebugNodeWindowNative((ImGuiWindow*)pwindow, label); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeWindow(ImGuiWindowPtr window, ref byte label) + { + fixed (byte* plabel = &label) + { + DebugNodeWindowNative(window, (byte*)plabel); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeWindow(ImGuiWindowPtr window, ReadOnlySpan label) + { + fixed (byte* plabel = label) + { + DebugNodeWindowNative(window, (byte*)plabel); + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeWindowNative(window, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeWindow(ref ImGuiWindow window, ref byte label) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (byte* plabel = &label) + { + DebugNodeWindowNative((ImGuiWindow*)pwindow, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeWindow(ref ImGuiWindow window, ReadOnlySpan label) + { + fixed (ImGuiWindow* pwindow = &window) + { + fixed (byte* plabel = label) + { + DebugNodeWindowNative((ImGuiWindow*)pwindow, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeWindowNative((ImGuiWindow*)pwindow, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeWindowSettingsNative(ImGuiWindowSettings* settings) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1251])(settings); + #else + ((delegate* unmanaged[Cdecl])funcTable[1251])((nint)settings); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeWindowSettings(ImGuiWindowSettingsPtr settings) + { + DebugNodeWindowSettingsNative(settings); + } + + /// + /// To be documented. + /// + public static void DebugNodeWindowSettings(ref ImGuiWindowSettings settings) + { + fixed (ImGuiWindowSettings* psettings = &settings) + { + DebugNodeWindowSettingsNative((ImGuiWindowSettings*)psettings); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeWindowsListNative(ImVector* windows, byte* label) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl]*, byte*, void>)funcTable[1252])(windows, label); + #else + ((delegate* unmanaged[Cdecl])funcTable[1252])((nint)windows, (nint)label); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeWindowsList(ImVector* windows, byte* label) + { + DebugNodeWindowsListNative(windows, label); + } + + /// + /// To be documented. + /// + public static void DebugNodeWindowsList(ref ImVector windows, byte* label) + { + fixed (ImVector* pwindows = &windows) + { + DebugNodeWindowsListNative((ImVector*)pwindows, label); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeWindowsList(ImVector* windows, ref byte label) + { + fixed (byte* plabel = &label) + { + DebugNodeWindowsListNative(windows, (byte*)plabel); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeWindowsList(ImVector* windows, ReadOnlySpan label) + { + fixed (byte* plabel = label) + { + DebugNodeWindowsListNative(windows, (byte*)plabel); + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeWindowsListNative(windows, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeWindowsList(ref ImVector windows, ref byte label) + { + fixed (ImVector* pwindows = &windows) + { + fixed (byte* plabel = &label) + { + DebugNodeWindowsListNative((ImVector*)pwindows, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + public static void DebugNodeWindowsList(ref ImVector windows, ReadOnlySpan label) + { + fixed (ImVector* pwindows = &windows) + { + fixed (byte* plabel = label) + { + DebugNodeWindowsListNative((ImVector*)pwindows, (byte*)plabel); + } + } + } + + /// + /// To be documented. + /// + 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; + } + DebugNodeWindowsListNative((ImVector*)pwindows, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeWindowsListByBeginStackParentNative(ImGuiWindow** windows, int windowsSize, ImGuiWindow* parentInBeginStack) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1253])(windows, windowsSize, parentInBeginStack); + #else + ((delegate* unmanaged[Cdecl])funcTable[1253])((nint)windows, windowsSize, (nint)parentInBeginStack); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeWindowsListByBeginStackParent(ImGuiWindowPtrPtr windows, int windowsSize, ImGuiWindowPtr parentInBeginStack) + { + DebugNodeWindowsListByBeginStackParentNative(windows, windowsSize, parentInBeginStack); + } + + /// + /// To be documented. + /// + public static void DebugNodeWindowsListByBeginStackParent(ref ImGuiWindow* windows, int windowsSize, ImGuiWindowPtr parentInBeginStack) + { + fixed (ImGuiWindow** pwindows = &windows) + { + DebugNodeWindowsListByBeginStackParentNative((ImGuiWindow**)pwindows, windowsSize, parentInBeginStack); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeWindowsListByBeginStackParent(ImGuiWindowPtrPtr windows, int windowsSize, ref ImGuiWindow parentInBeginStack) + { + fixed (ImGuiWindow* pparentInBeginStack = &parentInBeginStack) + { + DebugNodeWindowsListByBeginStackParentNative(windows, windowsSize, (ImGuiWindow*)pparentInBeginStack); + } + } + + /// + /// To be documented. + /// + public static void DebugNodeWindowsListByBeginStackParent(ref ImGuiWindow* windows, int windowsSize, ref ImGuiWindow parentInBeginStack) + { + fixed (ImGuiWindow** pwindows = &windows) + { + fixed (ImGuiWindow* pparentInBeginStack = &parentInBeginStack) + { + DebugNodeWindowsListByBeginStackParentNative((ImGuiWindow**)pwindows, windowsSize, (ImGuiWindow*)pparentInBeginStack); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugNodeViewportNative(ImGuiViewportP* viewport) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1254])(viewport); + #else + ((delegate* unmanaged[Cdecl])funcTable[1254])((nint)viewport); + #endif + } + + /// + /// To be documented. + /// + public static void DebugNodeViewport(ImGuiViewportPPtr viewport) + { + DebugNodeViewportNative(viewport); + } + + /// + /// To be documented. + /// + public static void DebugNodeViewport(ref ImGuiViewportP viewport) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + DebugNodeViewportNative((ImGuiViewportP*)pviewport); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void DebugRenderViewportThumbnailNative(ImDrawList* drawList, ImGuiViewportP* viewport, ImRect bb) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1255])(drawList, viewport, bb); + #else + ((delegate* unmanaged[Cdecl])funcTable[1255])((nint)drawList, (nint)viewport, bb); + #endif + } + + /// + /// To be documented. + /// + public static void DebugRenderViewportThumbnail(ImDrawListPtr drawList, ImGuiViewportPPtr viewport, ImRect bb) + { + DebugRenderViewportThumbnailNative(drawList, viewport, bb); + } + + /// + /// To be documented. + /// + public static void DebugRenderViewportThumbnail(ref ImDrawList drawList, ImGuiViewportPPtr viewport, ImRect bb) + { + fixed (ImDrawList* pdrawList = &drawList) + { + DebugRenderViewportThumbnailNative((ImDrawList*)pdrawList, viewport, bb); + } + } + + /// + /// To be documented. + /// + public static void DebugRenderViewportThumbnail(ImDrawListPtr drawList, ref ImGuiViewportP viewport, ImRect bb) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + DebugRenderViewportThumbnailNative(drawList, (ImGuiViewportP*)pviewport, bb); + } + } + + /// + /// To be documented. + /// + public static void DebugRenderViewportThumbnail(ref ImDrawList drawList, ref ImGuiViewportP viewport, ImRect bb) + { + fixed (ImDrawList* pdrawList = &drawList) + { + fixed (ImGuiViewportP* pviewport = &viewport) + { + DebugRenderViewportThumbnailNative((ImDrawList*)pdrawList, (ImGuiViewportP*)pviewport, bb); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ImFontBuilderIO* ImFontAtlasGetBuilderForStbTruetypeNative() + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1256])(); + #else + return (ImFontBuilderIO*)((delegate* unmanaged[Cdecl])funcTable[1256])(); + #endif + } + + /// + /// To be documented. + /// + public static ImFontBuilderIOPtr ImFontAtlasGetBuilderForStbTruetype() + { + ImFontBuilderIOPtr ret = ImFontAtlasGetBuilderForStbTruetypeNative(); + return ret; + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImFontAtlasBuildInitNative(ImFontAtlas* atlas) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1257])(atlas); + #else + ((delegate* unmanaged[Cdecl])funcTable[1257])((nint)atlas); + #endif + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildInit(ImFontAtlasPtr atlas) + { + ImFontAtlasBuildInitNative(atlas); + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildInit(ref ImFontAtlas atlas) + { + fixed (ImFontAtlas* patlas = &atlas) + { + ImFontAtlasBuildInitNative((ImFontAtlas*)patlas); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImFontAtlasBuildSetupFontNative(ImFontAtlas* atlas, ImFont* font, ImFontConfig* fontConfig, float ascent, float descent) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1258])(atlas, font, fontConfig, ascent, descent); + #else + ((delegate* unmanaged[Cdecl])funcTable[1258])((nint)atlas, (nint)font, (nint)fontConfig, ascent, descent); + #endif + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildSetupFont(ImFontAtlasPtr atlas, ImFontPtr font, ImFontConfigPtr fontConfig, float ascent, float descent) + { + ImFontAtlasBuildSetupFontNative(atlas, font, fontConfig, ascent, descent); + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildSetupFont(ref ImFontAtlas atlas, ImFontPtr font, ImFontConfigPtr fontConfig, float ascent, float descent) + { + fixed (ImFontAtlas* patlas = &atlas) + { + ImFontAtlasBuildSetupFontNative((ImFontAtlas*)patlas, font, fontConfig, ascent, descent); + } + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildSetupFont(ImFontAtlasPtr atlas, ref ImFont font, ImFontConfigPtr fontConfig, float ascent, float descent) + { + fixed (ImFont* pfont = &font) + { + ImFontAtlasBuildSetupFontNative(atlas, (ImFont*)pfont, fontConfig, ascent, descent); + } + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildSetupFont(ref ImFontAtlas atlas, ref ImFont font, ImFontConfigPtr fontConfig, float ascent, float descent) + { + fixed (ImFontAtlas* patlas = &atlas) + { + fixed (ImFont* pfont = &font) + { + ImFontAtlasBuildSetupFontNative((ImFontAtlas*)patlas, (ImFont*)pfont, fontConfig, ascent, descent); + } + } + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildSetupFont(ImFontAtlasPtr atlas, ImFontPtr font, ref ImFontConfig fontConfig, float ascent, float descent) + { + fixed (ImFontConfig* pfontConfig = &fontConfig) + { + ImFontAtlasBuildSetupFontNative(atlas, font, (ImFontConfig*)pfontConfig, ascent, descent); + } + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildSetupFont(ref ImFontAtlas atlas, ImFontPtr font, ref ImFontConfig fontConfig, float ascent, float descent) + { + fixed (ImFontAtlas* patlas = &atlas) + { + fixed (ImFontConfig* pfontConfig = &fontConfig) + { + ImFontAtlasBuildSetupFontNative((ImFontAtlas*)patlas, font, (ImFontConfig*)pfontConfig, ascent, descent); + } + } + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildSetupFont(ImFontAtlasPtr atlas, ref ImFont font, ref ImFontConfig fontConfig, float ascent, float descent) + { + fixed (ImFont* pfont = &font) + { + fixed (ImFontConfig* pfontConfig = &fontConfig) + { + ImFontAtlasBuildSetupFontNative(atlas, (ImFont*)pfont, (ImFontConfig*)pfontConfig, ascent, descent); + } + } + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildSetupFont(ref ImFontAtlas atlas, ref ImFont font, ref ImFontConfig fontConfig, float ascent, float descent) + { + fixed (ImFontAtlas* patlas = &atlas) + { + fixed (ImFont* pfont = &font) + { + fixed (ImFontConfig* pfontConfig = &fontConfig) + { + ImFontAtlasBuildSetupFontNative((ImFontAtlas*)patlas, (ImFont*)pfont, (ImFontConfig*)pfontConfig, ascent, descent); + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImFontAtlasBuildFinishNative(ImFontAtlas* atlas) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1260])(atlas); + #else + ((delegate* unmanaged[Cdecl])funcTable[1260])((nint)atlas); + #endif + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildFinish(ImFontAtlasPtr atlas) + { + ImFontAtlasBuildFinishNative(atlas); + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildFinish(ref ImFontAtlas atlas) + { + fixed (ImFontAtlas* patlas = &atlas) + { + ImFontAtlasBuildFinishNative((ImFontAtlas*)patlas); + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Internals/Functions/Functions.017.cs b/imgui/Dalamud.ImGui/Internals/Functions/Functions.017.cs new file mode 100644 index 000000000..487b5048b --- /dev/null +++ b/imgui/Dalamud.ImGui/Internals/Functions/Functions.017.cs @@ -0,0 +1,433 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGuiP + { + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImFontAtlasBuildRender8bppRectFromStringNative(ImFontAtlas* atlas, int textureIndex, int x, int y, int w, int h, byte* inStr, byte inMarkerChar, byte inMarkerPixelValue) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1261])(atlas, textureIndex, x, y, w, h, inStr, inMarkerChar, inMarkerPixelValue); + #else + ((delegate* unmanaged[Cdecl])funcTable[1261])((nint)atlas, textureIndex, x, y, w, h, (nint)inStr, inMarkerChar, inMarkerPixelValue); + #endif + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildRender8bppRectFromString(ImFontAtlasPtr atlas, int textureIndex, int x, int y, int w, int h, byte* inStr, byte inMarkerChar, byte inMarkerPixelValue) + { + ImFontAtlasBuildRender8bppRectFromStringNative(atlas, textureIndex, x, y, w, h, inStr, inMarkerChar, inMarkerPixelValue); + } + + /// + /// To be documented. + /// + 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) + { + ImFontAtlasBuildRender8bppRectFromStringNative((ImFontAtlas*)patlas, textureIndex, x, y, w, h, inStr, inMarkerChar, inMarkerPixelValue); + } + } + + /// + /// To be documented. + /// + 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) + { + ImFontAtlasBuildRender8bppRectFromStringNative(atlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); + } + } + + /// + /// To be documented. + /// + 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) + { + ImFontAtlasBuildRender8bppRectFromStringNative(atlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); + } + } + + /// + /// To be documented. + /// + 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; + } + ImFontAtlasBuildRender8bppRectFromStringNative(atlas, textureIndex, x, y, w, h, pStr0, inMarkerChar, inMarkerPixelValue); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + 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) + { + ImFontAtlasBuildRender8bppRectFromStringNative((ImFontAtlas*)patlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); + } + } + } + + /// + /// To be documented. + /// + 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) + { + ImFontAtlasBuildRender8bppRectFromStringNative((ImFontAtlas*)patlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); + } + } + } + + /// + /// To be documented. + /// + 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; + } + ImFontAtlasBuildRender8bppRectFromStringNative((ImFontAtlas*)patlas, textureIndex, x, y, w, h, pStr0, inMarkerChar, inMarkerPixelValue); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImFontAtlasBuildRender32bppRectFromStringNative(ImFontAtlas* atlas, int textureIndex, int x, int y, int w, int h, byte* inStr, byte inMarkerChar, uint inMarkerPixelValue) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1262])(atlas, textureIndex, x, y, w, h, inStr, inMarkerChar, inMarkerPixelValue); + #else + ((delegate* unmanaged[Cdecl])funcTable[1262])((nint)atlas, textureIndex, x, y, w, h, (nint)inStr, inMarkerChar, inMarkerPixelValue); + #endif + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildRender32bppRectFromString(ImFontAtlasPtr atlas, int textureIndex, int x, int y, int w, int h, byte* inStr, byte inMarkerChar, uint inMarkerPixelValue) + { + ImFontAtlasBuildRender32bppRectFromStringNative(atlas, textureIndex, x, y, w, h, inStr, inMarkerChar, inMarkerPixelValue); + } + + /// + /// To be documented. + /// + 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) + { + ImFontAtlasBuildRender32bppRectFromStringNative((ImFontAtlas*)patlas, textureIndex, x, y, w, h, inStr, inMarkerChar, inMarkerPixelValue); + } + } + + /// + /// To be documented. + /// + 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) + { + ImFontAtlasBuildRender32bppRectFromStringNative(atlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); + } + } + + /// + /// To be documented. + /// + 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) + { + ImFontAtlasBuildRender32bppRectFromStringNative(atlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); + } + } + + /// + /// To be documented. + /// + 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; + } + ImFontAtlasBuildRender32bppRectFromStringNative(atlas, textureIndex, x, y, w, h, pStr0, inMarkerChar, inMarkerPixelValue); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + + /// + /// To be documented. + /// + 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) + { + ImFontAtlasBuildRender32bppRectFromStringNative((ImFontAtlas*)patlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); + } + } + } + + /// + /// To be documented. + /// + 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) + { + ImFontAtlasBuildRender32bppRectFromStringNative((ImFontAtlas*)patlas, textureIndex, x, y, w, h, (byte*)pinStr, inMarkerChar, inMarkerPixelValue); + } + } + } + + /// + /// To be documented. + /// + 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; + } + ImFontAtlasBuildRender32bppRectFromStringNative((ImFontAtlas*)patlas, textureIndex, x, y, w, h, pStr0, inMarkerChar, inMarkerPixelValue); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImFontAtlasBuildMultiplyCalcLookupTableNative(byte* outTable, float inMultiplyFactor, float gammaFactor) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1263])(outTable, inMultiplyFactor, gammaFactor); + #else + ((delegate* unmanaged[Cdecl])funcTable[1263])((nint)outTable, inMultiplyFactor, gammaFactor); + #endif + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildMultiplyCalcLookupTable(byte* outTable, float inMultiplyFactor, float gammaFactor) + { + ImFontAtlasBuildMultiplyCalcLookupTableNative(outTable, inMultiplyFactor, gammaFactor); + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildMultiplyCalcLookupTable(ref byte outTable, float inMultiplyFactor, float gammaFactor) + { + fixed (byte* poutTable = &outTable) + { + ImFontAtlasBuildMultiplyCalcLookupTableNative((byte*)poutTable, inMultiplyFactor, gammaFactor); + } + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildMultiplyCalcLookupTable(ReadOnlySpan outTable, float inMultiplyFactor, float gammaFactor) + { + fixed (byte* poutTable = outTable) + { + ImFontAtlasBuildMultiplyCalcLookupTableNative((byte*)poutTable, inMultiplyFactor, gammaFactor); + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ImFontAtlasBuildMultiplyRectAlpha8Native(byte* table, byte* pixels, int x, int y, int w, int h, int stride) + { + #if NET5_0_OR_GREATER + ((delegate* unmanaged[Cdecl])funcTable[1264])(table, pixels, x, y, w, h, stride); + #else + ((delegate* unmanaged[Cdecl])funcTable[1264])((nint)table, (nint)pixels, x, y, w, h, stride); + #endif + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildMultiplyRectAlpha8(byte* table, byte* pixels, int x, int y, int w, int h, int stride) + { + ImFontAtlasBuildMultiplyRectAlpha8Native(table, pixels, x, y, w, h, stride); + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildMultiplyRectAlpha8(ref byte table, byte* pixels, int x, int y, int w, int h, int stride) + { + fixed (byte* ptable = &table) + { + ImFontAtlasBuildMultiplyRectAlpha8Native((byte*)ptable, pixels, x, y, w, h, stride); + } + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildMultiplyRectAlpha8(ReadOnlySpan table, byte* pixels, int x, int y, int w, int h, int stride) + { + fixed (byte* ptable = table) + { + ImFontAtlasBuildMultiplyRectAlpha8Native((byte*)ptable, pixels, x, y, w, h, stride); + } + } + + /// + /// To be documented. + /// + public static void ImFontAtlasBuildMultiplyRectAlpha8(byte* table, ref byte pixels, int x, int y, int w, int h, int stride) + { + fixed (byte* ppixels = &pixels) + { + ImFontAtlasBuildMultiplyRectAlpha8Native(table, (byte*)ppixels, x, y, w, h, stride); + } + } + + /// + /// To be documented. + /// + 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) + { + ImFontAtlasBuildMultiplyRectAlpha8Native((byte*)ptable, (byte*)ppixels, x, y, w, h, stride); + } + } + } + + /// + /// To be documented. + /// + 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) + { + ImFontAtlasBuildMultiplyRectAlpha8Native((byte*)ptable, (byte*)ppixels, x, y, w, h, stride); + } + } + } + + } +} diff --git a/imgui/Dalamud.ImGui/LICENSE.txt b/imgui/Dalamud.ImGui/LICENSE.txt new file mode 100644 index 000000000..b5dae7ac2 --- /dev/null +++ b/imgui/Dalamud.ImGui/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Juna Meinhold + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/imgui/Dalamud.ImGui/Manual/Functions/Functions.000.cs b/imgui/Dalamud.ImGui/Manual/Functions/Functions.000.cs new file mode 100644 index 000000000..6a854d0dc --- /dev/null +++ b/imgui/Dalamud.ImGui/Manual/Functions/Functions.000.cs @@ -0,0 +1,5018 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGui + { + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte InputTextNative(byte* label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl], void*, byte>)funcTable[1265])(label, buf, bufSize, flags, (delegate*)Utils.GetFunctionPointerForDelegate(callback), userData); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1265])((nint)label, (nint)buf, bufSize, flags, (nint)Utils.GetFunctionPointerForDelegate(callback), (nint)userData); + #endif + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextNative(label, buf, bufSize, flags, callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte ret = InputTextNative(label, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + byte ret = InputTextNative(label, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, ulong bufSize) + { + byte ret = InputTextNative(label, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte ret = InputTextNative(label, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte ret = InputTextNative(label, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, ulong bufSize, void* userData) + { + byte ret = InputTextNative(label, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextNative(label, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, ulong bufSize, ImGuiInputTextFlags 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 = InputTextNative(pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, ulong bufSize) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, ulong bufSize, ImGuiInputTextFlags 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, ulong bufSize, ImGuiInputTextFlags 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextNative(label, buf, bufSize, flags, callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte ret = InputTextNative(label, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + byte ret = InputTextNative(label, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, nuint bufSize) + { + byte ret = InputTextNative(label, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte ret = InputTextNative(label, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte ret = InputTextNative(label, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, nuint bufSize, void* userData) + { + byte ret = InputTextNative(label, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextNative(label, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextNative((byte*)plabel, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, nuint bufSize, ImGuiInputTextFlags 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 = InputTextNative(pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextNative(pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, nuint bufSize) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative(label, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(byte* label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative(label, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextNative((byte*)plabel, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, nuint bufSize, ImGuiInputTextFlags 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextNative(pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ref byte label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(ReadOnlySpan label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextNative((byte*)plabel, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, nuint bufSize, ImGuiInputTextFlags 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputText(string label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextNative(pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte InputTextMultilineNative(byte* label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl], void*, byte>)funcTable[1266])(label, buf, bufSize, size, flags, (delegate*)Utils.GetFunctionPointerForDelegate(callback), userData); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1266])((nint)label, (nint)buf, bufSize, size, flags, (nint)Utils.GetFunctionPointerForDelegate(callback), (nint)userData); + #endif + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, flags, callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, flags, callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, Vector2 size) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, Vector2 size, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, callback, userData); + return ret != 0; + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Manual/Functions/Functions.001.cs b/imgui/Dalamud.ImGui/Manual/Functions/Functions.001.cs new file mode 100644 index 000000000..974a134cb --- /dev/null +++ b/imgui/Dalamud.ImGui/Manual/Functions/Functions.001.cs @@ -0,0 +1,5029 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGui + { + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, Vector2 size) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, Vector2 size, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, Vector2 size) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, Vector2 size, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, ImGuiInputTextFlags 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, Vector2 size, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, Vector2 size) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, Vector2 size, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, Vector2 size) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, Vector2 size, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, Vector2 size) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, Vector2 size, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, Vector2 size) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, Vector2 size, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, 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* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, ImGuiInputTextFlags 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, Vector2 size, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, Vector2 size) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, Vector2 size, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, Vector2 size) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, Vector2 size, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, 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 (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, ImGuiInputTextFlags 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, Vector2 size, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, flags, callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, flags, callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, Vector2 size) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, Vector2 size, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextMultilineNative(label, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, Vector2 size) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, Vector2 size, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, callback, userData); + return ret != 0; + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Manual/Functions/Functions.002.cs b/imgui/Dalamud.ImGui/Manual/Functions/Functions.002.cs new file mode 100644 index 000000000..1490df0e6 --- /dev/null +++ b/imgui/Dalamud.ImGui/Manual/Functions/Functions.002.cs @@ -0,0 +1,5030 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGui + { + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, Vector2 size) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, Vector2 size, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextMultilineNative((byte*)plabel, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, ImGuiInputTextFlags 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, Vector2 size, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextMultilineNative(pStr0, buf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, Vector2 size) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, Vector2 size, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(label, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, Vector2 size) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, Vector2 size, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(byte* label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative(label, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, Vector2 size) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, Vector2 size, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, Vector2 size) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, Vector2 size, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative((byte*)plabel, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, 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* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, ImGuiInputTextFlags 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, Vector2 size, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextMultilineNative(pStr0, pStr1, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, Vector2 size) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, Vector2 size, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ref byte label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, Vector2 size) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, Vector2 size, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(ReadOnlySpan label, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextMultilineNative((byte*)plabel, pStr0, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, 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 (byte* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, ImGuiInputTextFlags 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, Vector2 size, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, Vector2 size, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, size, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextMultiline(string label, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextMultilineNative(pStr0, (byte*)pbuf, bufSize, (Vector2)(new Vector2(0,0)), flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte InputTextWithHintNative(byte* label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl], void*, byte>)funcTable[1267])(label, hint, buf, bufSize, flags, (delegate*)Utils.GetFunctionPointerForDelegate(callback), userData); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1267])((nint)label, (nint)hint, (nint)buf, bufSize, flags, (nint)Utils.GetFunctionPointerForDelegate(callback), (nint)userData); + #endif + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, ulong bufSize) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, ulong bufSize, void* userData) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Manual/Functions/Functions.003.cs b/imgui/Dalamud.ImGui/Manual/Functions/Functions.003.cs new file mode 100644 index 000000000..3fd48c9b8 --- /dev/null +++ b/imgui/Dalamud.ImGui/Manual/Functions/Functions.003.cs @@ -0,0 +1,5031 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGui + { + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, ulong bufSize) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, ulong bufSize) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, flags, callback, userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, ulong bufSize) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, ulong bufSize) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, ulong bufSize) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Manual/Functions/Functions.004.cs b/imgui/Dalamud.ImGui/Manual/Functions/Functions.004.cs new file mode 100644 index 000000000..8e3d8057e --- /dev/null +++ b/imgui/Dalamud.ImGui/Manual/Functions/Functions.004.cs @@ -0,0 +1,5023 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGui + { + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, ulong bufSize) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, ulong bufSize) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, ulong bufSize) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, ulong bufSize) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, ulong bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Manual/Functions/Functions.005.cs b/imgui/Dalamud.ImGui/Manual/Functions/Functions.005.cs new file mode 100644 index 000000000..c659698a3 --- /dev/null +++ b/imgui/Dalamud.ImGui/Manual/Functions/Functions.005.cs @@ -0,0 +1,5028 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGui + { + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, ulong bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, ulong bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, nuint bufSize) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, nuint bufSize, void* userData) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextWithHintNative(label, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextWithHintNative(pStr0, hint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, nuint bufSize) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, nuint bufSize) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, flags, callback, userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, byte* buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, buf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, nuint bufSize) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Manual/Functions/Functions.006.cs b/imgui/Dalamud.ImGui/Manual/Functions/Functions.006.cs new file mode 100644 index 000000000..6db604647 --- /dev/null +++ b/imgui/Dalamud.ImGui/Manual/Functions/Functions.006.cs @@ -0,0 +1,5044 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGui + { + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, hint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, byte* hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, hint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, byte* hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, hint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, nuint bufSize) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, nuint bufSize) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(label, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, nuint bufSize) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, nuint bufSize) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative(label, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(byte* label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(label, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextWithHintNative(pStr0, pStr1, pStr2, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Manual/Functions/Functions.007.cs b/imgui/Dalamud.ImGui/Manual/Functions/Functions.007.cs new file mode 100644 index 000000000..8acf3d5b8 --- /dev/null +++ b/imgui/Dalamud.ImGui/Manual/Functions/Functions.007.cs @@ -0,0 +1,5047 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGui + { + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, flags, callback, userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImFormatStringNative(byte* buf, ulong bufSize, byte* fmt) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1268])(buf, bufSize, fmt); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[1268])((nint)buf, bufSize, (nint)fmt); + #endif + } + + /// + /// To be documented. + /// + public static int ImFormatString(byte* buf, ulong bufSize, byte* fmt) + { + int ret = ImFormatStringNative(buf, bufSize, fmt); + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref byte buf, ulong bufSize, byte* fmt) + { + fixed (byte* pbuf = &buf) + { + int ret = ImFormatStringNative((byte*)pbuf, bufSize, fmt); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref string buf, ulong bufSize, byte* fmt) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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; + } + int ret = ImFormatStringNative(pStr0, bufSize, fmt); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatString(byte* buf, nuint bufSize, byte* fmt) + { + int ret = ImFormatStringNative(buf, bufSize, fmt); + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref byte buf, nuint bufSize, byte* fmt) + { + fixed (byte* pbuf = &buf) + { + int ret = ImFormatStringNative((byte*)pbuf, bufSize, fmt); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref string buf, nuint bufSize, byte* fmt) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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; + } + int ret = ImFormatStringNative(pStr0, bufSize, fmt); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatString(byte* buf, ulong bufSize, ref byte fmt) + { + fixed (byte* pfmt = &fmt) + { + int ret = ImFormatStringNative(buf, bufSize, (byte*)pfmt); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(byte* buf, ulong bufSize, ReadOnlySpan fmt) + { + fixed (byte* pfmt = fmt) + { + int ret = ImFormatStringNative(buf, bufSize, (byte*)pfmt); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(byte* buf, ulong bufSize, string fmt) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + int ret = ImFormatStringNative(buf, bufSize, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref byte buf, ulong bufSize, ref byte fmt) + { + fixed (byte* pbuf = &buf) + { + fixed (byte* pfmt = &fmt) + { + int ret = ImFormatStringNative((byte*)pbuf, bufSize, (byte*)pfmt); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref byte buf, ulong bufSize, ReadOnlySpan fmt) + { + fixed (byte* pbuf = &buf) + { + fixed (byte* pfmt = fmt) + { + int ret = ImFormatStringNative((byte*)pbuf, bufSize, (byte*)pfmt); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref string buf, ulong bufSize, string fmt) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 (fmt != null) + { + pStrSize1 = Utils.GetByteCountUTF8(fmt); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(fmt, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + int ret = ImFormatStringNative(pStr0, bufSize, pStr1); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref byte buf, ulong bufSize, string fmt) + { + fixed (byte* pbuf = &buf) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + int ret = ImFormatStringNative((byte*)pbuf, bufSize, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref string buf, ulong bufSize, ref byte fmt) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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* pfmt = &fmt) + { + int ret = ImFormatStringNative(pStr0, bufSize, (byte*)pfmt); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref string buf, ulong bufSize, ReadOnlySpan fmt) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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* pfmt = fmt) + { + int ret = ImFormatStringNative(pStr0, bufSize, (byte*)pfmt); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(byte* buf, nuint bufSize, ref byte fmt) + { + fixed (byte* pfmt = &fmt) + { + int ret = ImFormatStringNative(buf, bufSize, (byte*)pfmt); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(byte* buf, nuint bufSize, ReadOnlySpan fmt) + { + fixed (byte* pfmt = fmt) + { + int ret = ImFormatStringNative(buf, bufSize, (byte*)pfmt); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(byte* buf, nuint bufSize, string fmt) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + int ret = ImFormatStringNative(buf, bufSize, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref byte buf, nuint bufSize, ref byte fmt) + { + fixed (byte* pbuf = &buf) + { + fixed (byte* pfmt = &fmt) + { + int ret = ImFormatStringNative((byte*)pbuf, bufSize, (byte*)pfmt); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref byte buf, nuint bufSize, ReadOnlySpan fmt) + { + fixed (byte* pbuf = &buf) + { + fixed (byte* pfmt = fmt) + { + int ret = ImFormatStringNative((byte*)pbuf, bufSize, (byte*)pfmt); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref string buf, nuint bufSize, string fmt) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 (fmt != null) + { + pStrSize1 = Utils.GetByteCountUTF8(fmt); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(fmt, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + int ret = ImFormatStringNative(pStr0, bufSize, pStr1); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref byte buf, nuint bufSize, string fmt) + { + fixed (byte* pbuf = &buf) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + int ret = ImFormatStringNative((byte*)pbuf, bufSize, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref string buf, nuint bufSize, ref byte fmt) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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* pfmt = &fmt) + { + int ret = ImFormatStringNative(pStr0, bufSize, (byte*)pfmt); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatString(ref string buf, nuint bufSize, ReadOnlySpan fmt) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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* pfmt = fmt) + { + int ret = ImFormatStringNative(pStr0, bufSize, (byte*)pfmt); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImFormatStringVNative(byte* buf, ulong bufSize, byte* fmt, nuint args) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1269])(buf, bufSize, fmt, args); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[1269])((nint)buf, bufSize, (nint)fmt, args); + #endif + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(byte* buf, ulong bufSize, byte* fmt, nuint args) + { + int ret = ImFormatStringVNative(buf, bufSize, fmt, args); + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref byte buf, ulong bufSize, byte* fmt, nuint args) + { + fixed (byte* pbuf = &buf) + { + int ret = ImFormatStringVNative((byte*)pbuf, bufSize, fmt, args); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref string buf, ulong bufSize, byte* fmt, nuint args) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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; + } + int ret = ImFormatStringVNative(pStr0, bufSize, fmt, args); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(byte* buf, nuint bufSize, byte* fmt, nuint args) + { + int ret = ImFormatStringVNative(buf, bufSize, fmt, args); + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref byte buf, nuint bufSize, byte* fmt, nuint args) + { + fixed (byte* pbuf = &buf) + { + int ret = ImFormatStringVNative((byte*)pbuf, bufSize, fmt, args); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref string buf, nuint bufSize, byte* fmt, nuint args) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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; + } + int ret = ImFormatStringVNative(pStr0, bufSize, fmt, args); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(byte* buf, ulong bufSize, ref byte fmt, nuint args) + { + fixed (byte* pfmt = &fmt) + { + int ret = ImFormatStringVNative(buf, bufSize, (byte*)pfmt, args); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(byte* buf, ulong bufSize, ReadOnlySpan fmt, nuint args) + { + fixed (byte* pfmt = fmt) + { + int ret = ImFormatStringVNative(buf, bufSize, (byte*)pfmt, args); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(byte* buf, ulong bufSize, string fmt, nuint args) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + int ret = ImFormatStringVNative(buf, bufSize, pStr0, args); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref byte buf, ulong bufSize, ref byte fmt, nuint args) + { + fixed (byte* pbuf = &buf) + { + fixed (byte* pfmt = &fmt) + { + int ret = ImFormatStringVNative((byte*)pbuf, bufSize, (byte*)pfmt, args); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref byte buf, ulong bufSize, ReadOnlySpan fmt, nuint args) + { + fixed (byte* pbuf = &buf) + { + fixed (byte* pfmt = fmt) + { + int ret = ImFormatStringVNative((byte*)pbuf, bufSize, (byte*)pfmt, args); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref string buf, ulong bufSize, string fmt, nuint args) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 (fmt != null) + { + pStrSize1 = Utils.GetByteCountUTF8(fmt); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(fmt, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + int ret = ImFormatStringVNative(pStr0, bufSize, pStr1, args); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref byte buf, ulong bufSize, string fmt, nuint args) + { + fixed (byte* pbuf = &buf) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + int ret = ImFormatStringVNative((byte*)pbuf, bufSize, pStr0, args); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref string buf, ulong bufSize, ref byte fmt, nuint args) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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* pfmt = &fmt) + { + int ret = ImFormatStringVNative(pStr0, bufSize, (byte*)pfmt, args); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref string buf, ulong bufSize, ReadOnlySpan fmt, nuint args) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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* pfmt = fmt) + { + int ret = ImFormatStringVNative(pStr0, bufSize, (byte*)pfmt, args); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(byte* buf, nuint bufSize, ref byte fmt, nuint args) + { + fixed (byte* pfmt = &fmt) + { + int ret = ImFormatStringVNative(buf, bufSize, (byte*)pfmt, args); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(byte* buf, nuint bufSize, ReadOnlySpan fmt, nuint args) + { + fixed (byte* pfmt = fmt) + { + int ret = ImFormatStringVNative(buf, bufSize, (byte*)pfmt, args); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(byte* buf, nuint bufSize, string fmt, nuint args) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + int ret = ImFormatStringVNative(buf, bufSize, pStr0, args); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref byte buf, nuint bufSize, ref byte fmt, nuint args) + { + fixed (byte* pbuf = &buf) + { + fixed (byte* pfmt = &fmt) + { + int ret = ImFormatStringVNative((byte*)pbuf, bufSize, (byte*)pfmt, args); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref byte buf, nuint bufSize, ReadOnlySpan fmt, nuint args) + { + fixed (byte* pbuf = &buf) + { + fixed (byte* pfmt = fmt) + { + int ret = ImFormatStringVNative((byte*)pbuf, bufSize, (byte*)pfmt, args); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref string buf, nuint bufSize, string fmt, nuint args) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 (fmt != null) + { + pStrSize1 = Utils.GetByteCountUTF8(fmt); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(fmt, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + int ret = ImFormatStringVNative(pStr0, bufSize, pStr1, args); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref byte buf, nuint bufSize, string fmt, nuint args) + { + fixed (byte* pbuf = &buf) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (fmt != null) + { + pStrSize0 = Utils.GetByteCountUTF8(fmt); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + int ret = ImFormatStringVNative((byte*)pbuf, bufSize, pStr0, args); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref string buf, nuint bufSize, ref byte fmt, nuint args) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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* pfmt = &fmt) + { + int ret = ImFormatStringVNative(pStr0, bufSize, (byte*)pfmt, args); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Manual/Functions/Functions.008.cs b/imgui/Dalamud.ImGui/Manual/Functions/Functions.008.cs new file mode 100644 index 000000000..6f8ae2aed --- /dev/null +++ b/imgui/Dalamud.ImGui/Manual/Functions/Functions.008.cs @@ -0,0 +1,5031 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGui + { + + /// + /// To be documented. + /// + public static int ImFormatStringV(ref string buf, nuint bufSize, ReadOnlySpan fmt, nuint args) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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* pfmt = fmt) + { + int ret = ImFormatStringVNative(pStr0, bufSize, (byte*)pfmt, args); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte* ImParseFormatTrimDecorationsNative(byte* format, byte* buf, ulong bufSize) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1270])(format, buf, bufSize); + #else + return (byte*)((delegate* unmanaged[Cdecl])funcTable[1270])((nint)format, (nint)buf, bufSize); + #endif + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(byte* format, byte* buf, ulong bufSize) + { + byte* ret = ImParseFormatTrimDecorationsNative(format, buf, bufSize); + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(byte* format, byte* buf, ulong bufSize) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative(format, buf, bufSize)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(ref byte format, byte* buf, ulong bufSize) + { + fixed (byte* pformat = &format) + { + byte* ret = ImParseFormatTrimDecorationsNative((byte*)pformat, buf, bufSize); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(ref byte format, byte* buf, ulong bufSize) + { + fixed (byte* pformat = &format) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative((byte*)pformat, buf, bufSize)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(ReadOnlySpan format, byte* buf, ulong bufSize) + { + fixed (byte* pformat = format) + { + byte* ret = ImParseFormatTrimDecorationsNative((byte*)pformat, buf, bufSize); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(ReadOnlySpan format, byte* buf, ulong bufSize) + { + fixed (byte* pformat = format) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative((byte*)pformat, buf, bufSize)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(string format, byte* buf, ulong bufSize) + { + 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 = ImParseFormatTrimDecorationsNative(pStr0, buf, bufSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(string format, byte* buf, ulong bufSize) + { + 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(ImParseFormatTrimDecorationsNative(pStr0, buf, bufSize)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(byte* format, ref byte buf, ulong bufSize) + { + fixed (byte* pbuf = &buf) + { + byte* ret = ImParseFormatTrimDecorationsNative(format, (byte*)pbuf, bufSize); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(byte* format, ref byte buf, ulong bufSize) + { + fixed (byte* pbuf = &buf) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative(format, (byte*)pbuf, bufSize)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(byte* format, ref string buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = ImParseFormatTrimDecorationsNative(format, pStr0, bufSize); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(byte* format, ref string buf, ulong bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative(format, pStr0, bufSize)); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(ref byte format, ref byte buf, ulong bufSize) + { + fixed (byte* pformat = &format) + { + fixed (byte* pbuf = &buf) + { + byte* ret = ImParseFormatTrimDecorationsNative((byte*)pformat, (byte*)pbuf, bufSize); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(ref byte format, ref byte buf, ulong bufSize) + { + fixed (byte* pformat = &format) + { + fixed (byte* pbuf = &buf) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative((byte*)pformat, (byte*)pbuf, bufSize)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(ReadOnlySpan format, ref byte buf, ulong bufSize) + { + fixed (byte* pformat = format) + { + fixed (byte* pbuf = &buf) + { + byte* ret = ImParseFormatTrimDecorationsNative((byte*)pformat, (byte*)pbuf, bufSize); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(ReadOnlySpan format, ref byte buf, ulong bufSize) + { + fixed (byte* pformat = format) + { + fixed (byte* pbuf = &buf) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative((byte*)pformat, (byte*)pbuf, bufSize)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(string format, ref string buf, ulong bufSize) + { + 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* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* ret = ImParseFormatTrimDecorationsNative(pStr0, pStr1, bufSize); + buf = Utils.DecodeStringUTF8(pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(string format, ref string buf, ulong bufSize) + { + 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* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative(pStr0, pStr1, bufSize)); + buf = Utils.DecodeStringUTF8(pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(ref byte format, ref string buf, ulong bufSize) + { + fixed (byte* pformat = &format) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = ImParseFormatTrimDecorationsNative((byte*)pformat, pStr0, bufSize); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(ref byte format, ref string buf, ulong bufSize) + { + fixed (byte* pformat = &format) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative((byte*)pformat, pStr0, bufSize)); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(ReadOnlySpan format, ref string buf, ulong bufSize) + { + fixed (byte* pformat = format) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = ImParseFormatTrimDecorationsNative((byte*)pformat, pStr0, bufSize); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(ReadOnlySpan format, ref string buf, ulong bufSize) + { + fixed (byte* pformat = format) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative((byte*)pformat, pStr0, bufSize)); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(string format, ref byte buf, ulong bufSize) + { + 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; + } + fixed (byte* pbuf = &buf) + { + byte* ret = ImParseFormatTrimDecorationsNative(pStr0, (byte*)pbuf, bufSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(string format, ref byte buf, ulong bufSize) + { + 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; + } + fixed (byte* pbuf = &buf) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative(pStr0, (byte*)pbuf, bufSize)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(byte* format, byte* buf, nuint bufSize) + { + byte* ret = ImParseFormatTrimDecorationsNative(format, buf, bufSize); + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(byte* format, byte* buf, nuint bufSize) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative(format, buf, bufSize)); + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(ref byte format, byte* buf, nuint bufSize) + { + fixed (byte* pformat = &format) + { + byte* ret = ImParseFormatTrimDecorationsNative((byte*)pformat, buf, bufSize); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(ref byte format, byte* buf, nuint bufSize) + { + fixed (byte* pformat = &format) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative((byte*)pformat, buf, bufSize)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(ReadOnlySpan format, byte* buf, nuint bufSize) + { + fixed (byte* pformat = format) + { + byte* ret = ImParseFormatTrimDecorationsNative((byte*)pformat, buf, bufSize); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(ReadOnlySpan format, byte* buf, nuint bufSize) + { + fixed (byte* pformat = format) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative((byte*)pformat, buf, bufSize)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(string format, byte* buf, nuint bufSize) + { + 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 = ImParseFormatTrimDecorationsNative(pStr0, buf, bufSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(string format, byte* buf, nuint bufSize) + { + 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(ImParseFormatTrimDecorationsNative(pStr0, buf, bufSize)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(byte* format, ref byte buf, nuint bufSize) + { + fixed (byte* pbuf = &buf) + { + byte* ret = ImParseFormatTrimDecorationsNative(format, (byte*)pbuf, bufSize); + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(byte* format, ref byte buf, nuint bufSize) + { + fixed (byte* pbuf = &buf) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative(format, (byte*)pbuf, bufSize)); + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(byte* format, ref string buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = ImParseFormatTrimDecorationsNative(format, pStr0, bufSize); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(byte* format, ref string buf, nuint bufSize) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative(format, pStr0, bufSize)); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(ref byte format, ref byte buf, nuint bufSize) + { + fixed (byte* pformat = &format) + { + fixed (byte* pbuf = &buf) + { + byte* ret = ImParseFormatTrimDecorationsNative((byte*)pformat, (byte*)pbuf, bufSize); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(ref byte format, ref byte buf, nuint bufSize) + { + fixed (byte* pformat = &format) + { + fixed (byte* pbuf = &buf) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative((byte*)pformat, (byte*)pbuf, bufSize)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(ReadOnlySpan format, ref byte buf, nuint bufSize) + { + fixed (byte* pformat = format) + { + fixed (byte* pbuf = &buf) + { + byte* ret = ImParseFormatTrimDecorationsNative((byte*)pformat, (byte*)pbuf, bufSize); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(ReadOnlySpan format, ref byte buf, nuint bufSize) + { + fixed (byte* pformat = format) + { + fixed (byte* pbuf = &buf) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative((byte*)pformat, (byte*)pbuf, bufSize)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(string format, ref string buf, nuint bufSize) + { + 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* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* ret = ImParseFormatTrimDecorationsNative(pStr0, pStr1, bufSize); + buf = Utils.DecodeStringUTF8(pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(string format, ref string buf, nuint bufSize) + { + 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* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative(pStr0, pStr1, bufSize)); + buf = Utils.DecodeStringUTF8(pStr1); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(ref byte format, ref string buf, nuint bufSize) + { + fixed (byte* pformat = &format) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = ImParseFormatTrimDecorationsNative((byte*)pformat, pStr0, bufSize); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(ref byte format, ref string buf, nuint bufSize) + { + fixed (byte* pformat = &format) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative((byte*)pformat, pStr0, bufSize)); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(ReadOnlySpan format, ref string buf, nuint bufSize) + { + fixed (byte* pformat = format) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = ImParseFormatTrimDecorationsNative((byte*)pformat, pStr0, bufSize); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(ReadOnlySpan format, ref string buf, nuint bufSize) + { + fixed (byte* pformat = format) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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; + } + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative((byte*)pformat, pStr0, bufSize)); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static byte* ImParseFormatTrimDecorations(string format, ref byte buf, nuint bufSize) + { + 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; + } + fixed (byte* pbuf = &buf) + { + byte* ret = ImParseFormatTrimDecorationsNative(pStr0, (byte*)pbuf, bufSize); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static string ImParseFormatTrimDecorationsS(string format, ref byte buf, nuint bufSize) + { + 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; + } + fixed (byte* pbuf = &buf) + { + string ret = Utils.DecodeStringUTF8(ImParseFormatTrimDecorationsNative(pStr0, (byte*)pbuf, bufSize)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImTextStrToUtf8Native(byte* outBuf, int outBufSize, ushort* inText, ushort* inTextEnd) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1271])(outBuf, outBufSize, inText, inTextEnd); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[1271])((nint)outBuf, outBufSize, (nint)inText, (nint)inTextEnd); + #endif + } + + /// + /// To be documented. + /// + public static int ImTextStrToUtf8(byte* outBuf, int outBufSize, ushort* inText, ushort* inTextEnd) + { + int ret = ImTextStrToUtf8Native(outBuf, outBufSize, inText, inTextEnd); + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextStrToUtf8(ref byte outBuf, int outBufSize, ushort* inText, ushort* inTextEnd) + { + fixed (byte* poutBuf = &outBuf) + { + int ret = ImTextStrToUtf8Native((byte*)poutBuf, outBufSize, inText, inTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrToUtf8(ref string outBuf, int outBufSize, ushort* inText, ushort* inTextEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (outBuf != null) + { + pStrSize0 = Utils.GetByteCountUTF8(outBuf); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(outBuf, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + int ret = ImTextStrToUtf8Native(pStr0, outBufSize, inText, inTextEnd); + outBuf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextStrToUtf8(byte* outBuf, int outBufSize, ref ushort inText, ushort* inTextEnd) + { + fixed (ushort* pinText = &inText) + { + int ret = ImTextStrToUtf8Native(outBuf, outBufSize, (ushort*)pinText, inTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrToUtf8(ref byte outBuf, int outBufSize, ref ushort inText, ushort* inTextEnd) + { + fixed (byte* poutBuf = &outBuf) + { + fixed (ushort* pinText = &inText) + { + int ret = ImTextStrToUtf8Native((byte*)poutBuf, outBufSize, (ushort*)pinText, inTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrToUtf8(ref string outBuf, int outBufSize, ref ushort inText, ushort* inTextEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (outBuf != null) + { + pStrSize0 = Utils.GetByteCountUTF8(outBuf); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(outBuf, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ushort* pinText = &inText) + { + int ret = ImTextStrToUtf8Native(pStr0, outBufSize, (ushort*)pinText, inTextEnd); + outBuf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrToUtf8(byte* outBuf, int outBufSize, ushort* inText, ref ushort inTextEnd) + { + fixed (ushort* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrToUtf8Native(outBuf, outBufSize, inText, (ushort*)pinTextEnd); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrToUtf8(ref byte outBuf, int outBufSize, ushort* inText, ref ushort inTextEnd) + { + fixed (byte* poutBuf = &outBuf) + { + fixed (ushort* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrToUtf8Native((byte*)poutBuf, outBufSize, inText, (ushort*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrToUtf8(ref string outBuf, int outBufSize, ushort* inText, ref ushort inTextEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (outBuf != null) + { + pStrSize0 = Utils.GetByteCountUTF8(outBuf); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(outBuf, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ushort* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrToUtf8Native(pStr0, outBufSize, inText, (ushort*)pinTextEnd); + outBuf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrToUtf8(byte* outBuf, int outBufSize, ref ushort inText, ref ushort inTextEnd) + { + fixed (ushort* pinText = &inText) + { + fixed (ushort* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrToUtf8Native(outBuf, outBufSize, (ushort*)pinText, (ushort*)pinTextEnd); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrToUtf8(ref byte outBuf, int outBufSize, ref ushort inText, ref ushort inTextEnd) + { + fixed (byte* poutBuf = &outBuf) + { + fixed (ushort* pinText = &inText) + { + fixed (ushort* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrToUtf8Native((byte*)poutBuf, outBufSize, (ushort*)pinText, (ushort*)pinTextEnd); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrToUtf8(ref string outBuf, int outBufSize, ref ushort inText, ref ushort inTextEnd) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (outBuf != null) + { + pStrSize0 = Utils.GetByteCountUTF8(outBuf); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(outBuf, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (ushort* pinText = &inText) + { + fixed (ushort* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrToUtf8Native(pStr0, outBufSize, (ushort*)pinText, (ushort*)pinTextEnd); + outBuf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int ImTextStrFromUtf8Native(ushort* outBuf, int outBufSize, byte* inText, byte* inTextEnd, byte** inRemaining) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1272])(outBuf, outBufSize, inText, inTextEnd, inRemaining); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[1272])((nint)outBuf, outBufSize, (nint)inText, (nint)inTextEnd, (nint)inRemaining); + #endif + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, byte* inText, byte* inTextEnd, byte** inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, inText, inTextEnd, inRemaining); + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, byte* inText, byte* inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, inText, inTextEnd, (byte**)(default)); + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, byte* inText, byte* inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, inText, inTextEnd, inRemaining); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, byte* inText, byte* inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, inText, inTextEnd, (byte**)(default)); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ref byte inText, byte* inTextEnd, byte** inRemaining) + { + fixed (byte* pinText = &inText) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, inTextEnd, inRemaining); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ref byte inText, byte* inTextEnd) + { + fixed (byte* pinText = &inText) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, inTextEnd, (byte**)(default)); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ReadOnlySpan inText, byte* inTextEnd, byte** inRemaining) + { + fixed (byte* pinText = inText) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, inTextEnd, inRemaining); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ReadOnlySpan inText, byte* inTextEnd) + { + fixed (byte* pinText = inText) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, inTextEnd, (byte**)(default)); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, string inText, byte* inTextEnd, byte** inRemaining) + { + 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, pStr0, inTextEnd, inRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, pStr0, inTextEnd, (byte**)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ref byte inText, byte* inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = &inText) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, inTextEnd, inRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ref byte inText, byte* inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = &inText) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, inTextEnd, (byte**)(default)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ReadOnlySpan inText, byte* inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = inText) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, inTextEnd, inRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ReadOnlySpan inText, byte* inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = inText) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, inTextEnd, (byte**)(default)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, string inText, byte* inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, pStr0, inTextEnd, inRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, string inText, byte* inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, pStr0, inTextEnd, (byte**)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, byte* inText, ref byte inTextEnd, byte** inRemaining) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, inText, (byte*)pinTextEnd, inRemaining); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, byte* inText, ref byte inTextEnd) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, inText, (byte*)pinTextEnd, (byte**)(default)); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, byte* inText, ReadOnlySpan inTextEnd, byte** inRemaining) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, inText, (byte*)pinTextEnd, inRemaining); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, byte* inText, ReadOnlySpan inTextEnd) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, inText, (byte*)pinTextEnd, (byte**)(default)); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, byte* inText, string inTextEnd, byte** inRemaining) + { + 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, inText, pStr0, inRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, inText, pStr0, (byte**)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, byte* inText, ref byte inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, inText, (byte*)pinTextEnd, inRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, byte* inText, ref byte inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, inText, (byte*)pinTextEnd, (byte**)(default)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, byte* inText, ReadOnlySpan inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, inText, (byte*)pinTextEnd, inRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, byte* inText, ReadOnlySpan inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, inText, (byte*)pinTextEnd, (byte**)(default)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, byte* inText, string inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, inText, pStr0, inRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, byte* inText, string inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, inText, pStr0, (byte**)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ref byte inText, ref byte inTextEnd, byte** inRemaining) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, inRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ref byte inText, ref byte inTextEnd) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)(default)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ReadOnlySpan inText, ReadOnlySpan inTextEnd, byte** inRemaining) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, inRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ReadOnlySpan inText, ReadOnlySpan inTextEnd) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)(default)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, string inText, string inTextEnd, byte** inRemaining) + { + 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, pStr0, pStr1, inRemaining); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, pStr0, pStr1, (byte**)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ref byte inText, ReadOnlySpan inTextEnd, byte** inRemaining) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, inRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ref byte inText, ReadOnlySpan inTextEnd) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)(default)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ref byte inText, string inTextEnd, byte** inRemaining) + { + 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, pStr0, inRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, pStr0, (byte**)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ReadOnlySpan inText, ref byte inTextEnd, byte** inRemaining) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, inRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ReadOnlySpan inText, ref byte inTextEnd) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)(default)); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ReadOnlySpan inText, string inTextEnd, byte** inRemaining) + { + 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, pStr0, inRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, pStr0, (byte**)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, string inText, ref byte inTextEnd, byte** inRemaining) + { + 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, pStr0, (byte*)pinTextEnd, inRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, pStr0, (byte*)pinTextEnd, (byte**)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, string inText, ReadOnlySpan inTextEnd, byte** inRemaining) + { + 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, pStr0, (byte*)pinTextEnd, inRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, 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 = ImTextStrFromUtf8Native(outBuf, outBufSize, pStr0, (byte*)pinTextEnd, (byte**)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ref byte inText, ref byte inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, inRemaining); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ref byte inText, ref byte inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)(default)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ReadOnlySpan inText, ReadOnlySpan inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, inRemaining); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ReadOnlySpan inText, ReadOnlySpan inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)(default)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, string inText, string inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, pStr0, pStr1, inRemaining); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, string inText, string inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, pStr0, pStr1, (byte**)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ref byte inText, ReadOnlySpan inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, inRemaining); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ref byte inText, ReadOnlySpan inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)(default)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ref byte inText, string inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, pStr0, inRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ref byte inText, string inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, pStr0, (byte**)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ReadOnlySpan inText, ref byte inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, inRemaining); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ReadOnlySpan inText, ref byte inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)(default)); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ReadOnlySpan inText, string inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, pStr0, inRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ReadOnlySpan inText, string inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, pStr0, (byte**)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, string inText, ref byte inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, pStr0, (byte*)pinTextEnd, inRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, string inText, ref byte inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, pStr0, (byte*)pinTextEnd, (byte**)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, string inText, ReadOnlySpan inTextEnd, byte** inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, pStr0, (byte*)pinTextEnd, inRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, string inText, ReadOnlySpan inTextEnd) + { + fixed (ushort* poutBuf = &outBuf) + { + 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 = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, pStr0, (byte*)pinTextEnd, (byte**)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, byte* inText, byte* inTextEnd, ref byte* inRemaining) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, inText, inTextEnd, (byte**)pinRemaining); + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, byte* inText, byte* inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, inText, inTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ref byte inText, byte* inTextEnd, ref byte* inRemaining) + { + fixed (byte* pinText = &inText) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, inTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ReadOnlySpan inText, byte* inTextEnd, ref byte* inRemaining) + { + fixed (byte* pinText = inText) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, inTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, string inText, byte* inTextEnd, ref byte* inRemaining) + { + 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** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, pStr0, inTextEnd, (byte**)pinRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ref byte inText, byte* inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = &inText) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, inTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ReadOnlySpan inText, byte* inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = inText) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, inTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, string inText, byte* inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, pStr0, inTextEnd, (byte**)pinRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, byte* inText, ref byte inTextEnd, ref byte* inRemaining) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, inText, (byte*)pinTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, byte* inText, ReadOnlySpan inTextEnd, ref byte* inRemaining) + { + fixed (byte* pinTextEnd = inTextEnd) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, inText, (byte*)pinTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, byte* inText, string inTextEnd, ref byte* inRemaining) + { + 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; + } + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, inText, pStr0, (byte**)pinRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, byte* inText, ref byte inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, inText, (byte*)pinTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, byte* inText, ReadOnlySpan inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinTextEnd = inTextEnd) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, inText, (byte*)pinTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, byte* inText, string inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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; + } + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, inText, pStr0, (byte**)pinRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ref byte inText, ref byte inTextEnd, ref byte* inRemaining) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ReadOnlySpan inText, ReadOnlySpan inTextEnd, ref byte* inRemaining) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, string inText, string inTextEnd, ref byte* inRemaining) + { + 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; + } + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, pStr0, pStr1, (byte**)pinRemaining); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ref byte inText, ReadOnlySpan inTextEnd, ref byte* inRemaining) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ref byte inText, string inTextEnd, ref byte* inRemaining) + { + 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; + } + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, pStr0, (byte**)pinRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ReadOnlySpan inText, ref byte inTextEnd, ref byte* inRemaining) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, ReadOnlySpan inText, string inTextEnd, ref byte* inRemaining) + { + 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; + } + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, (byte*)pinText, pStr0, (byte**)pinRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, string inText, ref byte inTextEnd, ref byte* inRemaining) + { + 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) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, pStr0, (byte*)pinTextEnd, (byte**)pinRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ushort* outBuf, int outBufSize, string inText, ReadOnlySpan inTextEnd, ref byte* inRemaining) + { + 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) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native(outBuf, outBufSize, pStr0, (byte*)pinTextEnd, (byte**)pinRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ref byte inText, ref byte inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ReadOnlySpan inText, ReadOnlySpan inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, string inText, string inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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; + } + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, pStr0, pStr1, (byte**)pinRemaining); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ref byte inText, ReadOnlySpan inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = &inText) + { + fixed (byte* pinTextEnd = inTextEnd) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ref byte inText, string inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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; + } + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, pStr0, (byte**)pinRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ReadOnlySpan inText, ref byte inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + fixed (byte* pinText = inText) + { + fixed (byte* pinTextEnd = &inTextEnd) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, (byte*)pinTextEnd, (byte**)pinRemaining); + return ret; + } + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, ReadOnlySpan inText, string inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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; + } + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, (byte*)pinText, pStr0, (byte**)pinRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, string inText, ref byte inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, pStr0, (byte*)pinTextEnd, (byte**)pinRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + public static int ImTextStrFromUtf8(ref ushort outBuf, int outBufSize, string inText, ReadOnlySpan inTextEnd, ref byte* inRemaining) + { + fixed (ushort* poutBuf = &outBuf) + { + 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) + { + fixed (byte** pinRemaining = &inRemaining) + { + int ret = ImTextStrFromUtf8Native((ushort*)poutBuf, outBufSize, pStr0, (byte*)pinTextEnd, (byte**)pinRemaining); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int DataTypeFormatStringNative(byte* buf, int bufSize, ImGuiDataType dataType, void* pData, byte* format) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1273])(buf, bufSize, dataType, pData, format); + #else + return (int)((delegate* unmanaged[Cdecl])funcTable[1273])((nint)buf, bufSize, dataType, (nint)pData, (nint)format); + #endif + } + + /// + /// To be documented. + /// + public static int DataTypeFormatString(byte* buf, int bufSize, ImGuiDataType dataType, void* pData, byte* format) + { + int ret = DataTypeFormatStringNative(buf, bufSize, dataType, pData, format); + return ret; + } + + /// + /// To be documented. + /// + public static int DataTypeFormatString(ref byte buf, int bufSize, ImGuiDataType dataType, void* pData, byte* format) + { + fixed (byte* pbuf = &buf) + { + int ret = DataTypeFormatStringNative((byte*)pbuf, bufSize, dataType, pData, format); + return ret; + } + } + + /// + /// To be documented. + /// + public static int DataTypeFormatString(ref string buf, int bufSize, ImGuiDataType dataType, void* pData, byte* format) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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; + } + int ret = DataTypeFormatStringNative(pStr0, bufSize, dataType, pData, format); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int DataTypeFormatString(byte* buf, int bufSize, ImGuiDataType dataType, void* pData, ref byte format) + { + fixed (byte* pformat = &format) + { + int ret = DataTypeFormatStringNative(buf, bufSize, dataType, pData, (byte*)pformat); + return ret; + } + } + + /// + /// To be documented. + /// + public static int DataTypeFormatString(byte* buf, int bufSize, ImGuiDataType dataType, void* pData, ReadOnlySpan format) + { + fixed (byte* pformat = format) + { + int ret = DataTypeFormatStringNative(buf, bufSize, dataType, pData, (byte*)pformat); + return ret; + } + } + + /// + /// To be documented. + /// + public static int DataTypeFormatString(byte* buf, int bufSize, 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; + } + int ret = DataTypeFormatStringNative(buf, bufSize, dataType, pData, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int DataTypeFormatString(ref byte buf, int bufSize, ImGuiDataType dataType, void* pData, ref byte format) + { + fixed (byte* pbuf = &buf) + { + fixed (byte* pformat = &format) + { + int ret = DataTypeFormatStringNative((byte*)pbuf, bufSize, dataType, pData, (byte*)pformat); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int DataTypeFormatString(ref byte buf, int bufSize, ImGuiDataType dataType, void* pData, ReadOnlySpan format) + { + fixed (byte* pbuf = &buf) + { + fixed (byte* pformat = format) + { + int ret = DataTypeFormatStringNative((byte*)pbuf, bufSize, dataType, pData, (byte*)pformat); + return ret; + } + } + } + + /// + /// To be documented. + /// + public static int DataTypeFormatString(ref string buf, int bufSize, ImGuiDataType dataType, void* pData, string format) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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; + } + int ret = DataTypeFormatStringNative(pStr0, bufSize, dataType, pData, pStr1); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + + /// + /// To be documented. + /// + public static int DataTypeFormatString(ref byte buf, int bufSize, 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; + } + int ret = DataTypeFormatStringNative((byte*)pbuf, bufSize, dataType, pData, pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int DataTypeFormatString(ref string buf, int bufSize, ImGuiDataType dataType, void* pData, ref byte format) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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) + { + int ret = DataTypeFormatStringNative(pStr0, bufSize, dataType, pData, (byte*)pformat); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + public static int DataTypeFormatString(ref string buf, int bufSize, ImGuiDataType dataType, void* pData, ReadOnlySpan format) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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) + { + int ret = DataTypeFormatStringNative(pStr0, bufSize, dataType, pData, (byte*)pformat); + buf = Utils.DecodeStringUTF8(pStr0); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte InputTextExNative(byte* label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl], void*, byte>)funcTable[1274])(label, hint, buf, bufSize, sizeArg, flags, (delegate*)Utils.GetFunctionPointerForDelegate(callback), userData); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1274])((nint)label, (nint)hint, (nint)buf, bufSize, sizeArg, flags, (nint)Utils.GetFunctionPointerForDelegate(callback), (nint)userData); + #endif + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte ret = InputTextExNative(label, hint, buf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte ret = InputTextExNative(label, hint, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + byte ret = InputTextExNative(label, hint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte ret = InputTextExNative(label, hint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextExNative((byte*)plabel, hint, buf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextExNative((byte*)plabel, hint, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextExNative((byte*)plabel, hint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte ret = InputTextExNative((byte*)plabel, hint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextExNative((byte*)plabel, hint, buf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte ret = InputTextExNative((byte*)plabel, hint, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte ret = InputTextExNative((byte*)plabel, hint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte ret = InputTextExNative((byte*)plabel, hint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextExNative(pStr0, hint, buf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextExNative(pStr0, hint, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags 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 = InputTextExNative(pStr0, hint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, byte* hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 = InputTextExNative(pStr0, hint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextExNative(label, (byte*)phint, buf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextExNative(label, (byte*)phint, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextExNative(label, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextExNative(label, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + byte ret = InputTextExNative(label, (byte*)phint, buf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + byte ret = InputTextExNative(label, (byte*)phint, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* phint = hint) + { + byte ret = InputTextExNative(label, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = hint) + { + byte ret = InputTextExNative(label, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextExNative(label, pStr0, buf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextExNative(label, pStr0, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextExNative(label, pStr0, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextExNative(label, pStr0, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, pStr1, buf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, pStr1, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, pStr1, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, pStr1, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Manual/Functions/Functions.009.cs b/imgui/Dalamud.ImGui/Manual/Functions/Functions.009.cs new file mode 100644 index 000000000..524cb7245 --- /dev/null +++ b/imgui/Dalamud.ImGui/Manual/Functions/Functions.009.cs @@ -0,0 +1,5037 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGui + { + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, buf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, buf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, string hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, buf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags 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* phint = &hint) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ref byte hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, buf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, buf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags 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* phint = hint) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ReadOnlySpan hint, byte* buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, buf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, hint, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, hint, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, hint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, hint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative(label, hint, pStr0, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative(label, hint, pStr0, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative(label, hint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative(label, hint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, hint, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, hint, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, hint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, hint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, hint, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, hint, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, hint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, hint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, hint, pStr1, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, hint, pStr1, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, hint, pStr1, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, hint, pStr1, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, hint, pStr0, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, hint, pStr0, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, hint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, hint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, hint, pStr0, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, hint, pStr0, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, hint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, byte* hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, hint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, hint, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, hint, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags 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* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, hint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, byte* hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, hint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(label, pStr0, pStr1, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(label, pStr0, pStr1, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(label, pStr0, pStr1, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(label, pStr0, pStr1, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative(label, (byte*)phint, pStr0, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative(label, (byte*)phint, pStr0, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative(label, (byte*)phint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative(label, (byte*)phint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative(label, (byte*)phint, pStr0, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative(label, (byte*)phint, pStr0, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative(label, (byte*)phint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative(label, (byte*)phint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, pStr0, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, pStr0, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, pStr0, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(byte* label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(label, pStr0, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextExNative(pStr0, pStr1, pStr2, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextExNative(pStr0, pStr1, pStr2, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextExNative(pStr0, pStr1, pStr2, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte* pStr2 = null; + int pStrSize2 = 0; + if (buf != null) + { + pStrSize2 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize2 >= Utils.MaxStackallocSize) + { + pStr2 = Utils.Alloc(pStrSize2 + 1); + } + else + { + byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; + pStr2 = pStrStack2; + } + int pStrOffset2 = Utils.EncodeStringUTF8(buf, pStr2, pStrSize2); + pStr2[pStrOffset2] = 0; + } + byte ret = InputTextExNative(pStr0, pStr1, pStr2, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr2); + } + if (pStrSize2 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr2); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, pStr1, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, pStr1, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, pStr1, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ref byte label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, pStr1, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + return ret != 0; + } + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = &hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + fixed (byte* phint = hint) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = InputTextExNative((byte*)plabel, (byte*)phint, pStr0, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, pStr1, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, pStr1, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, pStr1, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(ReadOnlySpan label, string hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (hint != null) + { + pStrSize0 = Utils.GetByteCountUTF8(hint); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + pStr0 = Utils.Alloc(pStrSize0 + 1); + } + else + { + byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; + pStr0 = pStrStack0; + } + int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); + pStr0[pStrOffset0] = 0; + } + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative((byte*)plabel, pStr0, pStr1, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ref byte hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, (byte*)phint, pStr1, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, (byte*)phint, pStr1, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, (byte*)phint, pStr1, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ref byte hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = &hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, (byte*)phint, pStr1, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ReadOnlySpan hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, (byte*)phint, pStr1, bufSize, sizeArg, flags, callback, userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, (byte*)phint, pStr1, bufSize, sizeArg, flags, callback, (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, (byte*)phint, pStr1, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + } +} diff --git a/imgui/Dalamud.ImGui/Manual/Functions/Functions.010.cs b/imgui/Dalamud.ImGui/Manual/Functions/Functions.010.cs new file mode 100644 index 000000000..2f345c2e1 --- /dev/null +++ b/imgui/Dalamud.ImGui/Manual/Functions/Functions.010.cs @@ -0,0 +1,610 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using HexaGen.Runtime; +using System.Numerics; + +namespace Dalamud.Bindings.ImGui +{ + public unsafe partial class ImGui + { + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, ReadOnlySpan hint, ref string buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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* phint = hint) + { + byte* pStr1 = null; + int pStrSize1 = 0; + if (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = InputTextExNative(pStr0, (byte*)phint, pStr1, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, pStr1, (byte*)pbuf, bufSize, sizeArg, flags, callback, userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, pStr1, (byte*)pbuf, bufSize, sizeArg, flags, callback, (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, pStr1, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), (void*)(default)); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool InputTextEx(string label, string hint, ref byte buf, int bufSize, Vector2 sizeArg, ImGuiInputTextFlags flags, void* userData) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (label != null) + { + pStrSize0 = Utils.GetByteCountUTF8(label); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + 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 (hint != null) + { + pStrSize1 = Utils.GetByteCountUTF8(hint); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + fixed (byte* pbuf = &buf) + { + byte ret = InputTextExNative(pStr0, pStr1, (byte*)pbuf, bufSize, sizeArg, flags, (ImGuiInputTextCallback)(default), userData); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static byte TempInputTextNative(ImRect bb, uint id, byte* label, byte* buf, int bufSize, ImGuiInputTextFlags flags) + { + #if NET5_0_OR_GREATER + return ((delegate* unmanaged[Cdecl])funcTable[1275])(bb, id, label, buf, bufSize, flags); + #else + return (byte)((delegate* unmanaged[Cdecl])funcTable[1275])(bb, id, (nint)label, (nint)buf, bufSize, flags); + #endif + } + + /// + /// To be documented. + /// + public static bool TempInputText(ImRect bb, uint id, byte* label, byte* buf, int bufSize, ImGuiInputTextFlags flags) + { + byte ret = TempInputTextNative(bb, id, label, buf, bufSize, flags); + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TempInputText(ImRect bb, uint id, ref byte label, byte* buf, int bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte ret = TempInputTextNative(bb, id, (byte*)plabel, buf, bufSize, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TempInputText(ImRect bb, uint id, ReadOnlySpan label, byte* buf, int bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte ret = TempInputTextNative(bb, id, (byte*)plabel, buf, bufSize, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TempInputText(ImRect bb, uint id, string label, byte* buf, int bufSize, ImGuiInputTextFlags 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 = TempInputTextNative(bb, id, pStr0, buf, bufSize, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TempInputText(ImRect bb, uint id, byte* label, ref byte buf, int bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* pbuf = &buf) + { + byte ret = TempInputTextNative(bb, id, label, (byte*)pbuf, bufSize, flags); + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TempInputText(ImRect bb, uint id, byte* label, ref string buf, int bufSize, ImGuiInputTextFlags flags) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = TempInputTextNative(bb, id, label, pStr0, bufSize, flags); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TempInputText(ImRect bb, uint id, ref byte label, ref byte buf, int bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + fixed (byte* pbuf = &buf) + { + byte ret = TempInputTextNative(bb, id, (byte*)plabel, (byte*)pbuf, bufSize, flags); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool TempInputText(ImRect bb, uint id, ReadOnlySpan label, ref byte buf, int bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + fixed (byte* pbuf = &buf) + { + byte ret = TempInputTextNative(bb, id, (byte*)plabel, (byte*)pbuf, bufSize, flags); + return ret != 0; + } + } + } + + /// + /// To be documented. + /// + public static bool TempInputText(ImRect bb, uint id, string label, ref string buf, int bufSize, ImGuiInputTextFlags 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 (buf != null) + { + pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + if (pStrSize1 >= Utils.MaxStackallocSize) + { + pStr1 = Utils.Alloc(pStrSize1 + 1); + } + else + { + byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; + pStr1 = pStrStack1; + } + int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); + pStr1[pStrOffset1] = 0; + } + byte ret = TempInputTextNative(bb, id, pStr0, pStr1, bufSize, flags); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr1); + } + if (pStrSize1 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr1); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + + /// + /// To be documented. + /// + public static bool TempInputText(ImRect bb, uint id, ref byte label, ref string buf, int bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = &label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = TempInputTextNative(bb, id, (byte*)plabel, pStr0, bufSize, flags); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TempInputText(ImRect bb, uint id, ReadOnlySpan label, ref string buf, int bufSize, ImGuiInputTextFlags flags) + { + fixed (byte* plabel = label) + { + byte* pStr0 = null; + int pStrSize0 = 0; + if (buf != null) + { + pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); + 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 = TempInputTextNative(bb, id, (byte*)plabel, pStr0, bufSize, flags); + if (ret != 0) + { + buf = Utils.DecodeStringUTF8(pStr0); + } + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + /// + /// To be documented. + /// + public static bool TempInputText(ImRect bb, uint id, string label, ref byte buf, int bufSize, ImGuiInputTextFlags 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* pbuf = &buf) + { + byte ret = TempInputTextNative(bb, id, pStr0, (byte*)pbuf, bufSize, flags); + if (pStrSize0 >= Utils.MaxStackallocSize) + { + Utils.Free(pStr0); + } + return ret != 0; + } + } + + } +} diff --git a/imgui/Dalamud.ImGui/STBTexteditStatePtr.cs b/imgui/Dalamud.ImGui/STBTexteditStatePtr.cs new file mode 100644 index 000000000..8927bda0d --- /dev/null +++ b/imgui/Dalamud.ImGui/STBTexteditStatePtr.cs @@ -0,0 +1,45 @@ +#nullable disable + +namespace Dalamud.Bindings.ImGui +{ + using System; + + public unsafe struct STBTexteditStatePtr : IEquatable + { + public STBTexteditState* Handle; + + public unsafe STBTexteditStatePtr(STBTexteditState* handle) + { + Handle = handle; + } + + public override readonly bool Equals(object obj) + { + return obj is STBTexteditStatePtr ptr && Equals(ptr); + } + + public readonly bool Equals(STBTexteditStatePtr other) + { + return Handle == other.Handle; + } + + public override readonly int GetHashCode() + { + return ((nint)Handle).GetHashCode(); + } + + public static bool operator ==(STBTexteditStatePtr left, STBTexteditStatePtr right) + { + return left.Equals(right); + } + + public static bool operator !=(STBTexteditStatePtr left, STBTexteditStatePtr right) + { + return !(left == right); + } + + public static implicit operator STBTexteditState*(STBTexteditStatePtr handle) => handle.Handle; + + public static implicit operator STBTexteditStatePtr(STBTexteditState* handle) => new(handle); + } +} diff --git a/imgui/Dalamud.ImGuizmo/Dalamud.ImGuizmo.csproj b/imgui/Dalamud.ImGuizmo/Dalamud.ImGuizmo.csproj new file mode 100644 index 000000000..20d638ee1 --- /dev/null +++ b/imgui/Dalamud.ImGuizmo/Dalamud.ImGuizmo.csproj @@ -0,0 +1,19 @@ + + + + enable + enable + true + + true + + + + + + + + + + + diff --git a/imgui/Dalamud.ImGuizmo/ImGuizmo.cs b/imgui/Dalamud.ImGuizmo/ImGuizmo.cs new file mode 100644 index 000000000..7c03bdfa2 --- /dev/null +++ b/imgui/Dalamud.ImGuizmo/ImGuizmo.cs @@ -0,0 +1,33 @@ +using System.Reflection; + +namespace Dalamud.Bindings.ImGuizmo +{ + using HexaGen.Runtime; + using System.Diagnostics; + + public static class ImGuizmoConfig + { + public static bool AotStaticLink; + } + + public static unsafe partial class ImGuizmo + { + static ImGuizmo() + { + if (ImGuizmoConfig.AotStaticLink) + { + InitApi(new NativeLibraryContext(Process.GetCurrentProcess().MainModule!.BaseAddress)); + } + else + { + // InitApi(new NativeLibraryContext(LibraryLoader.LoadLibrary(GetLibraryName, null))); + InitApi(new NativeLibraryContext(Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location)!, GetLibraryName() + ".dll"))); + } + } + + public static string GetLibraryName() + { + return "cimguizmo"; + } + } +} diff --git a/imgui/Dalamud.ImGuizmo/LICENSE.txt b/imgui/Dalamud.ImGuizmo/LICENSE.txt new file mode 100644 index 000000000..b5dae7ac2 --- /dev/null +++ b/imgui/Dalamud.ImGuizmo/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Juna Meinhold + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/imgui/Dalamud.ImPlot/Dalamud.ImPlot.csproj b/imgui/Dalamud.ImPlot/Dalamud.ImPlot.csproj new file mode 100644 index 000000000..20d638ee1 --- /dev/null +++ b/imgui/Dalamud.ImPlot/Dalamud.ImPlot.csproj @@ -0,0 +1,19 @@ + + + + enable + enable + true + + true + + + + + + + + + + + diff --git a/imgui/Dalamud.ImPlot/ImPlot.cs b/imgui/Dalamud.ImPlot/ImPlot.cs new file mode 100644 index 000000000..2d43274a7 --- /dev/null +++ b/imgui/Dalamud.ImPlot/ImPlot.cs @@ -0,0 +1,33 @@ +using System.Reflection; + +namespace Dalamud.Bindings.ImPlot +{ + using HexaGen.Runtime; + using System.Diagnostics; + + public static class ImPlotConfig + { + public static bool AotStaticLink; + } + + public static unsafe partial class ImPlot + { + static ImPlot() + { + if (ImPlotConfig.AotStaticLink) + { + InitApi(new NativeLibraryContext(Process.GetCurrentProcess().MainModule!.BaseAddress)); + } + else + { + // InitApi(new NativeLibraryContext(LibraryLoader.LoadLibrary(GetLibraryName, null))); + InitApi(new NativeLibraryContext(Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location)!, GetLibraryName() + ".dll"))); + } + } + + public static string GetLibraryName() + { + return "cimplot"; + } + } +} diff --git a/imgui/Dalamud.ImPlot/LICENSE.txt b/imgui/Dalamud.ImPlot/LICENSE.txt new file mode 100644 index 000000000..b5dae7ac2 --- /dev/null +++ b/imgui/Dalamud.ImPlot/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Juna Meinhold + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/imgui/Dalamud.ImPlot/Tm.cs b/imgui/Dalamud.ImPlot/Tm.cs new file mode 100644 index 000000000..5143dcfc5 --- /dev/null +++ b/imgui/Dalamud.ImPlot/Tm.cs @@ -0,0 +1,109 @@ +namespace Dalamud.Bindings.ImPlot +{ + using System; + + public struct Tm : IEquatable + { + /// + /// seconds after the minute - [0, 60] including leap second + /// + public int Sec; + + /// + /// minutes after the hour - [0, 59] + /// + public int Min; + + /// + /// hours since midnight - [0, 23] + /// + public int Hour; + + /// + /// day of the month - [1, 31] + /// + public int MDay; + + /// + /// months since January - [0, 11] + /// + public int Mon; + + /// + /// years since 1900 + /// + public int Year; + + /// + /// days since Sunday - [0, 6] + /// + public int WDay; + + /// + /// days since January 1 - [0, 365] + /// + public int YDay; + + /// + /// daylight savings time flag + /// + public int IsDst; + + public override bool Equals(object? obj) + { + return obj is Tm tm && Equals(tm); + } + + public bool Equals(Tm other) + { + return Sec == other.Sec && + Min == other.Min && + Hour == other.Hour && + MDay == other.MDay && + Mon == other.Mon && + Year == other.Year && + WDay == other.WDay && + YDay == other.YDay && + IsDst == other.IsDst; + } + + public override int GetHashCode() + { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER + HashCode hash = new HashCode(); + hash.Add(Sec); + hash.Add(Min); + hash.Add(Hour); + hash.Add(MDay); + hash.Add(Mon); + hash.Add(Year); + hash.Add(WDay); + hash.Add(YDay); + hash.Add(IsDst); + return hash.ToHashCode(); +#else + int hash = 17; + hash = hash * 31 + Sec.GetHashCode(); + hash = hash * 31 + Min.GetHashCode(); + hash = hash * 31 + Hour.GetHashCode(); + hash = hash * 31 + MDay.GetHashCode(); + hash = hash * 31 + Mon.GetHashCode(); + hash = hash * 31 + Year.GetHashCode(); + hash = hash * 31 + WDay.GetHashCode(); + hash = hash * 31 + YDay.GetHashCode(); + hash = hash * 31 + IsDst.GetHashCode(); + return hash; +#endif + } + + public static bool operator ==(Tm left, Tm right) + { + return left.Equals(right); + } + + public static bool operator !=(Tm left, Tm right) + { + return !(left == right); + } + } +} diff --git a/lib/Hexa.NET.ImGui b/lib/Hexa.NET.ImGui index c2d257eb3..028a1f943 160000 --- a/lib/Hexa.NET.ImGui +++ b/lib/Hexa.NET.ImGui @@ -1 +1 @@ -Subproject commit c2d257eb3124e5c1635903241fd0965a3d1f079e +Subproject commit 028a1f94391970c14724cfea403d9c4faa78e3f1