Use custom GetPinnableReference instead of deferring it to Span (#2345)

This commit is contained in:
srkizer 2025-08-07 01:03:50 +09:00 committed by GitHub
parent 2cd5c5bc68
commit 3e40cad063
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 107 additions and 52 deletions

View file

@ -3,6 +3,7 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiInputTextCallbackData
{
public readonly Span<byte> BufSpan => new(this.Buf, this.BufSize);
public readonly Span<byte> BufTextSpan => new(this.Buf, this.BufTextLen);
public void InsertChars(int pos, ImU8String text)
@ -15,6 +16,7 @@ public unsafe partial struct ImGuiInputTextCallbackData
public unsafe partial struct ImGuiInputTextCallbackDataPtr
{
public readonly Span<byte> BufSpan => this.Handle->BufSpan;
public readonly Span<byte> BufTextSpan => this.Handle->BufTextSpan;
public void InsertChars(int pos, ImU8String text) => ImGui.InsertChars(this, pos, text);