// ------------------------------------------------------------------------------ // // 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 { /// /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack)
///
[StructLayout(LayoutKind.Sequential)] public partial struct ImGuiPopupData { /// /// To be documented. /// public uint PopupId; /// /// To be documented. /// public unsafe ImGuiWindow* Window; /// /// To be documented. /// public unsafe ImGuiWindow* SourceWindow; /// /// To be documented. /// public int ParentNavLayer; /// /// To be documented. /// public int OpenFrameCount; /// /// To be documented. /// public uint OpenParentId; /// /// To be documented. /// public Vector2 OpenPopupPos; /// /// To be documented. /// public Vector2 OpenMousePos; /// /// To be documented. /// public unsafe ImGuiPopupData(uint popupId = default, ImGuiWindowPtr window = default, ImGuiWindowPtr sourceWindow = default, int parentNavLayer = default, int openFrameCount = default, uint openParentId = default, Vector2 openPopupPos = default, Vector2 openMousePos = default) { PopupId = popupId; Window = window; SourceWindow = sourceWindow; ParentNavLayer = parentNavLayer; OpenFrameCount = openFrameCount; OpenParentId = openParentId; OpenPopupPos = openPopupPos; OpenMousePos = openMousePos; } /// /// To be documented. /// public unsafe void Destroy() { fixed (ImGuiPopupData* @this = &this) { ImGui.DestroyNative(@this); } } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImGuiPopupDataPtr : IEquatable { public ImGuiPopupDataPtr(ImGuiPopupData* handle) { Handle = handle; } public ImGuiPopupData* Handle; public bool IsNull => Handle == null; public static ImGuiPopupDataPtr Null => new ImGuiPopupDataPtr(null); public ImGuiPopupData this[int index] { get => Handle[index]; set => Handle[index] = value; } public static implicit operator ImGuiPopupDataPtr(ImGuiPopupData* handle) => new ImGuiPopupDataPtr(handle); public static implicit operator ImGuiPopupData*(ImGuiPopupDataPtr handle) => handle.Handle; public static bool operator ==(ImGuiPopupDataPtr left, ImGuiPopupDataPtr right) => left.Handle == right.Handle; public static bool operator !=(ImGuiPopupDataPtr left, ImGuiPopupDataPtr right) => left.Handle != right.Handle; public static bool operator ==(ImGuiPopupDataPtr left, ImGuiPopupData* right) => left.Handle == right; public static bool operator !=(ImGuiPopupDataPtr left, ImGuiPopupData* right) => left.Handle != right; public bool Equals(ImGuiPopupDataPtr other) => Handle == other.Handle; /// public override bool Equals(object obj) => obj is ImGuiPopupDataPtr handle && Equals(handle); /// public override int GetHashCode() => ((nuint)Handle).GetHashCode(); #if NET5_0_OR_GREATER private string DebuggerDisplay => string.Format("ImGuiPopupDataPtr [0x{0}]", ((nuint)Handle).ToString("X")); #endif /// /// To be documented. /// public ref uint PopupId => ref Unsafe.AsRef(&Handle->PopupId); /// /// To be documented. /// public ref ImGuiWindowPtr Window => ref Unsafe.AsRef(&Handle->Window); /// /// To be documented. /// public ref ImGuiWindowPtr SourceWindow => ref Unsafe.AsRef(&Handle->SourceWindow); /// /// To be documented. /// public ref int ParentNavLayer => ref Unsafe.AsRef(&Handle->ParentNavLayer); /// /// To be documented. /// public ref int OpenFrameCount => ref Unsafe.AsRef(&Handle->OpenFrameCount); /// /// To be documented. /// public ref uint OpenParentId => ref Unsafe.AsRef(&Handle->OpenParentId); /// /// To be documented. /// public ref Vector2 OpenPopupPos => ref Unsafe.AsRef(&Handle->OpenPopupPos); /// /// To be documented. /// public ref Vector2 OpenMousePos => ref Unsafe.AsRef(&Handle->OpenMousePos); /// /// To be documented. /// public unsafe void Destroy() { ImGui.DestroyNative(Handle); } } }