mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
544 lines
12 KiB
C#
544 lines
12 KiB
C#
// ------------------------------------------------------------------------------
|
|
// <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>
|
|
/// Helper: Key->Value storage<br/>
|
|
/// Typically you don't have to worry about this since a storage is held within each Window.<br/>
|
|
/// We use it to e.g. store collapse state for a tree (Int 01)<br/>
|
|
/// This is optimized for efficient lookup (dichotomy into a contiguous buffer) and rare insertion (typically tied to user interactions aka max once a frame)<br/>
|
|
/// You can use it as custom user storage for temporary values. Declare your own storage if, for example:<br/>
|
|
/// - You want to manipulate the openclose state of a particular sub-tree in your interface (tree node uses Int 01 to store their state).<br/>
|
|
/// - You want to store custom debug data easily without adding or editing structures in your code (probably not efficient, but convenient)<br/>
|
|
/// Types are NOT stored, so it is up to you to make sure your Key don't collide with different types.<br/>
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public partial struct ImGuiStorage
|
|
{
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ImVector<ImGuiStoragePair> Data;
|
|
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe ImGuiStorage(ImVector<ImGuiStoragePair> data = default)
|
|
{
|
|
Data = data;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void BuildSortByKey()
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
ImGui.BuildSortByKeyNative(@this);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void Clear()
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
ImGui.ClearNative(@this);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
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;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe bool GetBool(uint key)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
byte ret = ImGui.GetBoolNative(@this, key, (byte)(0));
|
|
return ret != 0;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
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;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe bool* GetBoolRef(uint key)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
bool* ret = ImGui.GetBoolRefNative(@this, key, (byte)(0));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe float GetFloat(uint key, float defaultVal)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
float ret = ImGui.GetFloatNative(@this, key, defaultVal);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe float GetFloat(uint key)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
float ret = ImGui.GetFloatNative(@this, key, (float)(0.0f));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe float* GetFloatRef(uint key, float defaultVal)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
float* ret = ImGui.GetFloatRefNative(@this, key, defaultVal);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe float* GetFloatRef(uint key)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
float* ret = ImGui.GetFloatRefNative(@this, key, (float)(0.0f));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe int GetInt(uint key, int defaultVal)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
int ret = ImGui.GetIntNative(@this, key, defaultVal);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe int GetInt(uint key)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
int ret = ImGui.GetIntNative(@this, key, (int)(0));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe int* GetIntRef(uint key, int defaultVal)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
int* ret = ImGui.GetIntRefNative(@this, key, defaultVal);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe int* GetIntRef(uint key)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
int* ret = ImGui.GetIntRefNative(@this, key, (int)(0));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void* GetVoidPtr(uint key)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
void* ret = ImGui.GetVoidPtrNative(@this, key);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void** GetVoidPtrRef(uint key, void* defaultVal)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
void** ret = ImGui.GetVoidPtrRefNative(@this, key, defaultVal);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void** GetVoidPtrRef(uint key)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
void** ret = ImGui.GetVoidPtrRefNative(@this, key, (void*)(default));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void SetAllInt(int val)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
ImGui.SetAllIntNative(@this, val);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void SetBool(uint key, bool val)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
ImGui.SetBoolNative(@this, key, val ? (byte)1 : (byte)0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void SetFloat(uint key, float val)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
ImGui.SetFloatNative(@this, key, val);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void SetInt(uint key, int val)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
ImGui.SetIntNative(@this, key, val);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void SetVoidPtr(uint key, void* val)
|
|
{
|
|
fixed (ImGuiStorage* @this = &this)
|
|
{
|
|
ImGui.SetVoidPtrNative(@this, key, val);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
#if NET5_0_OR_GREATER
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
#endif
|
|
public unsafe struct ImGuiStoragePtr : IEquatable<ImGuiStoragePtr>
|
|
{
|
|
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;
|
|
|
|
/// <inheritdoc/>
|
|
public override bool Equals(object obj) => obj is ImGuiStoragePtr handle && Equals(handle);
|
|
|
|
/// <inheritdoc/>
|
|
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
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref ImVector<ImGuiStoragePair> Data => ref Unsafe.AsRef<ImVector<ImGuiStoragePair>>(&Handle->Data);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void BuildSortByKey()
|
|
{
|
|
ImGui.BuildSortByKeyNative(Handle);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void Clear()
|
|
{
|
|
ImGui.ClearNative(Handle);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe bool GetBool(uint key, bool defaultVal)
|
|
{
|
|
byte ret = ImGui.GetBoolNative(Handle, key, defaultVal ? (byte)1 : (byte)0);
|
|
return ret != 0;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe bool GetBool(uint key)
|
|
{
|
|
byte ret = ImGui.GetBoolNative(Handle, key, (byte)(0));
|
|
return ret != 0;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe bool* GetBoolRef(uint key, bool defaultVal)
|
|
{
|
|
bool* ret = ImGui.GetBoolRefNative(Handle, key, defaultVal ? (byte)1 : (byte)0);
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe bool* GetBoolRef(uint key)
|
|
{
|
|
bool* ret = ImGui.GetBoolRefNative(Handle, key, (byte)(0));
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe float GetFloat(uint key, float defaultVal)
|
|
{
|
|
float ret = ImGui.GetFloatNative(Handle, key, defaultVal);
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe float GetFloat(uint key)
|
|
{
|
|
float ret = ImGui.GetFloatNative(Handle, key, (float)(0.0f));
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe float* GetFloatRef(uint key, float defaultVal)
|
|
{
|
|
float* ret = ImGui.GetFloatRefNative(Handle, key, defaultVal);
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe float* GetFloatRef(uint key)
|
|
{
|
|
float* ret = ImGui.GetFloatRefNative(Handle, key, (float)(0.0f));
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe int GetInt(uint key, int defaultVal)
|
|
{
|
|
int ret = ImGui.GetIntNative(Handle, key, defaultVal);
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe int GetInt(uint key)
|
|
{
|
|
int ret = ImGui.GetIntNative(Handle, key, (int)(0));
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe int* GetIntRef(uint key, int defaultVal)
|
|
{
|
|
int* ret = ImGui.GetIntRefNative(Handle, key, defaultVal);
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe int* GetIntRef(uint key)
|
|
{
|
|
int* ret = ImGui.GetIntRefNative(Handle, key, (int)(0));
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void* GetVoidPtr(uint key)
|
|
{
|
|
void* ret = ImGui.GetVoidPtrNative(Handle, key);
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void** GetVoidPtrRef(uint key, void* defaultVal)
|
|
{
|
|
void** ret = ImGui.GetVoidPtrRefNative(Handle, key, defaultVal);
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void** GetVoidPtrRef(uint key)
|
|
{
|
|
void** ret = ImGui.GetVoidPtrRefNative(Handle, key, (void*)(default));
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void SetAllInt(int val)
|
|
{
|
|
ImGui.SetAllIntNative(Handle, val);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void SetBool(uint key, bool val)
|
|
{
|
|
ImGui.SetBoolNative(Handle, key, val ? (byte)1 : (byte)0);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void SetFloat(uint key, float val)
|
|
{
|
|
ImGui.SetFloatNative(Handle, key, val);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void SetInt(uint key, int val)
|
|
{
|
|
ImGui.SetIntNative(Handle, key, val);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void SetVoidPtr(uint key, void* val)
|
|
{
|
|
ImGui.SetVoidPtrNative(Handle, key, val);
|
|
}
|
|
|
|
}
|
|
|
|
}
|