mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
119 lines
3.4 KiB
C#
Generated
119 lines
3.4 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 ImGuiKeyData
|
|
{
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public byte Down;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public float DownDuration;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public float DownDurationPrev;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public float AnalogValue;
|
|
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe ImGuiKeyData(bool down = default, float downDuration = default, float downDurationPrev = default, float analogValue = default)
|
|
{
|
|
Down = down ? (byte)1 : (byte)0;
|
|
DownDuration = downDuration;
|
|
DownDurationPrev = downDurationPrev;
|
|
AnalogValue = analogValue;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
#if NET5_0_OR_GREATER
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
#endif
|
|
public unsafe struct ImGuiKeyDataPtr : IEquatable<ImGuiKeyDataPtr>
|
|
{
|
|
public ImGuiKeyDataPtr(ImGuiKeyData* handle) { Handle = handle; }
|
|
|
|
public ImGuiKeyData* Handle;
|
|
|
|
public bool IsNull => Handle == null;
|
|
|
|
public static ImGuiKeyDataPtr Null => new ImGuiKeyDataPtr(null);
|
|
|
|
public ImGuiKeyData this[int index] { get => Handle[index]; set => Handle[index] = value; }
|
|
|
|
public static implicit operator ImGuiKeyDataPtr(ImGuiKeyData* handle) => new ImGuiKeyDataPtr(handle);
|
|
|
|
public static implicit operator ImGuiKeyData*(ImGuiKeyDataPtr handle) => handle.Handle;
|
|
|
|
public static bool operator ==(ImGuiKeyDataPtr left, ImGuiKeyDataPtr right) => left.Handle == right.Handle;
|
|
|
|
public static bool operator !=(ImGuiKeyDataPtr left, ImGuiKeyDataPtr right) => left.Handle != right.Handle;
|
|
|
|
public static bool operator ==(ImGuiKeyDataPtr left, ImGuiKeyData* right) => left.Handle == right;
|
|
|
|
public static bool operator !=(ImGuiKeyDataPtr left, ImGuiKeyData* right) => left.Handle != right;
|
|
|
|
public bool Equals(ImGuiKeyDataPtr other) => Handle == other.Handle;
|
|
|
|
/// <inheritdoc/>
|
|
public override bool Equals(object obj) => obj is ImGuiKeyDataPtr handle && Equals(handle);
|
|
|
|
/// <inheritdoc/>
|
|
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
|
|
|
|
#if NET5_0_OR_GREATER
|
|
private string DebuggerDisplay => string.Format("ImGuiKeyDataPtr [0x{0}]", ((nuint)Handle).ToString("X"));
|
|
#endif
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref bool Down => ref Unsafe.AsRef<bool>(&Handle->Down);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref float DownDuration => ref Unsafe.AsRef<float>(&Handle->DownDuration);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref float DownDurationPrev => ref Unsafe.AsRef<float>(&Handle->DownDurationPrev);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref float AnalogValue => ref Unsafe.AsRef<float>(&Handle->AnalogValue);
|
|
}
|
|
|
|
}
|