// ------------------------------------------------------------------------------ // // 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 ImGuiInputEvent { /// /// To be documented. /// [StructLayout(LayoutKind.Explicit)] public partial struct ImGuiInputEventUnion { /// /// To be documented. /// [FieldOffset(0)] public ImGuiInputEventMousePos MousePos; /// /// To be documented. /// [FieldOffset(0)] public ImGuiInputEventMouseWheel MouseWheel; /// /// To be documented. /// [FieldOffset(0)] public ImGuiInputEventMouseButton MouseButton; /// /// To be documented. /// [FieldOffset(0)] public ImGuiInputEventMouseViewport MouseViewport; /// /// To be documented. /// [FieldOffset(0)] public ImGuiInputEventKey Key; /// /// To be documented. /// [FieldOffset(0)] public ImGuiInputEventText Text; /// /// To be documented. /// [FieldOffset(0)] public ImGuiInputEventAppFocused AppFocused; /// /// To be documented. /// public unsafe ImGuiInputEventUnion(ImGuiInputEventMousePos mousePos = default, ImGuiInputEventMouseWheel mouseWheel = default, ImGuiInputEventMouseButton mouseButton = default, ImGuiInputEventMouseViewport mouseViewport = default, ImGuiInputEventKey key = default, ImGuiInputEventText text = default, ImGuiInputEventAppFocused appFocused = default) { MousePos = mousePos; MouseWheel = mouseWheel; MouseButton = mouseButton; MouseViewport = mouseViewport; Key = key; Text = text; AppFocused = appFocused; } } /// /// To be documented. /// public ImGuiInputEventType Type; /// /// To be documented. /// public ImGuiInputSource Source; /// /// To be documented. /// public ImGuiInputEventUnion Union; /// /// To be documented. /// public byte AddedByTestEngine; /// /// To be documented. /// public unsafe ImGuiInputEvent(ImGuiInputEventType type = default, ImGuiInputSource source = default, ImGuiInputEventUnion union = default, bool addedByTestEngine = default) { Type = type; Source = source; Union = union; AddedByTestEngine = addedByTestEngine ? (byte)1 : (byte)0; } /// /// To be documented. /// public unsafe void Destroy() { fixed (ImGuiInputEvent* @this = &this) { ImGui.DestroyNative(@this); } } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImGuiInputEventPtr : IEquatable { public ImGuiInputEventPtr(ImGuiInputEvent* handle) { Handle = handle; } public ImGuiInputEvent* Handle; public bool IsNull => Handle == null; public static ImGuiInputEventPtr Null => new ImGuiInputEventPtr(null); public ImGuiInputEvent this[int index] { get => Handle[index]; set => Handle[index] = value; } public static implicit operator ImGuiInputEventPtr(ImGuiInputEvent* handle) => new ImGuiInputEventPtr(handle); public static implicit operator ImGuiInputEvent*(ImGuiInputEventPtr handle) => handle.Handle; public static bool operator ==(ImGuiInputEventPtr left, ImGuiInputEventPtr right) => left.Handle == right.Handle; public static bool operator !=(ImGuiInputEventPtr left, ImGuiInputEventPtr right) => left.Handle != right.Handle; public static bool operator ==(ImGuiInputEventPtr left, ImGuiInputEvent* right) => left.Handle == right; public static bool operator !=(ImGuiInputEventPtr left, ImGuiInputEvent* right) => left.Handle != right; public bool Equals(ImGuiInputEventPtr other) => Handle == other.Handle; /// public override bool Equals(object obj) => obj is ImGuiInputEventPtr handle && Equals(handle); /// public override int GetHashCode() => ((nuint)Handle).GetHashCode(); #if NET5_0_OR_GREATER private string DebuggerDisplay => string.Format("ImGuiInputEventPtr [0x{0}]", ((nuint)Handle).ToString("X")); #endif /// /// To be documented. /// public ref ImGuiInputEventType Type => ref Unsafe.AsRef(&Handle->Type); /// /// To be documented. /// public ref ImGuiInputSource Source => ref Unsafe.AsRef(&Handle->Source); /// /// To be documented. /// public ref ImGuiInputEvent.ImGuiInputEventUnion Union => ref Unsafe.AsRef(&Handle->Union); /// /// To be documented. /// public ref bool AddedByTestEngine => ref Unsafe.AsRef(&Handle->AddedByTestEngine); /// /// To be documented. /// public unsafe void Destroy() { ImGui.DestroyNative(Handle); } } }