// ------------------------------------------------------------------------------ // // 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 { /// /// [Internal] Key+Value for ImGuiStorage
///
[StructLayout(LayoutKind.Sequential)] public partial struct ImGuiStoragePair { /// /// To be documented. /// [StructLayout(LayoutKind.Explicit)] public partial struct ImGuiStoragePairUnion { /// /// To be documented. /// [FieldOffset(0)] public int ValI; /// /// To be documented. /// [FieldOffset(0)] public float ValF; /// /// To be documented. /// [FieldOffset(0)] public unsafe void* ValP; /// /// To be documented. /// public unsafe ImGuiStoragePairUnion(int valI = default, float valF = default, void* valP = default) { ValI = valI; ValF = valF; ValP = valP; } } /// /// To be documented. /// public uint Key; /// /// To be documented. /// public ImGuiStoragePairUnion Union; /// /// To be documented. /// public unsafe ImGuiStoragePair(uint key = default, ImGuiStoragePairUnion union = default) { Key = key; Union = union; } /// /// To be documented. /// public unsafe void Destroy() { fixed (ImGuiStoragePair* @this = &this) { ImGui.DestroyNative(@this); } } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImGuiStoragePairPtr : IEquatable { public ImGuiStoragePairPtr(ImGuiStoragePair* handle) { Handle = handle; } public ImGuiStoragePair* Handle; public bool IsNull => Handle == null; public static ImGuiStoragePairPtr Null => new ImGuiStoragePairPtr(null); public ImGuiStoragePair this[int index] { get => Handle[index]; set => Handle[index] = value; } public static implicit operator ImGuiStoragePairPtr(ImGuiStoragePair* handle) => new ImGuiStoragePairPtr(handle); public static implicit operator ImGuiStoragePair*(ImGuiStoragePairPtr handle) => handle.Handle; public static bool operator ==(ImGuiStoragePairPtr left, ImGuiStoragePairPtr right) => left.Handle == right.Handle; public static bool operator !=(ImGuiStoragePairPtr left, ImGuiStoragePairPtr right) => left.Handle != right.Handle; public static bool operator ==(ImGuiStoragePairPtr left, ImGuiStoragePair* right) => left.Handle == right; public static bool operator !=(ImGuiStoragePairPtr left, ImGuiStoragePair* right) => left.Handle != right; public bool Equals(ImGuiStoragePairPtr other) => Handle == other.Handle; /// public override bool Equals(object obj) => obj is ImGuiStoragePairPtr handle && Equals(handle); /// public override int GetHashCode() => ((nuint)Handle).GetHashCode(); #if NET5_0_OR_GREATER private string DebuggerDisplay => string.Format("ImGuiStoragePairPtr [0x{0}]", ((nuint)Handle).ToString("X")); #endif /// /// To be documented. /// public ref uint Key => ref Unsafe.AsRef(&Handle->Key); /// /// To be documented. /// public ref ImGuiStoragePair.ImGuiStoragePairUnion Union => ref Unsafe.AsRef(&Handle->Union); /// /// To be documented. /// public unsafe void Destroy() { ImGui.DestroyNative(Handle); } } }