Work on manual bindings

This commit is contained in:
Soreepeong 2025-07-23 01:18:48 +09:00
parent f391ac57d3
commit 3381ac1c7d
37 changed files with 2596 additions and 48072 deletions

View file

@ -12958,22 +12958,6 @@ namespace Dalamud.Bindings.ImGui
{
Data = data;
}
public unsafe void** GetVoidPtrRef(uint key, void* defaultVal)
{
fixed (ImGuiStorage* @this = &this)
{
void** ret = ImGuiNative.GetVoidPtrRef(@this, key, defaultVal);
return ret;
}
}
public unsafe void** GetVoidPtrRef(uint key)
{
fixed (ImGuiStorage* @this = &this)
{
void** ret = ImGuiNative.GetVoidPtrRef(@this, key, (void*)(default));
return ret;
}
}
}
[DebuggerDisplay("{DebuggerDisplay,nq}")]
@ -12997,16 +12981,6 @@ namespace Dalamud.Bindings.ImGui
private string DebuggerDisplay => string.Format("ImGuiStoragePtr [0x{0}]", ((nuint)Handle).ToString("X"));
public ref ImVector<ImGuiStoragePair> Data => ref Unsafe.AsRef<ImVector<ImGuiStoragePair>>(&Handle->Data);
public unsafe void** GetVoidPtrRef(uint key, void* defaultVal)
{
void** ret = ImGuiNative.GetVoidPtrRef(Handle, key, defaultVal);
return ret;
}
public unsafe void** GetVoidPtrRef(uint key)
{
void** ret = ImGuiNative.GetVoidPtrRef(Handle, key, (void*)(default));
return ret;
}
}
}
/* ImGuiStoragePair.cs */

File diff suppressed because it is too large Load diff

View file

@ -18,75 +18,6 @@ public unsafe partial struct ImGuiIO
ImGuiNative.AddFocusEvent(@this, focused ? (byte)1 : (byte)0);
}
}
public unsafe void AddInputCharacter(uint c)
{
fixed (ImGuiIO* @this = &this)
{
ImGuiNative.AddInputCharacter(@this, c);
}
}
public unsafe void AddInputCharactersUTF8(byte* str)
{
fixed (ImGuiIO* @this = &this)
{
ImGuiNative.AddInputCharactersUTF8(@this, str);
}
}
public unsafe void AddInputCharactersUTF8(ref byte str)
{
fixed (ImGuiIO* @this = &this)
{
fixed (byte* pstr = &str)
{
ImGuiNative.AddInputCharactersUTF8(@this, (byte*)pstr);
}
}
}
public unsafe void AddInputCharactersUTF8(ReadOnlySpan<byte> str)
{
fixed (ImGuiIO* @this = &this)
{
fixed (byte* pstr = str)
{
ImGuiNative.AddInputCharactersUTF8(@this, (byte*)pstr);
}
}
}
public unsafe void AddInputCharactersUTF8(string str)
{
fixed (ImGuiIO* @this = &this)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (str != null)
{
pStrSize0 = Utils.GetByteCountUTF8(str);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGuiNative.AddInputCharactersUTF8(@this, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
public unsafe void AddInputCharacterUTF16(ushort c)
{
fixed (ImGuiIO* @this = &this)
{
ImGuiNative.AddInputCharacterUTF16(@this, c);
}
}
public unsafe void AddKeyAnalogEvent(ImGuiKey key, bool down, float v)
{
fixed (ImGuiIO* @this = &this)
@ -172,4 +103,7 @@ public unsafe partial struct ImGuiIO
}
}
}
// DISCARDED: AddInputCharacter
// DISCARDED: AddInputCharactersUTF8
// DISCARDED: AddInputCharacterUTF16

View file

@ -15,57 +15,6 @@ public unsafe partial struct ImGuiIOPtr
{
ImGuiNative.AddFocusEvent(Handle, focused ? (byte)1 : (byte)0);
}
public unsafe void AddInputCharacter(uint c)
{
ImGuiNative.AddInputCharacter(Handle, c);
}
public unsafe void AddInputCharactersUTF8(byte* str)
{
ImGuiNative.AddInputCharactersUTF8(Handle, str);
}
public unsafe void AddInputCharactersUTF8(ref byte str)
{
fixed (byte* pstr = &str)
{
ImGuiNative.AddInputCharactersUTF8(Handle, (byte*)pstr);
}
}
public unsafe void AddInputCharactersUTF8(ReadOnlySpan<byte> str)
{
fixed (byte* pstr = str)
{
ImGuiNative.AddInputCharactersUTF8(Handle, (byte*)pstr);
}
}
public unsafe void AddInputCharactersUTF8(string str)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (str != null)
{
pStrSize0 = Utils.GetByteCountUTF8(str);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGuiNative.AddInputCharactersUTF8(Handle, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
public unsafe void AddInputCharacterUTF16(ushort c)
{
ImGuiNative.AddInputCharacterUTF16(Handle, c);
}
public unsafe void AddKeyAnalogEvent(ImGuiKey key, bool down, float v)
{
ImGuiNative.AddKeyAnalogEvent(Handle, key, down ? (byte)1 : (byte)0, v);
@ -115,4 +64,7 @@ public unsafe partial struct ImGuiIOPtr
ImGuiNative.SetKeyEventNativeData(Handle, key, nativeKeycode, nativeScancode, (int)(-1));
}
}
// DISCARDED: AddInputCharacter
// DISCARDED: AddInputCharactersUTF8
// DISCARDED: AddInputCharacterUTF16

File diff suppressed because it is too large Load diff

View file

@ -25,65 +25,6 @@ public unsafe partial struct ImGuiPayload
ImGuiNative.Destroy(@this);
}
}
public unsafe bool IsDataType(byte* type)
{
fixed (ImGuiPayload* @this = &this)
{
byte ret = ImGuiNative.IsDataType(@this, type);
return ret != 0;
}
}
public unsafe bool IsDataType(ref byte type)
{
fixed (ImGuiPayload* @this = &this)
{
fixed (byte* ptype = &type)
{
byte ret = ImGuiNative.IsDataType(@this, (byte*)ptype);
return ret != 0;
}
}
}
public unsafe bool IsDataType(ReadOnlySpan<byte> type)
{
fixed (ImGuiPayload* @this = &this)
{
fixed (byte* ptype = type)
{
byte ret = ImGuiNative.IsDataType(@this, (byte*)ptype);
return ret != 0;
}
}
}
public unsafe bool IsDataType(string type)
{
fixed (ImGuiPayload* @this = &this)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (type != null)
{
pStrSize0 = Utils.GetByteCountUTF8(type);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(type, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
byte ret = ImGuiNative.IsDataType(@this, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret != 0;
}
}
public unsafe bool IsDelivery()
{
fixed (ImGuiPayload* @this = &this)
@ -101,4 +42,5 @@ public unsafe partial struct ImGuiPayload
}
}
}
// DISCARDED: IsDataType

