// ------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using HexaGen.Runtime; using System.Numerics; namespace Dalamud.Bindings.ImGui { public unsafe partial class ImGuiP { /// /// To be documented. /// public static void LogSetNextTextDecoration(ReadOnlySpan prefix, string suffix) { fixed (byte* pprefix = prefix) { byte* pStr0 = null; int pStrSize0 = 0; if (suffix != null) { pStrSize0 = Utils.GetByteCountUTF8(suffix); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(suffix, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } LogSetNextTextDecorationNative((byte*)pprefix, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void LogSetNextTextDecoration(string prefix, ref byte suffix) { byte* pStr0 = null; int pStrSize0 = 0; if (prefix != null) { pStrSize0 = Utils.GetByteCountUTF8(prefix); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* psuffix = &suffix) { LogSetNextTextDecorationNative(pStr0, (byte*)psuffix); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void LogSetNextTextDecoration(string prefix, ReadOnlySpan suffix) { byte* pStr0 = null; int pStrSize0 = 0; if (prefix != null) { pStrSize0 = Utils.GetByteCountUTF8(prefix); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(prefix, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* psuffix = suffix) { LogSetNextTextDecorationNative(pStr0, (byte*)psuffix); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte BeginChildExNative(byte* name, uint id, Vector2 sizeArg, byte border, ImGuiWindowFlags flags) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[1009])(name, id, sizeArg, border, flags); #else return (byte)((delegate* unmanaged[Cdecl])funcTable[1009])((nint)name, id, sizeArg, border, flags); #endif } /// /// To be documented. /// public static bool BeginChildEx(byte* name, uint id, Vector2 sizeArg, bool border, ImGuiWindowFlags flags) { byte ret = BeginChildExNative(name, id, sizeArg, border ? (byte)1 : (byte)0, flags); return ret != 0; } /// /// To be documented. /// public static bool BeginChildEx(ref byte name, uint id, Vector2 sizeArg, bool border, ImGuiWindowFlags flags) { fixed (byte* pname = &name) { byte ret = BeginChildExNative((byte*)pname, id, sizeArg, border ? (byte)1 : (byte)0, flags); return ret != 0; } } /// /// To be documented. /// public static bool BeginChildEx(ReadOnlySpan name, uint id, Vector2 sizeArg, bool border, ImGuiWindowFlags flags) { fixed (byte* pname = name) { byte ret = BeginChildExNative((byte*)pname, id, sizeArg, border ? (byte)1 : (byte)0, flags); return ret != 0; } } /// /// To be documented. /// public static bool BeginChildEx(string name, uint id, Vector2 sizeArg, bool border, ImGuiWindowFlags flags) { byte* pStr0 = null; int pStrSize0 = 0; if (name != null) { pStrSize0 = Utils.GetByteCountUTF8(name); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = BeginChildExNative(pStr0, id, sizeArg, border ? (byte)1 : (byte)0, flags); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void OpenPopupExNative(uint id, ImGuiPopupFlags popupFlags) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[1010])(id, popupFlags); #else ((delegate* unmanaged[Cdecl])funcTable[1010])(id, popupFlags); #endif } /// /// To be documented. /// public static void OpenPopupEx(uint id, ImGuiPopupFlags popupFlags) { OpenPopupExNative(id, popupFlags); } /// /// To be documented. /// public static void OpenPopupEx(uint id) { OpenPopupExNative(id, (ImGuiPopupFlags)(ImGuiPopupFlags.None)); } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void ClosePopupToLevelNative(int remaining, byte restoreFocusToWindowUnderPopup) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[1011])(remaining, restoreFocusToWindowUnderPopup); #else ((delegate* unmanaged[Cdecl])funcTable[1011])(remaining, restoreFocusToWindowUnderPopup); #endif } /// /// To be documented. /// public static void ClosePopupToLevel(int remaining, bool restoreFocusToWindowUnderPopup) { ClosePopupToLevelNative(remaining, restoreFocusToWindowUnderPopup ? (byte)1 : (byte)0); } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void ClosePopupsOverWindowNative(ImGuiWindow* refWindow, byte restoreFocusToWindowUnderPopup) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[1012])(refWindow, restoreFocusToWindowUnderPopup); #else ((delegate* unmanaged[Cdecl])funcTable[1012])((nint)refWindow, restoreFocusToWindowUnderPopup); #endif } /// /// To be documented. /// public static void ClosePopupsOverWindow(ImGuiWindowPtr refWindow, bool restoreFocusToWindowUnderPopup) { ClosePopupsOverWindowNative(refWindow, restoreFocusToWindowUnderPopup ? (byte)1 : (byte)0); } /// /// To be documented. /// public static void ClosePopupsOverWindow(ref ImGuiWindow refWindow, bool restoreFocusToWindowUnderPopup) { fixed (ImGuiWindow* prefWindow = &refWindow) { ClosePopupsOverWindowNative((ImGuiWindow*)prefWindow, restoreFocusToWindowUnderPopup ? (byte)1 : (byte)0); } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void ClosePopupsExceptModalsNative() { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[1013])(); #else ((delegate* unmanaged[Cdecl])funcTable[1013])(); #endif } /// /// To be documented. /// public static void ClosePopupsExceptModals() { ClosePopupsExceptModalsNative(); } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte IsPopupOpenNative(uint id, ImGuiPopupFlags popupFlags) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[1014])(id, popupFlags); #else return (byte)((delegate* unmanaged[Cdecl])funcTable[1014])(id, popupFlags); #endif } /// /// To be documented. /// public static bool IsPopupOpen(uint id, ImGuiPopupFlags popupFlags) { byte ret = IsPopupOpenNative(id, popupFlags); return ret != 0; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte BeginPopupExNative(uint id, ImGuiWindowFlags extraFlags) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[1015])(id, extraFlags); #else return (byte)((delegate* unmanaged[Cdecl])funcTable[1015])(id, extraFlags); #endif } /// /// To be documented. /// public static bool BeginPopupEx(uint id, ImGuiWindowFlags extraFlags) { byte ret = BeginPopupExNative(id, extraFlags); return ret != 0; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void BeginTooltipExNative(ImGuiTooltipFlags tooltipFlags, ImGuiWindowFlags extraWindowFlags) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[1016])(tooltipFlags, extraWindowFlags); #else ((delegate* unmanaged[Cdecl])funcTable[1016])(tooltipFlags, extraWindowFlags); #endif } /// /// To be documented. /// public static void BeginTooltipEx(ImGuiTooltipFlags tooltipFlags, ImGuiWindowFlags extraWindowFlags) { BeginTooltipExNative(tooltipFlags, extraWindowFlags); } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void GetPopupAllowedExtentRectNative(ImRect* pOut, ImGuiWindow* window) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[1017])(pOut, window); #else ((delegate* unmanaged[Cdecl])funcTable[1017])((nint)pOut, (nint)window); #endif } /// /// To be documented. /// public static ImRect GetPopupAllowedExtentRect(ImGuiWindowPtr window) { ImRect ret; GetPopupAllowedExtentRectNative(&ret, window); return ret; } /// /// To be documented. /// public static void GetPopupAllowedExtentRect(ImRectPtr pOut, ImGuiWindowPtr window) { GetPopupAllowedExtentRectNative(pOut, window); } /// /// To be documented. /// public static void GetPopupAllowedExtentRect(ref ImRect pOut, ImGuiWindowPtr window) { fixed (ImRect* ppOut = &pOut) { GetPopupAllowedExtentRectNative((ImRect*)ppOut, window); } } /// /// To be documented. /// public static ImRect GetPopupAllowedExtentRect(ref ImGuiWindow window) { fixed (ImGuiWindow* pwindow = &window) { ImRect ret; GetPopupAllowedExtentRectNative(&ret, (ImGuiWindow*)pwindow); return ret; } } /// /// To be documented. /// public static void GetPopupAllowedExtentRect(ImRectPtr pOut, ref ImGuiWindow window) { fixed (ImGuiWindow* pwindow = &window) { GetPopupAllowedExtentRectNative(pOut, (ImGuiWindow*)pwindow); } } /// /// To be documented. /// public static void GetPopupAllowedExtentRect(ref ImRect pOut, ref ImGuiWindow window) { fixed (ImRect* ppOut = &pOut) { fixed (ImGuiWindow* pwindow = &window) { GetPopupAllowedExtentRectNative((ImRect*)ppOut, (ImGuiWindow*)pwindow); } } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static ImGuiWindow* GetTopMostPopupModalNative() { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[1018])(); #else return (ImGuiWindow*)((delegate* unmanaged[Cdecl])funcTable[1018])(); #endif } /// /// To be documented. /// public static ImGuiWindowPtr GetTopMostPopupModal() { ImGuiWindowPtr ret = GetTopMostPopupModalNative(); return ret; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static ImGuiWindow* GetTopMostAndVisiblePopupModalNative() { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[1019])(); #else return (ImGuiWindow*)((delegate* unmanaged[Cdecl])funcTable[1019])(); #endif } /// /// To be documented. /// public static ImGuiWindowPtr GetTopMostAndVisiblePopupModal() { ImGuiWindowPtr ret = GetTopMostAndVisiblePopupModalNative(); return ret; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void FindBestWindowPosForPopupNative(Vector2* pOut, ImGuiWindow* window) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[1020])(pOut, window); #else ((delegate* unmanaged[Cdecl])funcTable[1020])((nint)pOut, (nint)window); #endif } /// /// To be documented. /// public static Vector2 FindBestWindowPosForPopup(ImGuiWindowPtr window) { Vector2 ret; FindBestWindowPosForPopupNative(&ret, window); return ret; } /// /// To be documented. /// public static void FindBestWindowPosForPopup(Vector2* pOut, ImGuiWindowPtr window) { FindBestWindowPosForPopupNative(pOut, window); } /// /// To be documented. /// public static void FindBestWindowPosForPopup(ref Vector2 pOut, ImGuiWindowPtr window) { fixed (Vector2* ppOut = &pOut) { FindBestWindowPosForPopupNative((Vector2*)ppOut, window); } } /// /// To be documented. /// public static Vector2 FindBestWindowPosForPopup(ref ImGuiWindow window) { fixed (ImGuiWindow* pwindow = &window) { Vector2 ret; FindBestWindowPosForPopupNative(&ret, (ImGuiWindow*)pwindow); return ret; } } /// /// To be documented. /// public static void FindBestWindowPosForPopup(Vector2* pOut, ref ImGuiWindow window) { fixed (ImGuiWindow* pwindow = &window) { FindBestWindowPosForPopupNative(pOut, (ImGuiWindow*)pwindow); } } /// /// To be documented. /// public static void FindBestWindowPosForPopup(ref Vector2 pOut, ref ImGuiWindow window) { fixed (Vector2* ppOut = &pOut) { fixed (ImGuiWindow* pwindow = &window) { FindBestWindowPosForPopupNative((Vector2*)ppOut, (ImGuiWindow*)pwindow); } } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void FindBestWindowPosForPopupExNative(Vector2* pOut, Vector2 refPos, Vector2 size, ImGuiDir* lastDir, ImRect rOuter, ImRect rAvoid, ImGuiPopupPositionPolicy policy) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[1021])(pOut, refPos, size, lastDir, rOuter, rAvoid, policy); #else ((delegate* unmanaged[Cdecl])funcTable[1021])((nint)pOut, refPos, size, (nint)lastDir, rOuter, rAvoid, policy); #endif } /// /// To be documented. /// public static Vector2 FindBestWindowPosForPopupEx(Vector2 refPos, Vector2 size, ImGuiDir* lastDir, ImRect rOuter, ImRect rAvoid, ImGuiPopupPositionPolicy policy) { Vector2 ret; FindBestWindowPosForPopupExNative(&ret, refPos, size, lastDir, rOuter, rAvoid, policy); return ret; } /// /// To be documented. /// public static void FindBestWindowPosForPopupEx(Vector2* pOut, Vector2 refPos, Vector2 size, ImGuiDir* lastDir, ImRect rOuter, ImRect rAvoid, ImGuiPopupPositionPolicy policy) { FindBestWindowPosForPopupExNative(pOut, refPos, size, lastDir, rOuter, rAvoid, policy); } /// /// To be documented. /// public static void FindBestWindowPosForPopupEx(ref Vector2 pOut, Vector2 refPos, Vector2 size, ImGuiDir* lastDir, ImRect rOuter, ImRect rAvoid, ImGuiPopupPositionPolicy policy) { fixed (Vector2* ppOut = &pOut) { FindBestWindowPosForPopupExNative((Vector2*)ppOut, refPos, size, lastDir, rOuter, rAvoid, policy); } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte BeginViewportSideBarNative(byte* name, ImGuiViewport* viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[1022])(name, viewport, dir, size, windowFlags); #else return (byte)((delegate* unmanaged[Cdecl])funcTable[1022])((nint)name, (nint)viewport, dir, size, windowFlags); #endif } /// /// To be documented. /// public static bool BeginViewportSideBar(byte* name, ImGuiViewportPtr viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) { byte ret = BeginViewportSideBarNative(name, viewport, dir, size, windowFlags); return ret != 0; } /// /// To be documented. /// public static bool BeginViewportSideBar(ref byte name, ImGuiViewportPtr viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) { fixed (byte* pname = &name) { byte ret = BeginViewportSideBarNative((byte*)pname, viewport, dir, size, windowFlags); return ret != 0; } } /// /// To be documented. /// public static bool BeginViewportSideBar(ReadOnlySpan name, ImGuiViewportPtr viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) { fixed (byte* pname = name) { byte ret = BeginViewportSideBarNative((byte*)pname, viewport, dir, size, windowFlags); return ret != 0; } } /// /// To be documented. /// public static bool BeginViewportSideBar(string name, ImGuiViewportPtr viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) { byte* pStr0 = null; int pStrSize0 = 0; if (name != null) { pStrSize0 = Utils.GetByteCountUTF8(name); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = BeginViewportSideBarNative(pStr0, viewport, dir, size, windowFlags); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool BeginViewportSideBar(byte* name, ref ImGuiViewport viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) { fixed (ImGuiViewport* pviewport = &viewport) { byte ret = BeginViewportSideBarNative(name, (ImGuiViewport*)pviewport, dir, size, windowFlags); return ret != 0; } } /// /// To be documented. /// public static bool BeginViewportSideBar(ref byte name, ref ImGuiViewport viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) { fixed (byte* pname = &name) { fixed (ImGuiViewport* pviewport = &viewport) { byte ret = BeginViewportSideBarNative((byte*)pname, (ImGuiViewport*)pviewport, dir, size, windowFlags); return ret != 0; } } } /// /// To be documented. /// public static bool BeginViewportSideBar(ReadOnlySpan name, ref ImGuiViewport viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) { fixed (byte* pname = name) { fixed (ImGuiViewport* pviewport = &viewport) { byte ret = BeginViewportSideBarNative((byte*)pname, (ImGuiViewport*)pviewport, dir, size, windowFlags); return ret != 0; } } } /// /// To be documented. /// public static bool BeginViewportSideBar(string name, ref ImGuiViewport viewport, ImGuiDir dir, float size, ImGuiWindowFlags windowFlags) { byte* pStr0 = null; int pStrSize0 = 0; if (name != null) { pStrSize0 = Utils.GetByteCountUTF8(name); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(name, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (ImGuiViewport* pviewport = &viewport) { byte ret = BeginViewportSideBarNative(pStr0, (ImGuiViewport*)pviewport, dir, size, windowFlags); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte BeginMenuExNative(byte* label, byte* icon, byte enabled) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[1023])(label, icon, enabled); #else return (byte)((delegate* unmanaged[Cdecl])funcTable[1023])((nint)label, (nint)icon, enabled); #endif } /// /// To be documented. /// public static bool BeginMenuEx(byte* label, byte* icon, bool enabled) { byte ret = BeginMenuExNative(label, icon, enabled ? (byte)1 : (byte)0); return ret != 0; } /// /// To be documented. /// public static bool BeginMenuEx(byte* label, byte* icon) { byte ret = BeginMenuExNative(label, icon, (byte)(1)); return ret != 0; } /// /// To be documented. /// public static bool BeginMenuEx(ref byte label, byte* icon, bool enabled) { fixed (byte* plabel = &label) { byte ret = BeginMenuExNative((byte*)plabel, icon, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(ref byte label, byte* icon) { fixed (byte* plabel = &label) { byte ret = BeginMenuExNative((byte*)plabel, icon, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(ReadOnlySpan label, byte* icon, bool enabled) { fixed (byte* plabel = label) { byte ret = BeginMenuExNative((byte*)plabel, icon, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(ReadOnlySpan label, byte* icon) { fixed (byte* plabel = label) { byte ret = BeginMenuExNative((byte*)plabel, icon, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(string label, byte* icon, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = BeginMenuExNative(pStr0, icon, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool BeginMenuEx(string label, byte* icon) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = BeginMenuExNative(pStr0, icon, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool BeginMenuEx(byte* label, ref byte icon, bool enabled) { fixed (byte* picon = &icon) { byte ret = BeginMenuExNative(label, (byte*)picon, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(byte* label, ref byte icon) { fixed (byte* picon = &icon) { byte ret = BeginMenuExNative(label, (byte*)picon, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(byte* label, ReadOnlySpan icon, bool enabled) { fixed (byte* picon = icon) { byte ret = BeginMenuExNative(label, (byte*)picon, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(byte* label, ReadOnlySpan icon) { fixed (byte* picon = icon) { byte ret = BeginMenuExNative(label, (byte*)picon, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(byte* label, string icon, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = BeginMenuExNative(label, pStr0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool BeginMenuEx(byte* label, string icon) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = BeginMenuExNative(label, pStr0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool BeginMenuEx(ref byte label, ref byte icon, bool enabled) { fixed (byte* plabel = &label) { fixed (byte* picon = &icon) { byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool BeginMenuEx(ref byte label, ref byte icon) { fixed (byte* plabel = &label) { fixed (byte* picon = &icon) { byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool BeginMenuEx(ReadOnlySpan label, ReadOnlySpan icon, bool enabled) { fixed (byte* plabel = label) { fixed (byte* picon = icon) { byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool BeginMenuEx(ReadOnlySpan label, ReadOnlySpan icon) { fixed (byte* plabel = label) { fixed (byte* picon = icon) { byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool BeginMenuEx(string label, string icon, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (icon != null) { pStrSize1 = Utils.GetByteCountUTF8(icon); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = BeginMenuExNative(pStr0, pStr1, enabled ? (byte)1 : (byte)0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool BeginMenuEx(string label, string icon) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (icon != null) { pStrSize1 = Utils.GetByteCountUTF8(icon); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = BeginMenuExNative(pStr0, pStr1, (byte)(1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool BeginMenuEx(ref byte label, ReadOnlySpan icon, bool enabled) { fixed (byte* plabel = &label) { fixed (byte* picon = icon) { byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool BeginMenuEx(ref byte label, ReadOnlySpan icon) { fixed (byte* plabel = &label) { fixed (byte* picon = icon) { byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool BeginMenuEx(ref byte label, string icon, bool enabled) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = BeginMenuExNative((byte*)plabel, pStr0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(ref byte label, string icon) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = BeginMenuExNative((byte*)plabel, pStr0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(ReadOnlySpan label, ref byte icon, bool enabled) { fixed (byte* plabel = label) { fixed (byte* picon = &icon) { byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool BeginMenuEx(ReadOnlySpan label, ref byte icon) { fixed (byte* plabel = label) { fixed (byte* picon = &icon) { byte ret = BeginMenuExNative((byte*)plabel, (byte*)picon, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool BeginMenuEx(ReadOnlySpan label, string icon, bool enabled) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = BeginMenuExNative((byte*)plabel, pStr0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(ReadOnlySpan label, string icon) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = BeginMenuExNative((byte*)plabel, pStr0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(string label, ref byte icon, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = &icon) { byte ret = BeginMenuExNative(pStr0, (byte*)picon, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(string label, ref byte icon) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = &icon) { byte ret = BeginMenuExNative(pStr0, (byte*)picon, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(string label, ReadOnlySpan icon, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = icon) { byte ret = BeginMenuExNative(pStr0, (byte*)picon, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool BeginMenuEx(string label, ReadOnlySpan icon) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = icon) { byte ret = BeginMenuExNative(pStr0, (byte*)picon, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte MenuItemExNative(byte* label, byte* icon, byte* shortcut, byte selected, byte enabled) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[1024])(label, icon, shortcut, selected, enabled); #else return (byte)((delegate* unmanaged[Cdecl])funcTable[1024])((nint)label, (nint)icon, (nint)shortcut, selected, enabled); #endif } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, byte* shortcut, bool selected, bool enabled) { byte ret = MenuItemExNative(label, icon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, byte* shortcut, bool selected) { byte ret = MenuItemExNative(label, icon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, byte* shortcut) { byte ret = MenuItemExNative(label, icon, shortcut, (byte)(0), (byte)(1)); return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon) { byte ret = MenuItemExNative(label, icon, (byte*)(default), (byte)(0), (byte)(1)); return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, bool selected) { byte ret = MenuItemExNative(label, icon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, bool selected, bool enabled) { byte ret = MenuItemExNative(label, icon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, byte* shortcut, bool selected, bool enabled) { fixed (byte* plabel = &label) { byte ret = MenuItemExNative((byte*)plabel, icon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, byte* shortcut, bool selected) { fixed (byte* plabel = &label) { byte ret = MenuItemExNative((byte*)plabel, icon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, byte* shortcut) { fixed (byte* plabel = &label) { byte ret = MenuItemExNative((byte*)plabel, icon, shortcut, (byte)(0), (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon) { fixed (byte* plabel = &label) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)(default), (byte)(0), (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, bool selected) { fixed (byte* plabel = &label) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, bool selected, bool enabled) { fixed (byte* plabel = &label) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, byte* shortcut, bool selected, bool enabled) { fixed (byte* plabel = label) { byte ret = MenuItemExNative((byte*)plabel, icon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, byte* shortcut, bool selected) { fixed (byte* plabel = label) { byte ret = MenuItemExNative((byte*)plabel, icon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, byte* shortcut) { fixed (byte* plabel = label) { byte ret = MenuItemExNative((byte*)plabel, icon, shortcut, (byte)(0), (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon) { fixed (byte* plabel = label) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)(default), (byte)(0), (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, bool selected) { fixed (byte* plabel = label) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, bool selected, bool enabled) { fixed (byte* plabel = label) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, byte* shortcut, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(pStr0, icon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, byte* shortcut, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(pStr0, icon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, byte* shortcut) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(pStr0, icon, shortcut, (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(pStr0, icon, (byte*)(default), (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(pStr0, icon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(pStr0, icon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, byte* shortcut, bool selected, bool enabled) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative(label, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, byte* shortcut, bool selected) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative(label, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, byte* shortcut) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative(label, (byte*)picon, shortcut, (byte)(0), (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, bool selected) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, bool selected, bool enabled) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, byte* shortcut, bool selected, bool enabled) { fixed (byte* picon = icon) { byte ret = MenuItemExNative(label, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, byte* shortcut, bool selected) { fixed (byte* picon = icon) { byte ret = MenuItemExNative(label, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, byte* shortcut) { fixed (byte* picon = icon) { byte ret = MenuItemExNative(label, (byte*)picon, shortcut, (byte)(0), (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon) { fixed (byte* picon = icon) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, bool selected) { fixed (byte* picon = icon) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, bool selected, bool enabled) { fixed (byte* picon = icon) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, string icon, byte* shortcut, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, pStr0, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, string icon, byte* shortcut, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, pStr0, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, string icon, byte* shortcut) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, pStr0, shortcut, (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, string icon) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, pStr0, (byte*)(default), (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, string icon, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, string icon, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, ref byte icon, byte* shortcut, bool selected, bool enabled) { fixed (byte* plabel = &label) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, ref byte icon, byte* shortcut, bool selected) { fixed (byte* plabel = &label) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, ref byte icon, byte* shortcut) { fixed (byte* plabel = &label) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, ref byte icon) { fixed (byte* plabel = &label) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, ref byte icon, bool selected) { fixed (byte* plabel = &label) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, ref byte icon, bool selected, bool enabled) { fixed (byte* plabel = &label) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, byte* shortcut, bool selected, bool enabled) { fixed (byte* plabel = label) { fixed (byte* picon = icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, byte* shortcut, bool selected) { fixed (byte* plabel = label) { fixed (byte* picon = icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, byte* shortcut) { fixed (byte* plabel = label) { fixed (byte* picon = icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon) { fixed (byte* plabel = label) { fixed (byte* picon = icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, bool selected) { fixed (byte* plabel = label) { fixed (byte* picon = icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, ReadOnlySpan icon, bool selected, bool enabled) { fixed (byte* plabel = label) { fixed (byte* picon = icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(string label, string icon, byte* shortcut, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (icon != null) { pStrSize1 = Utils.GetByteCountUTF8(icon); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = MenuItemExNative(pStr0, pStr1, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(string label, string icon, byte* shortcut, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (icon != null) { pStrSize1 = Utils.GetByteCountUTF8(icon); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = MenuItemExNative(pStr0, pStr1, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(string label, string icon, byte* shortcut) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (icon != null) { pStrSize1 = Utils.GetByteCountUTF8(icon); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = MenuItemExNative(pStr0, pStr1, shortcut, (byte)(0), (byte)(1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(string label, string icon) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (icon != null) { pStrSize1 = Utils.GetByteCountUTF8(icon); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = MenuItemExNative(pStr0, pStr1, (byte*)(default), (byte)(0), (byte)(1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(string label, string icon, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (icon != null) { pStrSize1 = Utils.GetByteCountUTF8(icon); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = MenuItemExNative(pStr0, pStr1, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(string label, string icon, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (icon != null) { pStrSize1 = Utils.GetByteCountUTF8(icon); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(icon, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = MenuItemExNative(pStr0, pStr1, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, byte* shortcut, bool selected, bool enabled) { fixed (byte* plabel = &label) { fixed (byte* picon = icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, byte* shortcut, bool selected) { fixed (byte* plabel = &label) { fixed (byte* picon = icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, byte* shortcut) { fixed (byte* plabel = &label) { fixed (byte* picon = icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, ReadOnlySpan icon) { fixed (byte* plabel = &label) { fixed (byte* picon = icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, bool selected) { fixed (byte* plabel = &label) { fixed (byte* picon = icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, ReadOnlySpan icon, bool selected, bool enabled) { fixed (byte* plabel = &label) { fixed (byte* picon = icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, string icon, byte* shortcut, bool selected, bool enabled) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, pStr0, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, string icon, byte* shortcut, bool selected) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, pStr0, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, string icon, byte* shortcut) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, pStr0, shortcut, (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, string icon) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, pStr0, (byte*)(default), (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, string icon, bool selected) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, string icon, bool selected, bool enabled) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, byte* shortcut, bool selected, bool enabled) { fixed (byte* plabel = label) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, byte* shortcut, bool selected) { fixed (byte* plabel = label) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, byte* shortcut) { fixed (byte* plabel = label) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, shortcut, (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, ref byte icon) { fixed (byte* plabel = label) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, bool selected) { fixed (byte* plabel = label) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, ref byte icon, bool selected, bool enabled) { fixed (byte* plabel = label) { fixed (byte* picon = &icon) { byte ret = MenuItemExNative((byte*)plabel, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, string icon, byte* shortcut, bool selected, bool enabled) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, pStr0, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, string icon, byte* shortcut, bool selected) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, pStr0, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, string icon, byte* shortcut) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, pStr0, shortcut, (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, string icon) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, pStr0, (byte*)(default), (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, string icon, bool selected) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, string icon, bool selected, bool enabled) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, pStr0, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, ref byte icon, byte* shortcut, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = &icon) { byte ret = MenuItemExNative(pStr0, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, ref byte icon, byte* shortcut, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = &icon) { byte ret = MenuItemExNative(pStr0, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, ref byte icon, byte* shortcut) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = &icon) { byte ret = MenuItemExNative(pStr0, (byte*)picon, shortcut, (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, ref byte icon) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = &icon) { byte ret = MenuItemExNative(pStr0, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, ref byte icon, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = &icon) { byte ret = MenuItemExNative(pStr0, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, ref byte icon, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = &icon) { byte ret = MenuItemExNative(pStr0, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, ReadOnlySpan icon, byte* shortcut, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = icon) { byte ret = MenuItemExNative(pStr0, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, ReadOnlySpan icon, byte* shortcut, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = icon) { byte ret = MenuItemExNative(pStr0, (byte*)picon, shortcut, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, ReadOnlySpan icon, byte* shortcut) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = icon) { byte ret = MenuItemExNative(pStr0, (byte*)picon, shortcut, (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, ReadOnlySpan icon) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = icon) { byte ret = MenuItemExNative(pStr0, (byte*)picon, (byte*)(default), (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, ReadOnlySpan icon, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = icon) { byte ret = MenuItemExNative(pStr0, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, ReadOnlySpan icon, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* picon = icon) { byte ret = MenuItemExNative(pStr0, (byte*)picon, (byte*)(default), selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, ref byte shortcut, bool selected, bool enabled) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative(label, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, ref byte shortcut, bool selected) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative(label, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, ref byte shortcut) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative(label, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, ReadOnlySpan shortcut, bool selected, bool enabled) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative(label, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, ReadOnlySpan shortcut, bool selected) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative(label, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, ReadOnlySpan shortcut) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative(label, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, string shortcut, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, icon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, string shortcut, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, icon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, byte* icon, string shortcut) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, icon, pStr0, (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, ref byte shortcut, bool selected, bool enabled) { fixed (byte* plabel = &label) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, ref byte shortcut, bool selected) { fixed (byte* plabel = &label) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, ref byte shortcut) { fixed (byte* plabel = &label) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ReadOnlySpan shortcut, bool selected, bool enabled) { fixed (byte* plabel = label) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ReadOnlySpan shortcut, bool selected) { fixed (byte* plabel = label) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ReadOnlySpan shortcut) { fixed (byte* plabel = label) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, string shortcut, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (shortcut != null) { pStrSize1 = Utils.GetByteCountUTF8(shortcut); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = MenuItemExNative(pStr0, icon, pStr1, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, string shortcut, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (shortcut != null) { pStrSize1 = Utils.GetByteCountUTF8(shortcut); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = MenuItemExNative(pStr0, icon, pStr1, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, string shortcut) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (shortcut != null) { pStrSize1 = Utils.GetByteCountUTF8(shortcut); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = MenuItemExNative(pStr0, icon, pStr1, (byte)(0), (byte)(1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, ReadOnlySpan shortcut, bool selected, bool enabled) { fixed (byte* plabel = &label) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, ReadOnlySpan shortcut, bool selected) { fixed (byte* plabel = &label) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, ReadOnlySpan shortcut) { fixed (byte* plabel = &label) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, string shortcut, bool selected, bool enabled) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, icon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, string shortcut, bool selected) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, icon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ref byte label, byte* icon, string shortcut) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, icon, pStr0, (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ref byte shortcut, bool selected, bool enabled) { fixed (byte* plabel = label) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ref byte shortcut, bool selected) { fixed (byte* plabel = label) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, ref byte shortcut) { fixed (byte* plabel = label) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative((byte*)plabel, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, string shortcut, bool selected, bool enabled) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, icon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, string shortcut, bool selected) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, icon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(ReadOnlySpan label, byte* icon, string shortcut) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative((byte*)plabel, icon, pStr0, (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, ref byte shortcut, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative(pStr0, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, ref byte shortcut, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative(pStr0, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, ref byte shortcut) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative(pStr0, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, ReadOnlySpan shortcut, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative(pStr0, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, ReadOnlySpan shortcut, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative(pStr0, icon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(string label, byte* icon, ReadOnlySpan shortcut) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative(pStr0, icon, (byte*)pshortcut, (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, ref byte shortcut, bool selected, bool enabled) { fixed (byte* picon = &icon) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, ref byte shortcut, bool selected) { fixed (byte* picon = &icon) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, ref byte shortcut) { fixed (byte* picon = &icon) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ReadOnlySpan shortcut, bool selected, bool enabled) { fixed (byte* picon = icon) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ReadOnlySpan shortcut, bool selected) { fixed (byte* picon = icon) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ReadOnlySpan shortcut) { fixed (byte* picon = icon) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, string icon, string shortcut, bool selected, bool enabled) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (shortcut != null) { pStrSize1 = Utils.GetByteCountUTF8(shortcut); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = MenuItemExNative(label, pStr0, pStr1, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, string icon, string shortcut, bool selected) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (shortcut != null) { pStrSize1 = Utils.GetByteCountUTF8(shortcut); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = MenuItemExNative(label, pStr0, pStr1, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, string icon, string shortcut) { byte* pStr0 = null; int pStrSize0 = 0; if (icon != null) { pStrSize0 = Utils.GetByteCountUTF8(icon); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(icon, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (shortcut != null) { pStrSize1 = Utils.GetByteCountUTF8(shortcut); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(shortcut, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = MenuItemExNative(label, pStr0, pStr1, (byte)(0), (byte)(1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, ReadOnlySpan shortcut, bool selected, bool enabled) { fixed (byte* picon = &icon) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, ReadOnlySpan shortcut, bool selected) { fixed (byte* picon = &icon) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, ReadOnlySpan shortcut) { fixed (byte* picon = &icon) { fixed (byte* pshortcut = shortcut) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, string shortcut, bool selected, bool enabled) { fixed (byte* picon = &icon) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, string shortcut, bool selected) { fixed (byte* picon = &icon) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ref byte icon, string shortcut) { fixed (byte* picon = &icon) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, (byte*)picon, pStr0, (byte)(0), (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ref byte shortcut, bool selected, bool enabled) { fixed (byte* picon = icon) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ref byte shortcut, bool selected) { fixed (byte* picon = icon) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, selected ? (byte)1 : (byte)0, (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, ref byte shortcut) { fixed (byte* picon = icon) { fixed (byte* pshortcut = &shortcut) { byte ret = MenuItemExNative(label, (byte*)picon, (byte*)pshortcut, (byte)(0), (byte)(1)); return ret != 0; } } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, string shortcut, bool selected, bool enabled) { fixed (byte* picon = icon) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool MenuItemEx(byte* label, ReadOnlySpan icon, string shortcut, bool selected) { fixed (byte* picon = icon) { byte* pStr0 = null; int pStrSize0 = 0; if (shortcut != null) { pStrSize0 = Utils.GetByteCountUTF8(shortcut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(shortcut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = MenuItemExNative(label, (byte*)picon, pStr0, selected ? (byte)1 : (byte)0, (byte)(1)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } }