// ------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// ------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using HexaGen.Runtime;
using System.Numerics;
namespace Dalamud.Bindings.ImGui
{
///
/// To be documented.
///
[StructLayout(LayoutKind.Sequential)]
public partial struct ImGuiInputTextState
{
///
/// To be documented.
///
public uint ID;
///
/// To be documented.
///
public int CurLenW;
///
/// To be documented.
///
public int CurLenA;
///
/// To be documented.
///
public ImVector TextW;
///
/// To be documented.
///
public ImVector TextA;
///
/// To be documented.
///
public ImVector InitialTextA;
///
/// To be documented.
///
public byte TextAIsValid;
///
/// To be documented.
///
public int BufCapacityA;
///
/// To be documented.
///
public float ScrollX;
///
/// To be documented.
///
public STBTexteditState Stb;
///
/// To be documented.
///
public float CursorAnim;
///
/// To be documented.
///
public byte CursorFollow;
///
/// To be documented.
///
public byte SelectedAllMouseLock;
///
/// To be documented.
///
public byte Edited;
///
/// To be documented.
///
public ImGuiInputTextFlags Flags;
///
/// To be documented.
///
public unsafe ImGuiInputTextState(uint id = default, int curLenW = default, int curLenA = default, ImVector textW = default, ImVector textA = default, ImVector initialTextA = default, bool textAIsValid = default, int bufCapacityA = default, float scrollX = default, STBTexteditState stb = default, float cursorAnim = default, bool cursorFollow = default, bool selectedAllMouseLock = default, bool edited = default, ImGuiInputTextFlags flags = default)
{
ID = id;
CurLenW = curLenW;
CurLenA = curLenA;
TextW = textW;
TextA = textA;
InitialTextA = initialTextA;
TextAIsValid = textAIsValid ? (byte)1 : (byte)0;
BufCapacityA = bufCapacityA;
ScrollX = scrollX;
Stb = stb;
CursorAnim = cursorAnim;
CursorFollow = cursorFollow ? (byte)1 : (byte)0;
SelectedAllMouseLock = selectedAllMouseLock ? (byte)1 : (byte)0;
Edited = edited ? (byte)1 : (byte)0;
Flags = flags;
}
///
/// To be documented.
///
public unsafe void Destroy()
{
fixed (ImGuiInputTextState* @this = &this)
{
ImGui.DestroyNative(@this);
}
}
}
///
/// To be documented.
///
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImGuiInputTextStatePtr : IEquatable
{
public ImGuiInputTextStatePtr(ImGuiInputTextState* handle) { Handle = handle; }
public ImGuiInputTextState* Handle;
public bool IsNull => Handle == null;
public static ImGuiInputTextStatePtr Null => new ImGuiInputTextStatePtr(null);
public ImGuiInputTextState this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImGuiInputTextStatePtr(ImGuiInputTextState* handle) => new ImGuiInputTextStatePtr(handle);
public static implicit operator ImGuiInputTextState*(ImGuiInputTextStatePtr handle) => handle.Handle;
public static bool operator ==(ImGuiInputTextStatePtr left, ImGuiInputTextStatePtr right) => left.Handle == right.Handle;
public static bool operator !=(ImGuiInputTextStatePtr left, ImGuiInputTextStatePtr right) => left.Handle != right.Handle;
public static bool operator ==(ImGuiInputTextStatePtr left, ImGuiInputTextState* right) => left.Handle == right;
public static bool operator !=(ImGuiInputTextStatePtr left, ImGuiInputTextState* right) => left.Handle != right;
public bool Equals(ImGuiInputTextStatePtr other) => Handle == other.Handle;
///
public override bool Equals(object obj) => obj is ImGuiInputTextStatePtr handle && Equals(handle);
///
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImGuiInputTextStatePtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
///
/// To be documented.
///
public ref uint ID => ref Unsafe.AsRef(&Handle->ID);
///
/// To be documented.
///
public ref int CurLenW => ref Unsafe.AsRef(&Handle->CurLenW);
///
/// To be documented.
///
public ref int CurLenA => ref Unsafe.AsRef(&Handle->CurLenA);
///
/// To be documented.
///
public ref ImVector TextW => ref Unsafe.AsRef>(&Handle->TextW);
///
/// To be documented.
///
public ref ImVector TextA => ref Unsafe.AsRef>(&Handle->TextA);
///
/// To be documented.
///
public ref ImVector InitialTextA => ref Unsafe.AsRef>(&Handle->InitialTextA);
///
/// To be documented.
///
public ref bool TextAIsValid => ref Unsafe.AsRef(&Handle->TextAIsValid);
///
/// To be documented.
///
public ref int BufCapacityA => ref Unsafe.AsRef(&Handle->BufCapacityA);
///
/// To be documented.
///
public ref float ScrollX => ref Unsafe.AsRef(&Handle->ScrollX);
///
/// To be documented.
///
public ref STBTexteditState Stb => ref Unsafe.AsRef(&Handle->Stb);
///
/// To be documented.
///
public ref float CursorAnim => ref Unsafe.AsRef(&Handle->CursorAnim);
///
/// To be documented.
///
public ref bool CursorFollow => ref Unsafe.AsRef(&Handle->CursorFollow);
///
/// To be documented.
///
public ref bool SelectedAllMouseLock => ref Unsafe.AsRef(&Handle->SelectedAllMouseLock);
///
/// To be documented.
///
public ref bool Edited => ref Unsafe.AsRef(&Handle->Edited);
///
/// To be documented.
///
public ref ImGuiInputTextFlags Flags => ref Unsafe.AsRef(&Handle->Flags);
///
/// To be documented.
///
public unsafe void Destroy()
{
ImGui.DestroyNative(Handle);
}
}
}