View file

@ -19,53 +19,6 @@ public unsafe partial struct ImGuiPayloadPtr
{
ImGuiNative.Destroy(Handle);
}
public unsafe bool IsDataType(byte* type)
{
byte ret = ImGuiNative.IsDataType(Handle, type);
return ret != 0;
}
public unsafe bool IsDataType(ref byte type)
{
fixed (byte* ptype = &type)
{
byte ret = ImGuiNative.IsDataType(Handle, (byte*)ptype);
return ret != 0;
}
}
public unsafe bool IsDataType(ReadOnlySpan<byte> type)
{
fixed (byte* ptype = type)
{
byte ret = ImGuiNative.IsDataType(Handle, (byte*)ptype);
return ret != 0;
}
}
public unsafe bool IsDataType(string type)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (type != null)
{
pStrSize0 = Utils.GetByteCountUTF8(type);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(type, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
byte ret = ImGuiNative.IsDataType(Handle, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret != 0;
}
public unsafe bool IsDelivery()
{
byte ret = ImGuiNative.IsDelivery(Handle);
@ -77,4 +30,5 @@ public unsafe partial struct ImGuiPayloadPtr
return ret != 0;
}
}
// DISCARDED: IsDataType

View file

@ -32,140 +32,6 @@ public unsafe partial struct ImGuiTextFilter
ImGuiNative.Destroy(@this);
}
}
public unsafe bool Draw(byte* label, float width)
{
fixed (ImGuiTextFilter* @this = &this)
{
byte ret = ImGuiNative.Draw(@this, label, width);
return ret != 0;
}
}
public unsafe bool Draw(byte* label)
{
fixed (ImGuiTextFilter* @this = &this)
{
byte ret = ImGuiNative.Draw(@this, label, (float)(0.0f));
return ret != 0;
}
}
public unsafe bool Draw()
{
fixed (ImGuiTextFilter* @this = &this)
{
bool ret = ImGui.Draw(@this, (string)"Filter(inc,-exc)", (float)(0.0f));
return ret;
}
}
public unsafe bool Draw(float width)
{
fixed (ImGuiTextFilter* @this = &this)
{
bool ret = ImGui.Draw(@this, (string)"Filter(inc,-exc)", width);
return ret;
}
}
public unsafe bool Draw(ref byte label, float width)
{
fixed (ImGuiTextFilter* @this = &this)
{
fixed (byte* plabel = &label)
{
byte ret = ImGuiNative.Draw(@this, (byte*)plabel, width);
return ret != 0;
}
}
}
public unsafe bool Draw(ref byte label)
{
fixed (ImGuiTextFilter* @this = &this)
{
fixed (byte* plabel = &label)
{
byte ret = ImGuiNative.Draw(@this, (byte*)plabel, (float)(0.0f));
return ret != 0;
}
}
}
public unsafe bool Draw(ReadOnlySpan<byte> label, float width)
{
fixed (ImGuiTextFilter* @this = &this)
{
fixed (byte* plabel = label)
{
byte ret = ImGuiNative.Draw(@this, (byte*)plabel, width);
return ret != 0;
}
}
}
public unsafe bool Draw(ReadOnlySpan<byte> label)
{
fixed (ImGuiTextFilter* @this = &this)
{
fixed (byte* plabel = label)
{
byte ret = ImGuiNative.Draw(@this, (byte*)plabel, (float)(0.0f));
return ret != 0;
}
}
}
public unsafe bool Draw(string label, float width)
{
fixed (ImGuiTextFilter* @this = &this)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (label != null)
{
pStrSize0 = Utils.GetByteCountUTF8(label);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
byte ret = ImGuiNative.Draw(@this, pStr0, width);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret != 0;
}
}
public unsafe bool Draw(string label)
{
fixed (ImGuiTextFilter* @this = &this)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (label != null)
{
pStrSize0 = Utils.GetByteCountUTF8(label);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
byte ret = ImGuiNative.Draw(@this, pStr0, (float)(0.0f));
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret != 0;
}
}
public unsafe bool IsActive()
{
fixed (ImGuiTextFilter* @this = &this)
@ -175,5 +41,6 @@ public unsafe partial struct ImGuiTextFilter
}
}
}
// DISCARDED: Draw
// DISCARDED: PassFilter

