brutal/Brutal.ImGui/Generated/Structs/ImGuiKeyData.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

202 lines
8.2 KiB
C#

// <auto-generated/>
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
namespace Brutal.ImGuiApi
{
/// <summary>
/// <para>
/// Storage for ImGuiIO and IsKeyDown(), IsKeyPressed() etc functions.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L198">imgui.h:198</see>
/// <br/><c>struct ImGuiKeyData</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Forward declarations: ImGui layer
/// </para>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 16)]
public partial struct ImGuiKeyData
{
/// <summary>
/// <para>
/// True for if key is down
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2432">imgui.h:2432</see>
/// <br/><c>bool Down</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions.
/// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)-&gt;DownDuration and *NOT* io.KeysData[key]-&gt;DownDuration.
/// </code>
/// </remarks>
[FieldOffset(0)]
public Bool8 Down;
/// <summary>
/// <para>
/// Duration the key has been down (&lt;0.0f: not pressed, 0.0f: just pressed, &gt;0.0f: time held)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2433">imgui.h:2433</see>
/// <br/><c>float DownDuration</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions.
/// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)-&gt;DownDuration and *NOT* io.KeysData[key]-&gt;DownDuration.
/// </code>
/// </remarks>
[FieldOffset(4)]
public float DownDuration;
/// <summary>
/// <para>
/// Last frame duration the key has been down
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2434">imgui.h:2434</see>
/// <br/><c>float DownDurationPrev</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions.
/// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)-&gt;DownDuration and *NOT* io.KeysData[key]-&gt;DownDuration.
/// </code>
/// </remarks>
[FieldOffset(8)]
public float DownDurationPrev;
/// <summary>
/// <para>
/// 0.0f..1.0f for gamepad values
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2435">imgui.h:2435</see>
/// <br/><c>float AnalogValue</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions.
/// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)-&gt;DownDuration and *NOT* io.KeysData[key]-&gt;DownDuration.
/// </code>
/// </remarks>
[FieldOffset(12)]
public float AnalogValue;
}
/// <summary>
/// <para>
/// Storage for ImGuiIO and IsKeyDown(), IsKeyPressed() etc functions.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L198">imgui.h:198</see>
/// <br/><c>struct ImGuiKeyData</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Forward declarations: ImGui layer
/// </para>
/// </remarks>
public unsafe partial struct ImGuiKeyDataPtr(ImGuiKeyData* ptr) : INullable
{
private ImGuiKeyData* _ptr = ptr;
public ImGuiKeyData* Ptr => _ptr;
public bool IsNull() => _ptr is null;
public static implicit operator ImGuiKeyDataPtr(ImGuiKeyData* ptr) => new(ptr);
public static implicit operator ImGuiKeyData*(ImGuiKeyDataPtr wrapper) => wrapper.Ptr;
/// <summary>
/// <para>
/// True for if key is down
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2432">imgui.h:2432</see>
/// <br/><c>bool Down</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions.
/// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)-&gt;DownDuration and *NOT* io.KeysData[key]-&gt;DownDuration.
/// </code>
/// </remarks>
public ref bool Down => ref Unsafe.AsRef<bool>(&_ptr->Down);
/// <summary>
/// <para>
/// Duration the key has been down (&lt;0.0f: not pressed, 0.0f: just pressed, &gt;0.0f: time held)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2433">imgui.h:2433</see>
/// <br/><c>float DownDuration</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions.
/// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)-&gt;DownDuration and *NOT* io.KeysData[key]-&gt;DownDuration.
/// </code>
/// </remarks>
public ref float DownDuration => ref Unsafe.AsRef<float>(&_ptr->DownDuration);
/// <summary>
/// <para>
/// Last frame duration the key has been down
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2434">imgui.h:2434</see>
/// <br/><c>float DownDurationPrev</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions.
/// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)-&gt;DownDuration and *NOT* io.KeysData[key]-&gt;DownDuration.
/// </code>
/// </remarks>
public ref float DownDurationPrev => ref Unsafe.AsRef<float>(&_ptr->DownDurationPrev);
/// <summary>
/// <para>
/// 0.0f..1.0f for gamepad values
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2435">imgui.h:2435</see>
/// <br/><c>float AnalogValue</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions.
/// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)-&gt;DownDuration and *NOT* io.KeysData[key]-&gt;DownDuration.
/// </code>
/// </remarks>
public ref float AnalogValue => ref Unsafe.AsRef<float>(&_ptr->AnalogValue);
}
}