// ------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using HexaGen.Runtime; using System.Numerics; using Dalamud.Bindings.ImGui; namespace Dalamud.Bindings.ImPlot { /// /// To be documented. /// [StructLayout(LayoutKind.Sequential)] public partial struct ImPlotItemGroup { /// /// To be documented. /// public uint ID; /// /// To be documented. /// public ImPlotLegend Legend; /// /// To be documented. /// public ImPoolImPlotItem ItemPool; /// /// To be documented. /// public int ColormapIdx; /// /// To be documented. /// public unsafe ImPlotItemGroup(uint id = default, ImPlotLegend legend = default, ImPoolImPlotItem itemPool = default, int colormapIdx = default) { ID = id; Legend = legend; ItemPool = itemPool; ColormapIdx = colormapIdx; } /// /// To be documented. /// public unsafe void Destroy() { fixed (ImPlotItemGroup* @this = &this) { ImPlot.DestroyNative(@this); } } /// /// To be documented. /// public unsafe ImPlotItem* GetItem(uint id) { fixed (ImPlotItemGroup* @this = &this) { ImPlotItem* ret = ImPlot.GetItemNative(@this, id); return ret; } } /// /// To be documented. /// public unsafe ImPlotItem* GetItem(byte* labelId) { fixed (ImPlotItemGroup* @this = &this) { ImPlotItem* ret = ImPlot.GetItemNative(@this, labelId); return ret; } } /// /// To be documented. /// public unsafe ImPlotItem* GetItem(ref byte labelId) { fixed (ImPlotItemGroup* @this = &this) { fixed (byte* plabelId = &labelId) { ImPlotItem* ret = ImPlot.GetItemNative(@this, (byte*)plabelId); return ret; } } } /// /// To be documented. /// public unsafe ImPlotItem* GetItem(ReadOnlySpan labelId) { fixed (ImPlotItemGroup* @this = &this) { fixed (byte* plabelId = labelId) { ImPlotItem* ret = ImPlot.GetItemNative(@this, (byte*)plabelId); return ret; } } } /// /// To be documented. /// public unsafe ImPlotItem* GetItem(string labelId) { fixed (ImPlotItemGroup* @this = &this) { byte* pStr0 = null; int pStrSize0 = 0; if (labelId != null) { pStrSize0 = Utils.GetByteCountUTF8(labelId); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(labelId, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImPlotItem* ret = ImPlot.GetItemNative(@this, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public unsafe ImPlotItem* GetItemByIndex(int i) { fixed (ImPlotItemGroup* @this = &this) { ImPlotItem* ret = ImPlot.GetItemByIndexNative(@this, i); return ret; } } /// /// To be documented. /// public unsafe int GetItemCount() { fixed (ImPlotItemGroup* @this = &this) { int ret = ImPlot.GetItemCountNative(@this); return ret; } } /// /// To be documented. /// public unsafe uint GetItemID(byte* labelId) { fixed (ImPlotItemGroup* @this = &this) { uint ret = ImPlot.GetItemIDNative(@this, labelId); return ret; } } /// /// To be documented. /// public unsafe uint GetItemID(ref byte labelId) { fixed (ImPlotItemGroup* @this = &this) { fixed (byte* plabelId = &labelId) { uint ret = ImPlot.GetItemIDNative(@this, (byte*)plabelId); return ret; } } } /// /// To be documented. /// public unsafe uint GetItemID(ReadOnlySpan labelId) { fixed (ImPlotItemGroup* @this = &this) { fixed (byte* plabelId = labelId) { uint ret = ImPlot.GetItemIDNative(@this, (byte*)plabelId); return ret; } } } /// /// To be documented. /// public unsafe uint GetItemID(string labelId) { fixed (ImPlotItemGroup* @this = &this) { byte* pStr0 = null; int pStrSize0 = 0; if (labelId != null) { pStrSize0 = Utils.GetByteCountUTF8(labelId); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(labelId, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } uint ret = ImPlot.GetItemIDNative(@this, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public unsafe int GetItemIndex(ImPlotItem* item) { fixed (ImPlotItemGroup* @this = &this) { int ret = ImPlot.GetItemIndexNative(@this, item); return ret; } } /// /// To be documented. /// public unsafe int GetItemIndex(ref ImPlotItem item) { fixed (ImPlotItemGroup* @this = &this) { fixed (ImPlotItem* pitem = &item) { int ret = ImPlot.GetItemIndexNative(@this, (ImPlotItem*)pitem); return ret; } } } /// /// To be documented. /// public unsafe int GetLegendCount() { fixed (ImPlotItemGroup* @this = &this) { int ret = ImPlot.GetLegendCountNative(@this); return ret; } } /// /// To be documented. /// public unsafe ImPlotItem* GetLegendItem(int i) { fixed (ImPlotItemGroup* @this = &this) { ImPlotItem* ret = ImPlot.GetLegendItemNative(@this, i); return ret; } } /// /// To be documented. /// public unsafe byte* GetLegendLabel(int i) { fixed (ImPlotItemGroup* @this = &this) { byte* ret = ImPlot.GetLegendLabelNative(@this, i); return ret; } } /// /// To be documented. /// public unsafe string GetLegendLabelS(int i) { fixed (ImPlotItemGroup* @this = &this) { string ret = Utils.DecodeStringUTF8(ImPlot.GetLegendLabelNative(@this, i)); return ret; } } /// /// To be documented. /// public unsafe ImPlotItem* GetOrAddItem(uint id) { fixed (ImPlotItemGroup* @this = &this) { ImPlotItem* ret = ImPlot.GetOrAddItemNative(@this, id); return ret; } } /// /// To be documented. /// public unsafe void Reset() { fixed (ImPlotItemGroup* @this = &this) { ImPlot.ResetNative(@this); } } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImPlotItemGroupPtr : IEquatable { public ImPlotItemGroupPtr(ImPlotItemGroup* handle) { Handle = handle; } public ImPlotItemGroup* Handle; public bool IsNull => Handle == null; public static ImPlotItemGroupPtr Null => new ImPlotItemGroupPtr(null); public ImPlotItemGroup this[int index] { get => Handle[index]; set => Handle[index] = value; } public static implicit operator ImPlotItemGroupPtr(ImPlotItemGroup* handle) => new ImPlotItemGroupPtr(handle); public static implicit operator ImPlotItemGroup*(ImPlotItemGroupPtr handle) => handle.Handle; public static bool operator ==(ImPlotItemGroupPtr left, ImPlotItemGroupPtr right) => left.Handle == right.Handle; public static bool operator !=(ImPlotItemGroupPtr left, ImPlotItemGroupPtr right) => left.Handle != right.Handle; public static bool operator ==(ImPlotItemGroupPtr left, ImPlotItemGroup* right) => left.Handle == right; public static bool operator !=(ImPlotItemGroupPtr left, ImPlotItemGroup* right) => left.Handle != right; public bool Equals(ImPlotItemGroupPtr other) => Handle == other.Handle; /// public override bool Equals(object obj) => obj is ImPlotItemGroupPtr handle && Equals(handle); /// public override int GetHashCode() => ((nuint)Handle).GetHashCode(); #if NET5_0_OR_GREATER private string DebuggerDisplay => string.Format("ImPlotItemGroupPtr [0x{0}]", ((nuint)Handle).ToString("X")); #endif /// /// To be documented. /// public ref uint ID => ref Unsafe.AsRef(&Handle->ID); /// /// To be documented. /// public ref ImPlotLegend Legend => ref Unsafe.AsRef(&Handle->Legend); /// /// To be documented. /// public ref ImPoolImPlotItem ItemPool => ref Unsafe.AsRef(&Handle->ItemPool); /// /// To be documented. /// public ref int ColormapIdx => ref Unsafe.AsRef(&Handle->ColormapIdx); /// /// To be documented. /// public unsafe void Destroy() { ImPlot.DestroyNative(Handle); } /// /// To be documented. /// public unsafe ImPlotItem* GetItem(uint id) { ImPlotItem* ret = ImPlot.GetItemNative(Handle, id); return ret; } /// /// To be documented. /// public unsafe ImPlotItem* GetItem(byte* labelId) { ImPlotItem* ret = ImPlot.GetItemNative(Handle, labelId); return ret; } /// /// To be documented. /// public unsafe ImPlotItem* GetItem(ref byte labelId) { fixed (byte* plabelId = &labelId) { ImPlotItem* ret = ImPlot.GetItemNative(Handle, (byte*)plabelId); return ret; } } /// /// To be documented. /// public unsafe ImPlotItem* GetItem(ReadOnlySpan labelId) { fixed (byte* plabelId = labelId) { ImPlotItem* ret = ImPlot.GetItemNative(Handle, (byte*)plabelId); return ret; } } /// /// To be documented. /// public unsafe ImPlotItem* GetItem(string labelId) { byte* pStr0 = null; int pStrSize0 = 0; if (labelId != null) { pStrSize0 = Utils.GetByteCountUTF8(labelId); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(labelId, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImPlotItem* ret = ImPlot.GetItemNative(Handle, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public unsafe ImPlotItem* GetItemByIndex(int i) { ImPlotItem* ret = ImPlot.GetItemByIndexNative(Handle, i); return ret; } /// /// To be documented. /// public unsafe int GetItemCount() { int ret = ImPlot.GetItemCountNative(Handle); return ret; } /// /// To be documented. /// public unsafe uint GetItemID(byte* labelId) { uint ret = ImPlot.GetItemIDNative(Handle, labelId); return ret; } /// /// To be documented. /// public unsafe uint GetItemID(ref byte labelId) { fixed (byte* plabelId = &labelId) { uint ret = ImPlot.GetItemIDNative(Handle, (byte*)plabelId); return ret; } } /// /// To be documented. /// public unsafe uint GetItemID(ReadOnlySpan labelId) { fixed (byte* plabelId = labelId) { uint ret = ImPlot.GetItemIDNative(Handle, (byte*)plabelId); return ret; } } /// /// To be documented. /// public unsafe uint GetItemID(string labelId) { byte* pStr0 = null; int pStrSize0 = 0; if (labelId != null) { pStrSize0 = Utils.GetByteCountUTF8(labelId); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(labelId, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } uint ret = ImPlot.GetItemIDNative(Handle, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public unsafe int GetItemIndex(ImPlotItem* item) { int ret = ImPlot.GetItemIndexNative(Handle, item); return ret; } /// /// To be documented. /// public unsafe int GetItemIndex(ref ImPlotItem item) { fixed (ImPlotItem* pitem = &item) { int ret = ImPlot.GetItemIndexNative(Handle, (ImPlotItem*)pitem); return ret; } } /// /// To be documented. /// public unsafe int GetLegendCount() { int ret = ImPlot.GetLegendCountNative(Handle); return ret; } /// /// To be documented. /// public unsafe ImPlotItem* GetLegendItem(int i) { ImPlotItem* ret = ImPlot.GetLegendItemNative(Handle, i); return ret; } /// /// To be documented. /// public unsafe byte* GetLegendLabel(int i) { byte* ret = ImPlot.GetLegendLabelNative(Handle, i); return ret; } /// /// To be documented. /// public unsafe string GetLegendLabelS(int i) { string ret = Utils.DecodeStringUTF8(ImPlot.GetLegendLabelNative(Handle, i)); return ret; } /// /// To be documented. /// public unsafe ImPlotItem* GetOrAddItem(uint id) { ImPlotItem* ret = ImPlot.GetOrAddItemNative(Handle, id); return ret; } /// /// To be documented. /// public unsafe void Reset() { ImPlot.ResetNative(Handle); } } }