View file

@ -23,115 +23,12 @@ public unsafe partial struct ImGuiTextFilterPtr
{
ImGuiNative.Destroy(Handle);
}
public unsafe bool Draw(byte* label, float width)
{
byte ret = ImGuiNative.Draw(Handle, label, width);
return ret != 0;
}
public unsafe bool Draw(byte* label)
{
byte ret = ImGuiNative.Draw(Handle, label, (float)(0.0f));
return ret != 0;
}
public unsafe bool Draw()
{
bool ret = ImGui.Draw(Handle, (string)"Filter(inc,-exc)", (float)(0.0f));
return ret;
}
public unsafe bool Draw(float width)
{
bool ret = ImGui.Draw(Handle, (string)"Filter(inc,-exc)", width);
return ret;
}
public unsafe bool Draw(ref byte label, float width)
{
fixed (byte* plabel = &label)
{
byte ret = ImGuiNative.Draw(Handle, (byte*)plabel, width);
return ret != 0;
}
}
public unsafe bool Draw(ref byte label)
{
fixed (byte* plabel = &label)
{
byte ret = ImGuiNative.Draw(Handle, (byte*)plabel, (float)(0.0f));
return ret != 0;
}
}
public unsafe bool Draw(ReadOnlySpan<byte> label, float width)
{
fixed (byte* plabel = label)
{
byte ret = ImGuiNative.Draw(Handle, (byte*)plabel, width);
return ret != 0;
}
}
public unsafe bool Draw(ReadOnlySpan<byte> label)
{
fixed (byte* plabel = label)
{
byte ret = ImGuiNative.Draw(Handle, (byte*)plabel, (float)(0.0f));
return ret != 0;
}
}
public unsafe bool Draw(string label, float width)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (label != null)
{
pStrSize0 = Utils.GetByteCountUTF8(label);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
byte ret = ImGuiNative.Draw(Handle, pStr0, width);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret != 0;
}
public unsafe bool Draw(string label)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (label != null)
{
pStrSize0 = Utils.GetByteCountUTF8(label);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
byte ret = ImGuiNative.Draw(Handle, pStr0, (float)(0.0f));
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret != 0;
}
public unsafe bool IsActive()
{
byte ret = ImGuiNative.IsActive(Handle);
return ret != 0;
}
}
// DISCARDED: Draw
// DISCARDED: PassFilter