// ------------------------------------------------------------------------------ // // 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; } } } } }