restructure

This commit is contained in:
Soreepeong 2025-07-26 22:33:38 +09:00
parent 3381ac1c7d
commit b53a97408b
263 changed files with 2221 additions and 1191 deletions

View file

@ -6,7 +6,7 @@ namespace Dalamud.Bindings.ImGui;
public static unsafe partial class ImGuiP
{
public static void DebugLog(Utf8Buffer text)
public static void DebugLog(ImU8String text)
{
var g = ImGui.GetCurrentContext().Handle;
ImGui.append(&g->DebugLogBuf, $"[{g->FrameCount:00000}] ");
@ -31,7 +31,7 @@ public static unsafe partial class ImGuiP
public static int FindRenderedTextEnd(
ReadOnlySpan<char> text, out ReadOnlySpan<char> before, out ReadOnlySpan<char> after)
{
var textBuf = new Utf8Buffer(text);
var textBuf = new ImU8String(text);
FindRenderedTextEnd(textBuf.Span, out var beforeBytes, out var afterBytes);
before = text[..Encoding.UTF8.GetCharCount(beforeBytes)];
after = text[before.Length..];
@ -39,7 +39,7 @@ public static unsafe partial class ImGuiP
return before.Length;
}
public static uint GetID(ImGuiWindowPtr self, Utf8Buffer str)
public static uint GetID(ImGuiWindowPtr self, ImU8String str)
{
fixed (byte* strPtr = str.Span)
{
@ -61,7 +61,7 @@ public static unsafe partial class ImGuiP
fixed (byte* ptr = data) return ImGuiPNative.ImHashData(ptr, (nuint)data.Length, seed);
}
public static uint ImHashStr(Utf8Buffer data, uint seed = 0)
public static uint ImHashStr(ImU8String data, uint seed = 0)
{
fixed (byte* ptr = data.Span)
{
@ -130,7 +130,7 @@ public static unsafe partial class ImGuiP
return i;
}
public static void LogRenderedText(scoped in Vector2 refPos, Utf8Buffer text)
public static void LogRenderedText(scoped in Vector2 refPos, ImU8String text)
{
fixed (Vector2* refPosPtr = &refPos)
fixed (byte* textPtr = text.Span)
@ -138,7 +138,7 @@ public static unsafe partial class ImGuiP
text.Dispose();
}
public static void RenderText(Vector2 pos, Utf8Buffer text, bool hideTextAfterHash = true)
public static void RenderText(Vector2 pos, ImU8String text, bool hideTextAfterHash = true)
{
fixed (byte* textPtr = text.Span)
ImGuiPNative.RenderText(pos, textPtr, textPtr + text.Length, hideTextAfterHash ? (byte)1 : (byte)0);
@ -146,7 +146,7 @@ public static unsafe partial class ImGuiP
}
public static void RenderTextWrapped(
Vector2 pos, Utf8Buffer text, float wrapWidth)
Vector2 pos, ImU8String text, float wrapWidth)
{
fixed (byte* textPtr = text.Span)
ImGuiPNative.RenderTextWrapped(pos, textPtr, textPtr + text.Length, wrapWidth);
@ -154,7 +154,7 @@ public static unsafe partial class ImGuiP
}
public static void RenderTextClipped(
scoped in Vector2 posMin, scoped in Vector2 posMax, Utf8Buffer text,
scoped in Vector2 posMin, scoped in Vector2 posMax, ImU8String text,
scoped in Vector2? textSizeIfKnown = null,
scoped in Vector2 align = default, scoped in ImRect? clipRect = null)
{
@ -174,7 +174,7 @@ public static unsafe partial class ImGuiP
public static void RenderTextClippedEx(
ImDrawListPtr drawList, scoped in Vector2 posMin, scoped in Vector2 posMax,
Utf8Buffer text,
ImU8String text,
scoped in Vector2? textSizeIfKnown = null, scoped in Vector2 align = default, scoped in ImRect? clipRect = null)
{
var textSizeIfKnownOrDefault = textSizeIfKnown ?? default;
@ -194,7 +194,7 @@ public static unsafe partial class ImGuiP
public static void RenderTextEllipsis(
ImDrawListPtr drawList, scoped in Vector2 posMin, scoped in Vector2 posMax, float clipMaxX, float ellipsisMaxX,
Utf8Buffer text, scoped in Vector2? textSizeIfKnown = null)
ImU8String text, scoped in Vector2? textSizeIfKnown = null)
{
var textSizeIfKnownOrDefault = textSizeIfKnown ?? default;
fixed (byte* textPtr = text.Span)