mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
1162 lines
28 KiB
C#
Generated
1162 lines
28 KiB
C#
Generated
// ------------------------------------------------------------------------------
|
|
// <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>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public partial struct ImGuiInputTextCallbackData
|
|
{
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ImGuiInputTextFlags EventFlag;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ImGuiInputTextFlags Flags;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void* UserData;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ushort EventChar;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ImGuiKey EventKey;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe byte* Buf;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public int BufTextLen;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public int BufSize;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public byte BufDirty;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public int CursorPos;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public int SelectionStart;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public int SelectionEnd;
|
|
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe ImGuiInputTextCallbackData(ImGuiInputTextFlags eventFlag = default, ImGuiInputTextFlags flags = default, void* userData = default, ushort eventChar = default, ImGuiKey eventKey = default, byte* buf = default, int bufTextLen = default, int bufSize = default, bool bufDirty = default, int cursorPos = default, int selectionStart = default, int selectionEnd = default)
|
|
{
|
|
EventFlag = eventFlag;
|
|
Flags = flags;
|
|
UserData = userData;
|
|
EventChar = eventChar;
|
|
EventKey = eventKey;
|
|
Buf = buf;
|
|
BufTextLen = bufTextLen;
|
|
BufSize = bufSize;
|
|
BufDirty = bufDirty ? (byte)1 : (byte)0;
|
|
CursorPos = cursorPos;
|
|
SelectionStart = selectionStart;
|
|
SelectionEnd = selectionEnd;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void ClearSelection()
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
ImGui.ClearSelectionNative(@this);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void DeleteChars(int pos, int bytesCount)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
ImGui.DeleteCharsNative(@this, pos, bytesCount);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void Destroy()
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
ImGui.DestroyNative(@this);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe bool HasSelection()
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
byte ret = ImGui.HasSelectionNative(@this);
|
|
return ret != 0;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, byte* text, byte* textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, text, textEnd);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, byte* text)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, text, (byte*)(default));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ref byte text, byte* textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, (byte*)ptext, textEnd);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ref byte text)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, (byte*)ptext, (byte*)(default));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ReadOnlySpan<byte> text, byte* textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, (byte*)ptext, textEnd);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ReadOnlySpan<byte> text)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, (byte*)ptext, (byte*)(default));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, string text, byte* textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
ImGui.InsertCharsNative(@this, pos, pStr0, textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, string text)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
ImGui.InsertCharsNative(@this, pos, pStr0, (byte*)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, byte* text, ref byte textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, text, (byte*)ptextEnd);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, byte* text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, text, (byte*)ptextEnd);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, byte* text, string textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
ImGui.InsertCharsNative(@this, pos, text, pStr0);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ref byte text, ref byte textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, (byte*)ptext, (byte*)ptextEnd);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, (byte*)ptext, (byte*)ptextEnd);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, string text, string textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
ImGui.InsertCharsNative(@this, pos, pStr0, pStr1);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ref byte text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, (byte*)ptext, (byte*)ptextEnd);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ref byte text, string textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
ImGui.InsertCharsNative(@this, pos, (byte*)ptext, pStr0);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ReadOnlySpan<byte> text, ref byte textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, (byte*)ptext, (byte*)ptextEnd);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ReadOnlySpan<byte> text, string textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
ImGui.InsertCharsNative(@this, pos, (byte*)ptext, pStr0);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, string text, ref byte textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, pStr0, (byte*)ptextEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, string text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(@this, pos, pStr0, (byte*)ptextEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void SelectAll()
|
|
{
|
|
fixed (ImGuiInputTextCallbackData* @this = &this)
|
|
{
|
|
ImGui.SelectAllNative(@this);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
#if NET5_0_OR_GREATER
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
#endif
|
|
public unsafe struct ImGuiInputTextCallbackDataPtr : IEquatable<ImGuiInputTextCallbackDataPtr>
|
|
{
|
|
public ImGuiInputTextCallbackDataPtr(ImGuiInputTextCallbackData* handle) { Handle = handle; }
|
|
|
|
public ImGuiInputTextCallbackData* Handle;
|
|
|
|
public bool IsNull => Handle == null;
|
|
|
|
public static ImGuiInputTextCallbackDataPtr Null => new ImGuiInputTextCallbackDataPtr(null);
|
|
|
|
public ImGuiInputTextCallbackData this[int index] { get => Handle[index]; set => Handle[index] = value; }
|
|
|
|
public static implicit operator ImGuiInputTextCallbackDataPtr(ImGuiInputTextCallbackData* handle) => new ImGuiInputTextCallbackDataPtr(handle);
|
|
|
|
public static implicit operator ImGuiInputTextCallbackData*(ImGuiInputTextCallbackDataPtr handle) => handle.Handle;
|
|
|
|
public static bool operator ==(ImGuiInputTextCallbackDataPtr left, ImGuiInputTextCallbackDataPtr right) => left.Handle == right.Handle;
|
|
|
|
public static bool operator !=(ImGuiInputTextCallbackDataPtr left, ImGuiInputTextCallbackDataPtr right) => left.Handle != right.Handle;
|
|
|
|
public static bool operator ==(ImGuiInputTextCallbackDataPtr left, ImGuiInputTextCallbackData* right) => left.Handle == right;
|
|
|
|
public static bool operator !=(ImGuiInputTextCallbackDataPtr left, ImGuiInputTextCallbackData* right) => left.Handle != right;
|
|
|
|
public bool Equals(ImGuiInputTextCallbackDataPtr other) => Handle == other.Handle;
|
|
|
|
/// <inheritdoc/>
|
|
public override bool Equals(object obj) => obj is ImGuiInputTextCallbackDataPtr handle && Equals(handle);
|
|
|
|
/// <inheritdoc/>
|
|
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
|
|
|
|
#if NET5_0_OR_GREATER
|
|
private string DebuggerDisplay => string.Format("ImGuiInputTextCallbackDataPtr [0x{0}]", ((nuint)Handle).ToString("X"));
|
|
#endif
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref ImGuiInputTextFlags EventFlag => ref Unsafe.AsRef<ImGuiInputTextFlags>(&Handle->EventFlag);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref ImGuiInputTextFlags Flags => ref Unsafe.AsRef<ImGuiInputTextFlags>(&Handle->Flags);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public void* UserData { get => Handle->UserData; set => Handle->UserData = value; }
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref ushort EventChar => ref Unsafe.AsRef<ushort>(&Handle->EventChar);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref ImGuiKey EventKey => ref Unsafe.AsRef<ImGuiKey>(&Handle->EventKey);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public byte* Buf { get => Handle->Buf; set => Handle->Buf = value; }
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref int BufTextLen => ref Unsafe.AsRef<int>(&Handle->BufTextLen);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref int BufSize => ref Unsafe.AsRef<int>(&Handle->BufSize);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref bool BufDirty => ref Unsafe.AsRef<bool>(&Handle->BufDirty);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref int CursorPos => ref Unsafe.AsRef<int>(&Handle->CursorPos);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref int SelectionStart => ref Unsafe.AsRef<int>(&Handle->SelectionStart);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref int SelectionEnd => ref Unsafe.AsRef<int>(&Handle->SelectionEnd);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void ClearSelection()
|
|
{
|
|
ImGui.ClearSelectionNative(Handle);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void DeleteChars(int pos, int bytesCount)
|
|
{
|
|
ImGui.DeleteCharsNative(Handle, pos, bytesCount);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void Destroy()
|
|
{
|
|
ImGui.DestroyNative(Handle);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe bool HasSelection()
|
|
{
|
|
byte ret = ImGui.HasSelectionNative(Handle);
|
|
return ret != 0;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, byte* text, byte* textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, text, textEnd);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, byte* text)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, text, (byte*)(default));
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ref byte text, byte* textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, textEnd);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ref byte text)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, (byte*)(default));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ReadOnlySpan<byte> text, byte* textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, textEnd);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ReadOnlySpan<byte> text)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, (byte*)(default));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, string text, byte* textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
ImGui.InsertCharsNative(Handle, pos, pStr0, textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, string text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
ImGui.InsertCharsNative(Handle, pos, pStr0, (byte*)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, byte* text, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, text, (byte*)ptextEnd);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, byte* text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, text, (byte*)ptextEnd);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, byte* text, string textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
ImGui.InsertCharsNative(Handle, pos, text, pStr0);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ref byte text, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, (byte*)ptextEnd);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, (byte*)ptextEnd);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, string text, string textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* pStr1 = null;
|
|
int pStrSize1 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr1 = Utils.Alloc<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
ImGui.InsertCharsNative(Handle, pos, pStr0, pStr1);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ref byte text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, (byte*)ptextEnd);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ref byte text, string textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, pStr0);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ReadOnlySpan<byte> text, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, (byte*)ptextEnd);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, ReadOnlySpan<byte> text, string textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, pStr0);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, string text, ref byte textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, pStr0, (byte*)ptextEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void InsertChars(int pos, string text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
ImGui.InsertCharsNative(Handle, pos, pStr0, (byte*)ptextEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void SelectAll()
|
|
{
|
|
ImGui.SelectAllNative(Handle);
|
|
}
|
|
|
|
}
|
|
|
|
}
|