mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
move bindings around
This commit is contained in:
parent
1bce618684
commit
b5a8bfe399
546 changed files with 8 additions and 8 deletions
5018
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.000.cs
Normal file
5018
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.000.cs
Normal file
File diff suppressed because it is too large
Load diff
5029
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.001.cs
Normal file
5029
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.001.cs
Normal file
File diff suppressed because it is too large
Load diff
5030
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.002.cs
Normal file
5030
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.002.cs
Normal file
File diff suppressed because it is too large
Load diff
5031
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.003.cs
Normal file
5031
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.003.cs
Normal file
File diff suppressed because it is too large
Load diff
5023
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.004.cs
Normal file
5023
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.004.cs
Normal file
File diff suppressed because it is too large
Load diff
5028
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.005.cs
Normal file
5028
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.005.cs
Normal file
File diff suppressed because it is too large
Load diff
5044
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.006.cs
Normal file
5044
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.006.cs
Normal file
File diff suppressed because it is too large
Load diff
5047
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.007.cs
Normal file
5047
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.007.cs
Normal file
File diff suppressed because it is too large
Load diff
5031
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.008.cs
Normal file
5031
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.008.cs
Normal file
File diff suppressed because it is too large
Load diff
5037
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.009.cs
Normal file
5037
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.009.cs
Normal file
File diff suppressed because it is too large
Load diff
610
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.010.cs
Normal file
610
imgui/Dalamud.Bindings.ImGui/Manual/Functions/Functions.010.cs
Normal file
|
|
@ -0,0 +1,610 @@
|
|||
// ------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
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
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
public static bool InputTextEx(string label, ReadOnlySpan<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<byte>(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<byte>(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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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<byte>(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<byte>(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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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<byte>(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<byte>(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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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<byte>(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<byte>(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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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<byte>(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<byte>(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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
[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]<ImRect, uint, byte*, byte*, int, ImGuiInputTextFlags, byte>)funcTable[1275])(bb, id, label, buf, bufSize, flags);
|
||||
#else
|
||||
return (byte)((delegate* unmanaged[Cdecl]<ImRect, uint, nint, nint, int, ImGuiInputTextFlags, byte>)funcTable[1275])(bb, id, (nint)label, (nint)buf, bufSize, flags);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
public static bool TempInputText(ImRect bb, uint id, ReadOnlySpan<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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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<byte>(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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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<byte>(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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
public static bool TempInputText(ImRect bb, uint id, ReadOnlySpan<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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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<byte>(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<byte>(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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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<byte>(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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
public static bool TempInputText(ImRect bb, uint id, ReadOnlySpan<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<byte>(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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be documented.
|
||||
/// </summary>
|
||||
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<byte>(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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue