// ------------------------------------------------------------------------------ // // 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 ImGuiStyleMod { /// /// To be documented. /// [StructLayout(LayoutKind.Explicit)] public partial struct ImGuiStyleModUnion { /// /// To be documented. /// [FieldOffset(0)] public int BackupInt_0; [FieldOffset(8)] public int BackupInt_1; /// /// To be documented. /// [FieldOffset(0)] public float BackupFloat_0; [FieldOffset(8)] public float BackupFloat_1; /// /// To be documented. /// public unsafe ImGuiStyleModUnion(int* backupInt = default, float* backupFloat = default) { if (backupInt != default(int*)) { BackupInt_0 = backupInt[0]; BackupInt_1 = backupInt[1]; } if (backupFloat != default(float*)) { BackupFloat_0 = backupFloat[0]; BackupFloat_1 = backupFloat[1]; } } /// /// To be documented. /// public unsafe ImGuiStyleModUnion(Span backupInt = default, Span backupFloat = default) { if (backupInt != default(Span)) { BackupInt_0 = backupInt[0]; BackupInt_1 = backupInt[1]; } if (backupFloat != default(Span)) { BackupFloat_0 = backupFloat[0]; BackupFloat_1 = backupFloat[1]; } } } /// /// To be documented. /// public ImGuiStyleVar VarIdx; /// /// To be documented. /// public ImGuiStyleModUnion Union; /// /// To be documented. /// public unsafe ImGuiStyleMod(ImGuiStyleVar varIdx = default, ImGuiStyleModUnion union = default) { VarIdx = varIdx; Union = union; } /// /// To be documented. /// public unsafe void Destroy() { fixed (ImGuiStyleMod* @this = &this) { ImGui.DestroyNative(@this); } } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImGuiStyleModPtr : IEquatable { public ImGuiStyleModPtr(ImGuiStyleMod* handle) { Handle = handle; } public ImGuiStyleMod* Handle; public bool IsNull => Handle == null; public static ImGuiStyleModPtr Null => new ImGuiStyleModPtr(null); public ImGuiStyleMod this[int index] { get => Handle[index]; set => Handle[index] = value; } public static implicit operator ImGuiStyleModPtr(ImGuiStyleMod* handle) => new ImGuiStyleModPtr(handle); public static implicit operator ImGuiStyleMod*(ImGuiStyleModPtr handle) => handle.Handle; public static bool operator ==(ImGuiStyleModPtr left, ImGuiStyleModPtr right) => left.Handle == right.Handle; public static bool operator !=(ImGuiStyleModPtr left, ImGuiStyleModPtr right) => left.Handle != right.Handle; public static bool operator ==(ImGuiStyleModPtr left, ImGuiStyleMod* right) => left.Handle == right; public static bool operator !=(ImGuiStyleModPtr left, ImGuiStyleMod* right) => left.Handle != right; public bool Equals(ImGuiStyleModPtr other) => Handle == other.Handle; /// public override bool Equals(object obj) => obj is ImGuiStyleModPtr handle && Equals(handle); /// public override int GetHashCode() => ((nuint)Handle).GetHashCode(); #if NET5_0_OR_GREATER private string DebuggerDisplay => string.Format("ImGuiStyleModPtr [0x{0}]", ((nuint)Handle).ToString("X")); #endif /// /// To be documented. /// public ref ImGuiStyleVar VarIdx => ref Unsafe.AsRef(&Handle->VarIdx); /// /// To be documented. /// public ref ImGuiStyleMod.ImGuiStyleModUnion Union => ref Unsafe.AsRef(&Handle->Union); /// /// To be documented. /// public unsafe void Destroy() { ImGui.DestroyNative(Handle); } } }