// ------------------------------------------------------------------------------ // // 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; namespace Dalamud.Bindings.ImGui { /// /// To be documented. /// [StructLayout(LayoutKind.Sequential)] public partial struct ImGuiDockContext { /// /// To be documented. /// public ImGuiStorage Nodes; /// /// To be documented. /// public ImVector Requests; /// /// To be documented. /// public ImVector NodesSettings; /// /// To be documented. /// public byte WantFullRebuild; /// /// To be documented. /// public unsafe ImGuiDockContext(ImGuiStorage nodes = default, ImVector requests = default, ImVector nodesSettings = default, bool wantFullRebuild = default) { Nodes = nodes; Requests = requests; NodesSettings = nodesSettings; WantFullRebuild = wantFullRebuild ? (byte)1 : (byte)0; } /// /// To be documented. /// public unsafe void Destroy() { fixed (ImGuiDockContext* @this = &this) { ImGui.DestroyNative(@this); } } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImGuiDockContextPtr : IEquatable { public ImGuiDockContextPtr(ImGuiDockContext* handle) { Handle = handle; } public ImGuiDockContext* Handle; public bool IsNull => Handle == null; public static ImGuiDockContextPtr Null => new ImGuiDockContextPtr(null); public ImGuiDockContext this[int index] { get => Handle[index]; set => Handle[index] = value; } public static implicit operator ImGuiDockContextPtr(ImGuiDockContext* handle) => new ImGuiDockContextPtr(handle); public static implicit operator ImGuiDockContext*(ImGuiDockContextPtr handle) => handle.Handle; public static bool operator ==(ImGuiDockContextPtr left, ImGuiDockContextPtr right) => left.Handle == right.Handle; public static bool operator !=(ImGuiDockContextPtr left, ImGuiDockContextPtr right) => left.Handle != right.Handle; public static bool operator ==(ImGuiDockContextPtr left, ImGuiDockContext* right) => left.Handle == right; public static bool operator !=(ImGuiDockContextPtr left, ImGuiDockContext* right) => left.Handle != right; public bool Equals(ImGuiDockContextPtr other) => Handle == other.Handle; /// public override bool Equals(object obj) => obj is ImGuiDockContextPtr handle && Equals(handle); /// public override int GetHashCode() => ((nuint)Handle).GetHashCode(); #if NET5_0_OR_GREATER private string DebuggerDisplay => string.Format("ImGuiDockContextPtr [0x{0}]", ((nuint)Handle).ToString("X")); #endif /// /// To be documented. /// public ref ImGuiStorage Nodes => ref Unsafe.AsRef(&Handle->Nodes); /// /// To be documented. /// public ref ImVector Requests => ref Unsafe.AsRef>(&Handle->Requests); /// /// To be documented. /// public ref ImVector NodesSettings => ref Unsafe.AsRef>(&Handle->NodesSettings); /// /// To be documented. /// public ref bool WantFullRebuild => ref Unsafe.AsRef(&Handle->WantFullRebuild); /// /// To be documented. /// public unsafe void Destroy() { ImGui.DestroyNative(Handle); } } }