Dalamud/imgui/Dalamud.Bindings.ImGui/Generated/Structs/ImGuiInputEvent.cs
2025-04-06 21:08:34 +02:00

204 lines
5.5 KiB
C#
Generated

// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using HexaGen.Runtime;
using System.Numerics;
namespace Dalamud.Bindings.ImGui
{
/// <summary>
/// To be documented.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public partial struct ImGuiInputEvent
{
/// <summary>
/// To be documented.
/// </summary>
[StructLayout(LayoutKind.Explicit)]
public partial struct ImGuiInputEventUnion
{
/// <summary>
/// To be documented.
/// </summary>
[FieldOffset(0)]
public ImGuiInputEventMousePos MousePos;
/// <summary>
/// To be documented.
/// </summary>
[FieldOffset(0)]
public ImGuiInputEventMouseWheel MouseWheel;
/// <summary>
/// To be documented.
/// </summary>
[FieldOffset(0)]
public ImGuiInputEventMouseButton MouseButton;
/// <summary>
/// To be documented.
/// </summary>
[FieldOffset(0)]
public ImGuiInputEventMouseViewport MouseViewport;
/// <summary>
/// To be documented.
/// </summary>
[FieldOffset(0)]
public ImGuiInputEventKey Key;
/// <summary>
/// To be documented.
/// </summary>
[FieldOffset(0)]
public ImGuiInputEventText Text;
/// <summary>
/// To be documented.
/// </summary>
[FieldOffset(0)]
public ImGuiInputEventAppFocused AppFocused;
/// <summary>
/// To be documented.
/// </summary>
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;
}
}
/// <summary>
/// To be documented.
/// </summary>
public ImGuiInputEventType Type;
/// <summary>
/// To be documented.
/// </summary>
public ImGuiInputSource Source;
/// <summary>
/// To be documented.
/// </summary>
public ImGuiInputEventUnion Union;
/// <summary>
/// To be documented.
/// </summary>
public byte AddedByTestEngine;
/// <summary>
/// To be documented.
/// </summary>
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;
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Destroy()
{
fixed (ImGuiInputEvent* @this = &this)
{
ImGui.DestroyNative(@this);
}
}
}
/// <summary>
/// To be documented.
/// </summary>
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImGuiInputEventPtr : IEquatable<ImGuiInputEventPtr>
{
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;
/// <inheritdoc/>
public override bool Equals(object obj) => obj is ImGuiInputEventPtr handle && Equals(handle);
/// <inheritdoc/>
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
/// <summary>
/// To be documented.
/// </summary>
public ref ImGuiInputEventType Type => ref Unsafe.AsRef<ImGuiInputEventType>(&Handle->Type);
/// <summary>
/// To be documented.
/// </summary>
public ref ImGuiInputSource Source => ref Unsafe.AsRef<ImGuiInputSource>(&Handle->Source);
/// <summary>
/// To be documented.
/// </summary>
public ref ImGuiInputEvent.ImGuiInputEventUnion Union => ref Unsafe.AsRef<ImGuiInputEvent.ImGuiInputEventUnion>(&Handle->Union);
/// <summary>
/// To be documented.
/// </summary>
public ref bool AddedByTestEngine => ref Unsafe.AsRef<bool>(&Handle->AddedByTestEngine);
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Destroy()
{
ImGui.DestroyNative(Handle);
}
}
}