// ------------------------------------------------------------------------------
//
// 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 ImGuiStorage
{
///
/// To be documented.
///
public ImVector Data;
///
/// To be documented.
///
public unsafe ImGuiStorage(ImVector data = default)
{
Data = data;
}
///
/// To be documented.
///
public unsafe void BuildSortByKey()
{
fixed (ImGuiStorage* @this = &this)
{
ImGui.BuildSortByKeyNative(@this);
}
}
///
/// To be documented.
///
public unsafe void Clear()
{
fixed (ImGuiStorage* @this = &this)
{
ImGui.ClearNative(@this);
}
}
///
/// To be documented.
///
public unsafe bool GetBool(uint key, bool defaultVal)
{
fixed (ImGuiStorage* @this = &this)
{
byte ret = ImGui.GetBoolNative(@this, key, defaultVal ? (byte)1 : (byte)0);
return ret != 0;
}
}
///
/// To be documented.
///
public unsafe bool GetBool(uint key)
{
fixed (ImGuiStorage* @this = &this)
{
byte ret = ImGui.GetBoolNative(@this, key, (byte)(0));
return ret != 0;
}
}
///
/// To be documented.
///
public unsafe bool* GetBoolRef(uint key, bool defaultVal)
{
fixed (ImGuiStorage* @this = &this)
{
bool* ret = ImGui.GetBoolRefNative(@this, key, defaultVal ? (byte)1 : (byte)0);
return ret;
}
}
///
/// To be documented.
///
public unsafe bool* GetBoolRef(uint key)
{
fixed (ImGuiStorage* @this = &this)
{
bool* ret = ImGui.GetBoolRefNative(@this, key, (byte)(0));
return ret;
}
}
///
/// To be documented.
///
public unsafe float GetFloat(uint key, float defaultVal)
{
fixed (ImGuiStorage* @this = &this)
{
float ret = ImGui.GetFloatNative(@this, key, defaultVal);
return ret;
}
}
///
/// To be documented.
///
public unsafe float GetFloat(uint key)
{
fixed (ImGuiStorage* @this = &this)
{
float ret = ImGui.GetFloatNative(@this, key, (float)(0.0f));
return ret;
}
}
///
/// To be documented.
///
public unsafe float* GetFloatRef(uint key, float defaultVal)
{
fixed (ImGuiStorage* @this = &this)
{
float* ret = ImGui.GetFloatRefNative(@this, key, defaultVal);
return ret;
}
}
///
/// To be documented.
///
public unsafe float* GetFloatRef(uint key)
{
fixed (ImGuiStorage* @this = &this)
{
float* ret = ImGui.GetFloatRefNative(@this, key, (float)(0.0f));
return ret;
}
}
///
/// To be documented.
///
public unsafe int GetInt(uint key, int defaultVal)
{
fixed (ImGuiStorage* @this = &this)
{
int ret = ImGui.GetIntNative(@this, key, defaultVal);
return ret;
}
}
///
/// To be documented.
///
public unsafe int GetInt(uint key)
{
fixed (ImGuiStorage* @this = &this)
{
int ret = ImGui.GetIntNative(@this, key, (int)(0));
return ret;
}
}
///
/// To be documented.
///
public unsafe int* GetIntRef(uint key, int defaultVal)
{
fixed (ImGuiStorage* @this = &this)
{
int* ret = ImGui.GetIntRefNative(@this, key, defaultVal);
return ret;
}
}
///
/// To be documented.
///
public unsafe int* GetIntRef(uint key)
{
fixed (ImGuiStorage* @this = &this)
{
int* ret = ImGui.GetIntRefNative(@this, key, (int)(0));
return ret;
}
}
///
/// To be documented.
///
public unsafe void* GetVoidPtr(uint key)
{
fixed (ImGuiStorage* @this = &this)
{
void* ret = ImGui.GetVoidPtrNative(@this, key);
return ret;
}
}
///
/// To be documented.
///
public unsafe void** GetVoidPtrRef(uint key, void* defaultVal)
{
fixed (ImGuiStorage* @this = &this)
{
void** ret = ImGui.GetVoidPtrRefNative(@this, key, defaultVal);
return ret;
}
}
///
/// To be documented.
///
public unsafe void** GetVoidPtrRef(uint key)
{
fixed (ImGuiStorage* @this = &this)
{
void** ret = ImGui.GetVoidPtrRefNative(@this, key, (void*)(default));
return ret;
}
}
///
/// To be documented.
///
public unsafe void SetAllInt(int val)
{
fixed (ImGuiStorage* @this = &this)
{
ImGui.SetAllIntNative(@this, val);
}
}
///
/// To be documented.
///
public unsafe void SetBool(uint key, bool val)
{
fixed (ImGuiStorage* @this = &this)
{
ImGui.SetBoolNative(@this, key, val ? (byte)1 : (byte)0);
}
}
///
/// To be documented.
///
public unsafe void SetFloat(uint key, float val)
{
fixed (ImGuiStorage* @this = &this)
{
ImGui.SetFloatNative(@this, key, val);
}
}
///
/// To be documented.
///
public unsafe void SetInt(uint key, int val)
{
fixed (ImGuiStorage* @this = &this)
{
ImGui.SetIntNative(@this, key, val);
}
}
///
/// To be documented.
///
public unsafe void SetVoidPtr(uint key, void* val)
{
fixed (ImGuiStorage* @this = &this)
{
ImGui.SetVoidPtrNative(@this, key, val);
}
}
}
///
/// To be documented.
///
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImGuiStoragePtr : IEquatable
{
public ImGuiStoragePtr(ImGuiStorage* handle) { Handle = handle; }
public ImGuiStorage* Handle;
public bool IsNull => Handle == null;
public static ImGuiStoragePtr Null => new ImGuiStoragePtr(null);
public ImGuiStorage this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImGuiStoragePtr(ImGuiStorage* handle) => new ImGuiStoragePtr(handle);
public static implicit operator ImGuiStorage*(ImGuiStoragePtr handle) => handle.Handle;
public static bool operator ==(ImGuiStoragePtr left, ImGuiStoragePtr right) => left.Handle == right.Handle;
public static bool operator !=(ImGuiStoragePtr left, ImGuiStoragePtr right) => left.Handle != right.Handle;
public static bool operator ==(ImGuiStoragePtr left, ImGuiStorage* right) => left.Handle == right;
public static bool operator !=(ImGuiStoragePtr left, ImGuiStorage* right) => left.Handle != right;
public bool Equals(ImGuiStoragePtr other) => Handle == other.Handle;
///
public override bool Equals(object obj) => obj is ImGuiStoragePtr handle && Equals(handle);
///
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImGuiStoragePtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
///
/// To be documented.
///
public ref ImVector Data => ref Unsafe.AsRef>(&Handle->Data);
///
/// To be documented.
///
public unsafe void BuildSortByKey()
{
ImGui.BuildSortByKeyNative(Handle);
}
///
/// To be documented.
///
public unsafe void Clear()
{
ImGui.ClearNative(Handle);
}
///
/// To be documented.
///
public unsafe bool GetBool(uint key, bool defaultVal)
{
byte ret = ImGui.GetBoolNative(Handle, key, defaultVal ? (byte)1 : (byte)0);
return ret != 0;
}
///
/// To be documented.
///
public unsafe bool GetBool(uint key)
{
byte ret = ImGui.GetBoolNative(Handle, key, (byte)(0));
return ret != 0;
}
///
/// To be documented.
///
public unsafe bool* GetBoolRef(uint key, bool defaultVal)
{
bool* ret = ImGui.GetBoolRefNative(Handle, key, defaultVal ? (byte)1 : (byte)0);
return ret;
}
///
/// To be documented.
///
public unsafe bool* GetBoolRef(uint key)
{
bool* ret = ImGui.GetBoolRefNative(Handle, key, (byte)(0));
return ret;
}
///
/// To be documented.
///
public unsafe float GetFloat(uint key, float defaultVal)
{
float ret = ImGui.GetFloatNative(Handle, key, defaultVal);
return ret;
}
///
/// To be documented.
///
public unsafe float GetFloat(uint key)
{
float ret = ImGui.GetFloatNative(Handle, key, (float)(0.0f));
return ret;
}
///
/// To be documented.
///
public unsafe float* GetFloatRef(uint key, float defaultVal)
{
float* ret = ImGui.GetFloatRefNative(Handle, key, defaultVal);
return ret;
}
///
/// To be documented.
///
public unsafe float* GetFloatRef(uint key)
{
float* ret = ImGui.GetFloatRefNative(Handle, key, (float)(0.0f));
return ret;
}
///
/// To be documented.
///
public unsafe int GetInt(uint key, int defaultVal)
{
int ret = ImGui.GetIntNative(Handle, key, defaultVal);
return ret;
}
///
/// To be documented.
///
public unsafe int GetInt(uint key)
{
int ret = ImGui.GetIntNative(Handle, key, (int)(0));
return ret;
}
///
/// To be documented.
///
public unsafe int* GetIntRef(uint key, int defaultVal)
{
int* ret = ImGui.GetIntRefNative(Handle, key, defaultVal);
return ret;
}
///
/// To be documented.
///
public unsafe int* GetIntRef(uint key)
{
int* ret = ImGui.GetIntRefNative(Handle, key, (int)(0));
return ret;
}
///
/// To be documented.
///
public unsafe void* GetVoidPtr(uint key)
{
void* ret = ImGui.GetVoidPtrNative(Handle, key);
return ret;
}
///
/// To be documented.
///
public unsafe void** GetVoidPtrRef(uint key, void* defaultVal)
{
void** ret = ImGui.GetVoidPtrRefNative(Handle, key, defaultVal);
return ret;
}
///
/// To be documented.
///
public unsafe void** GetVoidPtrRef(uint key)
{
void** ret = ImGui.GetVoidPtrRefNative(Handle, key, (void*)(default));
return ret;
}
///
/// To be documented.
///
public unsafe void SetAllInt(int val)
{
ImGui.SetAllIntNative(Handle, val);
}
///
/// To be documented.
///
public unsafe void SetBool(uint key, bool val)
{
ImGui.SetBoolNative(Handle, key, val ? (byte)1 : (byte)0);
}
///
/// To be documented.
///
public unsafe void SetFloat(uint key, float val)
{
ImGui.SetFloatNative(Handle, key, val);
}
///
/// To be documented.
///
public unsafe void SetInt(uint key, int val)
{
ImGui.SetIntNative(Handle, key, val);
}
///
/// To be documented.
///
public unsafe void SetVoidPtr(uint key, void* val)
{
ImGui.SetVoidPtrNative(Handle, key, val);
}
}
}