mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-20 14:57:45 +01:00
Manual overloads for ImGui functions accepting text (#2319)
* wip2 * Implement AutoUtf8Buffer * reformat * Work on manual bindings * restructure * Name scripts properly * Update utility functions to use ImU8String * add overloads * Add more overloads * Use ImGuiWindow from gen, support AddCallback * Use LibraryImport for custom ImGuiNative functinos * Make manual overloads for string-returning functinos * Make all overloads with self as its first parameter extension methods * Fix overload resolution by removing unnecessary * in => scoped in * Fix compilation errors
This commit is contained in:
parent
0c63541864
commit
c69329f592
293 changed files with 61312 additions and 754 deletions
|
|
@ -0,0 +1,177 @@
|
|||
// <auto-generated/>
|
||||
|
||||
using HexaGen.Runtime;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Dalamud.Bindings.ImGui;
|
||||
|
||||
public unsafe partial struct ImFont
|
||||
{
|
||||
public unsafe void AddGlyph(ImFontConfig* srcCfg, ushort c, int textureIndex, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advanceX)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
ImGuiNative.AddGlyph(@this, srcCfg, c, textureIndex, x0, y0, x1, y1, u0, v0, u1, v1, advanceX);
|
||||
}
|
||||
}
|
||||
public unsafe void AddGlyph(ref ImFontConfig srcCfg, ushort c, int textureIndex, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advanceX)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
fixed (ImFontConfig* psrcCfg = &srcCfg)
|
||||
{
|
||||
ImGuiNative.AddGlyph(@this, (ImFontConfig*)psrcCfg, c, textureIndex, x0, y0, x1, y1, u0, v0, u1, v1, advanceX);
|
||||
}
|
||||
}
|
||||
}
|
||||
public unsafe void AddKerningPair(ushort leftC, ushort rightC, float distanceAdjustment)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
ImGuiNative.AddKerningPair(@this, leftC, rightC, distanceAdjustment);
|
||||
}
|
||||
}
|
||||
public unsafe void AddRemapChar(ushort dst, ushort src, bool overwriteDst)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
ImGuiNative.AddRemapChar(@this, dst, src, overwriteDst ? (byte)1 : (byte)0);
|
||||
}
|
||||
}
|
||||
public unsafe void AddRemapChar(ushort dst, ushort src)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
ImGuiNative.AddRemapChar(@this, dst, src, (byte)(1));
|
||||
}
|
||||
}
|
||||
public unsafe void BuildLookupTable()
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
ImGuiNative.BuildLookupTable(@this);
|
||||
}
|
||||
}
|
||||
public unsafe void ClearOutputData()
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
ImGuiNative.ClearOutputData(@this);
|
||||
}
|
||||
}
|
||||
public unsafe void Destroy()
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
ImGuiNative.Destroy(@this);
|
||||
}
|
||||
}
|
||||
public unsafe ImFontGlyph* FindGlyph(ushort c)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
ImFontGlyph* ret = ImGuiNative.FindGlyph(@this, c);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
public unsafe ImFontGlyph* FindGlyphNoFallback(ushort c)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
ImFontGlyph* ret = ImGuiNative.FindGlyphNoFallback(@this, c);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
public unsafe float GetCharAdvance(ushort c)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
float ret = ImGuiNative.GetCharAdvance(@this, c);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
public unsafe float GetDistanceAdjustmentForPair(ushort leftC, ushort rightC)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
float ret = ImGuiNative.GetDistanceAdjustmentForPair(@this, leftC, rightC);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
public unsafe float GetDistanceAdjustmentForPairFromHotData(ushort leftC, ImFontGlyphHotData* rightCInfo)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
float ret = ImGuiNative.GetDistanceAdjustmentForPairFromHotData(@this, leftC, rightCInfo);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
public unsafe float GetDistanceAdjustmentForPairFromHotData(ushort leftC, ref ImFontGlyphHotData rightCInfo)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
fixed (ImFontGlyphHotData* prightCInfo = &rightCInfo)
|
||||
{
|
||||
float ret = ImGuiNative.GetDistanceAdjustmentForPairFromHotData(@this, leftC, (ImFontGlyphHotData*)prightCInfo);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
public unsafe void GrowIndex(int newSize)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
ImGuiNative.GrowIndex(@this, newSize);
|
||||
}
|
||||
}
|
||||
public unsafe bool IsGlyphRangeUnused(uint cBegin, uint cLast)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
byte ret = ImGuiNative.IsGlyphRangeUnused(@this, cBegin, cLast);
|
||||
return ret != 0;
|
||||
}
|
||||
}
|
||||
public unsafe bool IsLoaded()
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
byte ret = ImGuiNative.IsLoaded(@this);
|
||||
return ret != 0;
|
||||
}
|
||||
}
|
||||
public unsafe void RenderChar(ImDrawListPtr drawList, float size, Vector2 pos, uint col, ushort c)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
ImGuiNative.RenderChar(@this, drawList, size, pos, col, c);
|
||||
}
|
||||
}
|
||||
public unsafe void RenderChar(ref ImDrawList drawList, float size, Vector2 pos, uint col, ushort c)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
fixed (ImDrawList* pdrawList = &drawList)
|
||||
{
|
||||
ImGuiNative.RenderChar(@this, (ImDrawList*)pdrawList, size, pos, col, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
public unsafe void SetGlyphVisible(ushort c, bool visible)
|
||||
{
|
||||
fixed (ImFont* @this = &this)
|
||||
{
|
||||
ImGuiNative.SetGlyphVisible(@this, c, visible ? (byte)1 : (byte)0);
|
||||
}
|
||||
}
|
||||
}
|
||||
// DISCARDED: CalcWordWrapPositionA
|
||||
// DISCARDED: CalcWordWrapPositionAS
|
||||
// DISCARDED: GetDebugName
|
||||
// DISCARDED: GetDebugNameS
|
||||
// DISCARDED: RenderText
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue