mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
move bindings around
This commit is contained in:
parent
1bce618684
commit
b5a8bfe399
546 changed files with 8 additions and 8 deletions
120
imgui/Dalamud.Bindings.ImGui/Generated/Structs/ImGuiKeyData.cs
Normal file
120
imgui/Dalamud.Bindings.ImGui/Generated/Structs/ImGuiKeyData.cs
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
// ------------------------------------------------------------------------------
|
||||
// <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>
|
||||
/// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions.<br/>
|
||||
/// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)->DownDuration and *NOT* io.KeysData[key]->DownDuration.<br/>
|
||||
/// </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);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue