//
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
namespace Brutal.ImGuiApi
{
///
///
/// Storage for ImGuiIO and IsKeyDown(), IsKeyPressed() etc functions.
///
///
/// C++:
/// imgui.h:198
///
struct ImGuiKeyData
///
///
///
///
/// Forward declarations: ImGui layer
///
///
[StructLayout(LayoutKind.Explicit, Size = 16)]
public partial struct ImGuiKeyData
{
///
///
/// True for if key is down
///
///
/// C++:
/// imgui.h:2432
///
bool Down
///
///
///
///
/// [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)->DownDuration and *NOT* io.KeysData[key]->DownDuration.
///
///
[FieldOffset(0)]
public Bool8 Down;
///
///
/// Duration the key has been down (<0.0f: not pressed, 0.0f: just pressed, >0.0f: time held)
///
///
/// C++:
/// imgui.h:2433
///
float DownDuration
///
///
///
///
/// [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)->DownDuration and *NOT* io.KeysData[key]->DownDuration.
///
///
[FieldOffset(4)]
public float DownDuration;
///
///
/// Last frame duration the key has been down
///
///
/// C++:
/// imgui.h:2434
///
float DownDurationPrev
///
///
///
///
/// [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)->DownDuration and *NOT* io.KeysData[key]->DownDuration.
///
///
[FieldOffset(8)]
public float DownDurationPrev;
///
///
/// 0.0f..1.0f for gamepad values
///
///
/// C++:
/// imgui.h:2435
///
float AnalogValue
///
///
///
///
/// [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)->DownDuration and *NOT* io.KeysData[key]->DownDuration.
///
///
[FieldOffset(12)]
public float AnalogValue;
}
///
///
/// Storage for ImGuiIO and IsKeyDown(), IsKeyPressed() etc functions.
///
///
/// C++:
/// imgui.h:198
///
struct ImGuiKeyData
///
///
///
///
/// Forward declarations: ImGui layer
///
///
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;
///
///
/// True for if key is down
///
///
/// C++:
/// imgui.h:2432
///
bool Down
///
///
///
///
/// [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)->DownDuration and *NOT* io.KeysData[key]->DownDuration.
///
///
public ref bool Down => ref Unsafe.AsRef(&_ptr->Down);
///
///
/// Duration the key has been down (<0.0f: not pressed, 0.0f: just pressed, >0.0f: time held)
///
///
/// C++:
/// imgui.h:2433
///
float DownDuration
///
///
///
///
/// [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)->DownDuration and *NOT* io.KeysData[key]->DownDuration.
///
///
public ref float DownDuration => ref Unsafe.AsRef(&_ptr->DownDuration);
///
///
/// Last frame duration the key has been down
///
///
/// C++:
/// imgui.h:2434
///
float DownDurationPrev
///
///
///
///
/// [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)->DownDuration and *NOT* io.KeysData[key]->DownDuration.
///
///
public ref float DownDurationPrev => ref Unsafe.AsRef(&_ptr->DownDurationPrev);
///
///
/// 0.0f..1.0f for gamepad values
///
///
/// C++:
/// imgui.h:2435
///
float AnalogValue
///
///
///
///
/// [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)->DownDuration and *NOT* io.KeysData[key]->DownDuration.
///
///
public ref float AnalogValue => ref Unsafe.AsRef(&_ptr->AnalogValue);
}
}