// ------------------------------------------------------------------------------ // // 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 ImPlotItem { /// /// To be documented. /// public uint ID; /// /// To be documented. /// public uint Color; /// /// To be documented. /// public ImRect LegendHoverRect; /// /// To be documented. /// public int NameOffset; /// /// To be documented. /// public byte Show; /// /// To be documented. /// public byte LegendHovered; /// /// To be documented. /// public byte SeenThisFrame; /// /// To be documented. /// public unsafe ImPlotItem(uint id = default, uint color = default, ImRect legendHoverRect = default, int nameOffset = default, bool show = default, bool legendHovered = default, bool seenThisFrame = default) { ID = id; Color = color; LegendHoverRect = legendHoverRect; NameOffset = nameOffset; Show = show ? (byte)1 : (byte)0; LegendHovered = legendHovered ? (byte)1 : (byte)0; SeenThisFrame = seenThisFrame ? (byte)1 : (byte)0; } /// /// To be documented. /// public unsafe void Destroy() { fixed (ImPlotItem* @this = &this) { ImPlot.DestroyNative(@this); } } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImPlotItemPtr : IEquatable { public ImPlotItemPtr(ImPlotItem* handle) { Handle = handle; } public ImPlotItem* Handle; public bool IsNull => Handle == null; public static ImPlotItemPtr Null => new ImPlotItemPtr(null); public ImPlotItem this[int index] { get => Handle[index]; set => Handle[index] = value; } public static implicit operator ImPlotItemPtr(ImPlotItem* handle) => new ImPlotItemPtr(handle); public static implicit operator ImPlotItem*(ImPlotItemPtr handle) => handle.Handle; public static bool operator ==(ImPlotItemPtr left, ImPlotItemPtr right) => left.Handle == right.Handle; public static bool operator !=(ImPlotItemPtr left, ImPlotItemPtr right) => left.Handle != right.Handle; public static bool operator ==(ImPlotItemPtr left, ImPlotItem* right) => left.Handle == right; public static bool operator !=(ImPlotItemPtr left, ImPlotItem* right) => left.Handle != right; public bool Equals(ImPlotItemPtr other) => Handle == other.Handle; /// public override bool Equals(object obj) => obj is ImPlotItemPtr handle && Equals(handle); /// public override int GetHashCode() => ((nuint)Handle).GetHashCode(); #if NET5_0_OR_GREATER private string DebuggerDisplay => string.Format("ImPlotItemPtr [0x{0}]", ((nuint)Handle).ToString("X")); #endif /// /// To be documented. /// public ref uint ID => ref Unsafe.AsRef(&Handle->ID); /// /// To be documented. /// public ref uint Color => ref Unsafe.AsRef(&Handle->Color); /// /// To be documented. /// public ref ImRect LegendHoverRect => ref Unsafe.AsRef(&Handle->LegendHoverRect); /// /// To be documented. /// public ref int NameOffset => ref Unsafe.AsRef(&Handle->NameOffset); /// /// To be documented. /// public ref bool Show => ref Unsafe.AsRef(&Handle->Show); /// /// To be documented. /// public ref bool LegendHovered => ref Unsafe.AsRef(&Handle->LegendHovered); /// /// To be documented. /// public ref bool SeenThisFrame => ref Unsafe.AsRef(&Handle->SeenThisFrame); /// /// To be documented. /// public unsafe void Destroy() { ImPlot.DestroyNative(Handle); } } }