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:
srkizer 2025-08-05 03:14:00 +09:00 committed by GitHub
parent 0c63541864
commit c69329f592
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
293 changed files with 61312 additions and 754 deletions

View file

@ -1,3 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=interface_005Cfontawesome/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Int64 x:Key="/Default/PerformanceThreshold/AnalysisFileSizeThreshold/=CSHARP/@EntryIndexedValue">300000</s:Int64>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=interface_005Cfontawesome/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=interface_005Ctextures_005Ctexturewraps_005Cinternal_005Cdrawlisttexturewrap/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View file

@ -348,7 +348,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
case WM.WM_CHAR:
if (io.WantTextInput)
{
io.AddInputCharacter((uint)wParam);
io.AddInputCharacter(new Rune((uint)wParam));
return nint.Zero;
}

View file

@ -343,31 +343,50 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer
var vertexOffset = 0;
var indexOffset = 0;
var clipOff = new Vector4(drawData.DisplayPos, drawData.DisplayPos.X, drawData.DisplayPos.Y);
this.context.Get()->PSSetShader(this.pixelShader, null, 0);
this.context.Get()->PSSetSamplers(0, 1, this.sampler.GetAddressOf());
foreach (ref var cmdList in cmdLists)
{
var cmds = new ImVectorWrapper<ImDrawCmd>(cmdList.Handle->CmdBuffer.ToUntyped());
foreach (ref var cmd in cmds.DataSpan)
{
var clipV4 = cmd.ClipRect - clipOff;
var clipRect = new RECT((int)clipV4.X, (int)clipV4.Y, (int)clipV4.Z, (int)clipV4.W);
// Skip the draw if nothing would be visible
if (clipRect.left >= clipRect.right || clipRect.top >= clipRect.bottom)
continue;
this.context.Get()->RSSetScissorRects(1, &clipRect);
if (cmd.UserCallback == null)
switch ((ImDrawCallbackEnum)(nint)cmd.UserCallback)
{
// Bind texture and draw
var srv = (ID3D11ShaderResourceView*)cmd.TextureId.Handle;
this.context.Get()->PSSetShader(this.pixelShader, null, 0);
this.context.Get()->PSSetSamplers(0, 1, this.sampler.GetAddressOf());
this.context.Get()->PSSetShaderResources(0, 1, &srv);
this.context.Get()->DrawIndexed(
cmd.ElemCount,
(uint)(cmd.IdxOffset + indexOffset),
(int)(cmd.VtxOffset + vertexOffset));
case ImDrawCallbackEnum.Empty:
{
var clipV4 = cmd.ClipRect - clipOff;
var clipRect = new RECT((int)clipV4.X, (int)clipV4.Y, (int)clipV4.Z, (int)clipV4.W);
// Skip the draw if nothing would be visible
if (clipRect.left >= clipRect.right || clipRect.top >= clipRect.bottom)
continue;
this.context.Get()->RSSetScissorRects(1, &clipRect);
// Bind texture and draw
var srv = (ID3D11ShaderResourceView*)cmd.TextureId.Handle;
this.context.Get()->PSSetShaderResources(0, 1, &srv);
this.context.Get()->DrawIndexed(
cmd.ElemCount,
(uint)(cmd.IdxOffset + indexOffset),
(int)(cmd.VtxOffset + vertexOffset));
break;
}
case ImDrawCallbackEnum.ResetRenderState:
{
// Special callback value used by the user to request the renderer to reset render state.
this.SetupRenderState(drawData);
break;
}
default:
{
// User callback, registered via ImDrawList::AddCallback()
var cb = (delegate*<ImDrawListPtr, ref ImDrawCmd, void>)cmd.UserCallback;
cb(cmdList, ref cmd);
break;
}
}
}

View file

@ -205,8 +205,8 @@ public sealed class SingleFontChooserDialog : IDisposable
/// <summary>Gets or sets a value indicating whether this popup should be modal, blocking everything behind from
/// being interacted.</summary>
/// <remarks>If <c>true</c>, then <see cref="ImGui.BeginPopupModal(string, ref bool, ImGuiWindowFlags)"/> will be
/// used. Otherwise, <see cref="ImGui.Begin(string, ref bool, ImGuiWindowFlags)"/> will be used.</remarks>
/// <remarks>If <c>true</c>, then <see cref="ImGui.BeginPopupModal(ImU8String, ref bool, ImGuiWindowFlags)"/> will be
/// used. Otherwise, <see cref="ImGui.Begin(ImU8String, ref bool, ImGuiWindowFlags)"/> will be used.</remarks>
public bool IsModal { get; set; } = true;
/// <summary>Gets or sets the window flags.</summary>
@ -558,21 +558,10 @@ public sealed class SingleFontChooserDialog : IDisposable
ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X);
using (this.fontHandle?.Push())
{
unsafe
{
fixed (byte* buf = this.fontPreviewText)
fixed (byte* label = "##fontPreviewText"u8)
{
ImGui.InputTextMultiline(
label,
buf,
(uint)this.fontPreviewText.Length,
ImGui.GetContentRegionAvail(),
ImGuiInputTextFlags.None,
null,
null);
}
}
ImGui.InputTextMultiline(
"##fontPreviewText"u8,
this.fontPreviewText,
ImGui.GetContentRegionAvail());
}
}
}
@ -608,15 +597,15 @@ public sealed class SingleFontChooserDialog : IDisposable
ref this.familySearch,
255,
ImGuiInputTextFlags.AutoSelectAll | ImGuiInputTextFlags.CallbackHistory,
data =>
(ref ImGuiInputTextCallbackData data) =>
{
if (families.Count == 0)
return 0;
var baseIndex = this.selectedFamilyIndex;
if (data->SelectionStart == 0 && data->SelectionEnd == data->BufTextLen)
if (data.SelectionStart == 0 && data.SelectionEnd == data.BufTextLen)
{
switch (data->EventKey)
switch (data.EventKey)
{
case ImGuiKey.DownArrow:
this.selectedFamilyIndex = (this.selectedFamilyIndex + 1) % families.Count;
@ -632,13 +621,13 @@ public sealed class SingleFontChooserDialog : IDisposable
if (changed)
{
ImGuiHelpers.SetTextFromCallback(
data,
ref data,
this.ExtractName(families[this.selectedFamilyIndex]));
}
}
else
{
switch (data->EventKey)
switch (data.EventKey)
{
case ImGuiKey.DownArrow:
this.selectedFamilyIndex = families.FindIndex(
@ -776,15 +765,15 @@ public sealed class SingleFontChooserDialog : IDisposable
ref this.fontSearch,
255,
ImGuiInputTextFlags.AutoSelectAll | ImGuiInputTextFlags.CallbackHistory,
data =>
(ref ImGuiInputTextCallbackData data) =>
{
if (fonts.Count == 0)
return 0;
var baseIndex = this.selectedFontIndex;
if (data->SelectionStart == 0 && data->SelectionEnd == data->BufTextLen)
if (data.SelectionStart == 0 && data.SelectionEnd == data.BufTextLen)
{
switch (data->EventKey)
switch (data.EventKey)
{
case ImGuiKey.DownArrow:
this.selectedFontIndex = (this.selectedFontIndex + 1) % fonts.Count;
@ -799,13 +788,13 @@ public sealed class SingleFontChooserDialog : IDisposable
if (changed)
{
ImGuiHelpers.SetTextFromCallback(
data,
ref data,
this.ExtractName(fonts[this.selectedFontIndex]));
}
}
else
{
switch (data->EventKey)
switch (data.EventKey)
{
case ImGuiKey.DownArrow:
this.selectedFontIndex = fonts.FindIndex(
@ -925,9 +914,9 @@ public sealed class SingleFontChooserDialog : IDisposable
255,
ImGuiInputTextFlags.AutoSelectAll | ImGuiInputTextFlags.CallbackHistory |
ImGuiInputTextFlags.CharsDecimal,
data =>
(ref ImGuiInputTextCallbackData data) =>
{
switch (data->EventKey)
switch (data.EventKey)
{
case ImGuiKey.DownArrow:
this.selectedFont = this.selectedFont with
@ -946,7 +935,7 @@ public sealed class SingleFontChooserDialog : IDisposable
}
if (changed)
ImGuiHelpers.SetTextFromCallback(data, $"{this.selectedFont.SizePt:0.##}");
ImGuiHelpers.SetTextFromCallback(ref data, $"{this.selectedFont.SizePt:0.##}");
return 0;
}))
@ -1129,19 +1118,19 @@ public sealed class SingleFontChooserDialog : IDisposable
255,
ImGuiInputTextFlags.AutoSelectAll | ImGuiInputTextFlags.CallbackHistory |
ImGuiInputTextFlags.CharsDecimal,
data =>
(ref ImGuiInputTextCallbackData data) =>
{
switch (data->EventKey)
switch (data.EventKey)
{
case ImGuiKey.DownArrow:
changed2 = true;
value = Math.Min(max, (MathF.Round(value / step) * step) + step);
ImGuiHelpers.SetTextFromCallback(data, $"{value:0.##}");
ImGuiHelpers.SetTextFromCallback(ref data, $"{value:0.##}");
break;
case ImGuiKey.UpArrow:
changed2 = true;
value = Math.Max(min, (MathF.Round(value / step) * step) - step);
ImGuiHelpers.SetTextFromCallback(data, $"{value:0.##}");
ImGuiHelpers.SetTextFromCallback(ref data, $"{value:0.##}");
break;
}

View file

@ -218,7 +218,7 @@ internal sealed partial class ActiveNotification
/// <summary>Calculates the effective expiry, taking ImGui window state into account.</summary>
/// <param name="warrantsExtension">Notification will not dismiss while this paramter is <c>true</c>.</param>
/// <returns>The calculated effective expiry.</returns>
/// <remarks>Expected to be called BETWEEN <see cref="ImGui.Begin(string)"/> and <see cref="ImGui.End()"/>.</remarks>
/// <remarks>Expected to be called BETWEEN <see cref="ImGui.Begin(ImU8String, ImGuiWindowFlags)"/> and <see cref="ImGui.End()"/>.</remarks>
private DateTime CalculateEffectiveExpiry(ref bool warrantsExtension)
{
DateTime expiry;

View file

@ -87,7 +87,7 @@ internal unsafe class UiDebug
var addonName = atkUnitBase->NameString;
var agent = Service<GameGui>.Get().FindAgentInterface(atkUnitBase);
ImGui.Text($"{addonName}");
ImGui.Text(addonName);
ImGui.SameLine();
ImGui.PushStyleColor(ImGuiCol.Text, isVisible ? 0xFF00FF00 : 0xFF0000FF);
ImGui.Text(isVisible ? "Visible" : "Not Visible");
@ -211,7 +211,7 @@ internal unsafe class UiDebug
ImGui.SameLine();
Service<SeStringRenderer>.Get().Draw(textNode->NodeText);
ImGui.InputText($"Replace Text##{(ulong)textNode:X}", textNode->NodeText.StringPtr, (uint)textNode->NodeText.BufSize);
ImGui.InputText($"Replace Text##{(ulong)textNode:X}", new(textNode->NodeText.StringPtr, (int)textNode->NodeText.BufSize));
ImGui.SameLine();
if (ImGui.Button($"Encode##{(ulong)textNode:X}"))

View file

@ -1,3 +1,5 @@
using System.Numerics;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Internal.UiDebug2.Utility;
using Dalamud.Interface.Utility.Raii;
@ -110,7 +112,7 @@ public unsafe partial class AddonTree
}
catch (Exception ex)
{
ImGui.TextColored(new(1, 0, 0, 1), $"{ex}");
ImGui.TextColored(new Vector4(1, 0, 0, 1), $"{ex}");
}
}
}

View file

@ -121,7 +121,7 @@ public unsafe partial class AddonTree : IDisposable
ImGui.SameLine();
ImGui.SameLine();
ImGui.TextColored(isVisible ? new(0.1f, 1f, 0.1f, 1f) : new(0.6f, 0.6f, 0.6f, 1), isVisible ? "Visible" : "Not Visible");
ImGui.TextColored(isVisible ? new Vector4(0.1f, 1f, 0.1f, 1f) : new(0.6f, 0.6f, 0.6f, 1), isVisible ? "Visible" : "Not Visible");
ImGui.SameLine(ImGui.GetWindowWidth() - 100);

View file

@ -57,11 +57,11 @@ public static class Events
ImGui.TableNextColumn();
ImGui.TextUnformatted($"{evt->State.StateFlags}");
ImGui.TableNextColumn();
ImGui.TextUnformatted($"{evt->State.UnkFlags1}");
ImGui.TextUnformatted($"{evt->State.ReturnFlags}");
ImGui.TableNextColumn();
ImGuiHelpers.ClickToCopyText($"{(nint)evt->Target:X}", null, new Vector4(0.6f, 0.6f, 0.6f, 1));
ImGuiHelpers.ClickToCopyText($"{(nint)evt->Target:X}", default, new Vector4(0.6f, 0.6f, 0.6f, 1));
ImGui.TableNextColumn();
ImGuiHelpers.ClickToCopyText($"{(nint)evt->Listener:X}", null, new Vector4(0.6f, 0.6f, 0.6f, 1));
ImGuiHelpers.ClickToCopyText($"{(nint)evt->Listener:X}", default, new Vector4(0.6f, 0.6f, 0.6f, 1));
evt = evt->NextEvent;
}
}

View file

@ -321,7 +321,7 @@ internal unsafe partial class TextNodeTree
ImGui.Text("Font:");
ImGui.TableNextColumn();
ImGui.SetNextItemWidth(150);
if (ImGui.Combo($"##{(nint)this.Node:X}fontType", ref fontIndex, FontNames, FontList.Count))
if (ImGui.Combo($"##{(nint)this.Node:X}fontType", ref fontIndex, FontNames))
{
this.TxtNode->FontType = FontList[fontIndex];
}

View file

@ -226,13 +226,13 @@ internal unsafe partial class ImageNodeTree : ResNodeTree
ImGui.TableNextColumn();
ImGui.TextColored(!hiRes ? new(1) : new(0.6f, 0.6f, 0.6f, 1), "Standard:\t");
ImGui.TextColored(!hiRes ? new Vector4(1) : new(0.6f, 0.6f, 0.6f, 1), "Standard:\t");
ImGui.SameLine();
var cursX = ImGui.GetCursorPosX();
PrintPartCoords(u / 2f, v / 2f, width / 2f, height / 2f);
ImGui.TextColored(hiRes ? new(1) : new(0.6f, 0.6f, 0.6f, 1), "Hi-Res:\t");
ImGui.TextColored(hiRes ? new Vector4(1) : new(0.6f, 0.6f, 0.6f, 1), "Hi-Res:\t");
ImGui.SameLine();
ImGui.SetCursorPosX(cursX);

View file

@ -1,3 +1,4 @@
using System.Numerics;
using System.Runtime.InteropServices;
using Dalamud.Bindings.ImGui;
@ -46,7 +47,7 @@ internal unsafe partial class TextNodeTree : ResNodeTree
return;
}
ImGui.TextColored(new(1), "Text:");
ImGui.TextColored(new Vector4(1), "Text:");
ImGui.SameLine();
try

View file

@ -74,7 +74,7 @@ public readonly unsafe partial struct TimelineTree
("Frame Time", $"{this.NodeTimeline->FrameTime:F2} ({this.NodeTimeline->FrameTime * 30:F0})"));
PrintFieldValuePairs(("Active Label Id", $"{this.NodeTimeline->ActiveLabelId}"), ("Duration", $"{this.NodeTimeline->LabelFrameIdxDuration}"), ("End Frame", $"{this.NodeTimeline->LabelEndFrameIdx}"));
ImGui.TextColored(new(0.6f, 0.6f, 0.6f, 1), "Animation List");
ImGui.TextColored(new Vector4(0.6f, 0.6f, 0.6f, 1), "Animation List");
for (var a = 0; a < animationCount; a++)
{

View file

@ -28,7 +28,7 @@ internal static class Gui
var grey60 = new Vector4(0.6f, 0.6f, 0.6f, 1);
if (copy)
{
ImGuiHelpers.ClickToCopyText(value, null, grey60);
ImGuiHelpers.ClickToCopyText(value, default, grey60);
}
else
{

View file

@ -68,7 +68,7 @@ public class BranchSwitcherWindow : Window
var si = Service<Dalamud>.Get().StartInfo;
var itemsArray = this.branches.Select(x => x.Key).ToArray();
ImGui.ListBox("Branch", ref this.selectedBranchIndex, itemsArray, itemsArray.Length);
ImGui.ListBox("Branch", ref this.selectedBranchIndex, itemsArray);
var pickedBranch = this.branches.ElementAt(this.selectedBranchIndex);

View file

@ -835,11 +835,9 @@ internal class ConsoleWindow : Window, IDisposable
}
}
private unsafe int CommandInputCallback(ImGuiInputTextCallbackData* data)
private int CommandInputCallback(ref ImGuiInputTextCallbackData data)
{
var ptr = new ImGuiInputTextCallbackDataPtr(data);
switch (data->EventFlag)
switch (data.EventFlag)
{
case ImGuiInputTextFlags.CallbackEdit:
this.completionZipText = null;
@ -847,9 +845,7 @@ internal class ConsoleWindow : Window, IDisposable
break;
case ImGuiInputTextFlags.CallbackCompletion:
var textBytes = new byte[data->BufTextLen];
Marshal.Copy((IntPtr)data->Buf, textBytes, 0, data->BufTextLen);
var text = Encoding.UTF8.GetString(textBytes);
var text = Encoding.UTF8.GetString(data.BufTextSpan);
var words = text.Split();
@ -894,8 +890,8 @@ internal class ConsoleWindow : Window, IDisposable
if (toComplete != null)
{
ptr.DeleteChars(0, ptr.BufTextLen);
ptr.InsertChars(0, toComplete);
data.DeleteChars(0, data.BufTextLen);
data.InsertChars(0, toComplete);
}
}
@ -904,14 +900,14 @@ internal class ConsoleWindow : Window, IDisposable
case ImGuiInputTextFlags.CallbackHistory:
var prevPos = this.historyPos;
if (ptr.EventKey == ImGuiKey.UpArrow)
if (data.EventKey == ImGuiKey.UpArrow)
{
if (this.historyPos == -1)
this.historyPos = this.configuration.LogCommandHistory.Count - 1;
else if (this.historyPos > 0)
this.historyPos--;
}
else if (data->EventKey == ImGuiKey.DownArrow)
else if (data.EventKey == ImGuiKey.DownArrow)
{
if (this.historyPos != -1)
{
@ -926,8 +922,8 @@ internal class ConsoleWindow : Window, IDisposable
{
var historyStr = this.historyPos >= 0 ? this.configuration.LogCommandHistory[this.historyPos] : string.Empty;
ptr.DeleteChars(0, ptr.BufTextLen);
ptr.InsertChars(0, historyStr);
data.DeleteChars(0, data.BufTextLen);
data.InsertChars(0, historyStr);
}
break;

View file

@ -49,7 +49,7 @@ internal static class DataWindowWidgetExtensions
{
ImGui.SetClipboardText(s);
Service<NotificationManager>.Get().AddNotification(
$"Copied {ImGui.TableGetColumnNameS()} to clipboard.",
$"Copied {ImGui.TableGetColumnName()} to clipboard.",
widget.DisplayName,
NotificationType.Success);
}

View file

@ -120,23 +120,13 @@ internal class DataShareWidget : IDataWindowWidget
ImGui.SameLine();
if (ImGui.Button("Copy"))
{
fixed (byte* pData = data)
ImGui.SetClipboardText(pData);
}
ImGui.SetClipboardText(data);
fixed (byte* pLabel = "text"u8)
fixed (byte* pData = data)
{
ImGui.InputTextMultiline(
pLabel,
pData,
(uint)data.Length,
ImGui.GetContentRegionAvail(),
ImGuiInputTextFlags.ReadOnly,
null,
null);
}
ImGui.InputTextMultiline(
"text"u8,
data,
ImGui.GetContentRegionAvail(),
ImGuiInputTextFlags.ReadOnly);
}
this.nextTab = -1;
@ -243,7 +233,7 @@ internal class DataShareWidget : IDataWindowWidget
{
ImGui.SetClipboardText(tooltip?.Invoke() ?? s);
Service<NotificationManager>.Get().AddNotification(
$"Copied {ImGui.TableGetColumnNameS()} to clipboard.",
$"Copied {ImGui.TableGetColumnName()} to clipboard.",
this.DisplayName,
NotificationType.Success);
}

View file

@ -69,7 +69,7 @@ internal class FontAwesomeTestWidget : IDataWindowWidget
ImGui.SetNextItemWidth(160f);
var categoryIndex = this.selectedIconCategory;
if (ImGui.Combo("####FontAwesomeCategorySearch", ref categoryIndex, this.iconCategories, this.iconCategories.Length))
if (ImGui.Combo("####FontAwesomeCategorySearch", ref categoryIndex, this.iconCategories))
{
this.selectedIconCategory = categoryIndex;
this.iconSearchChanged = true;

View file

@ -61,58 +61,25 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable
public unsafe void Draw()
{
ImGui.AlignTextToFramePadding();
if (ImGui.Combo("Global Scale per Font", ref this.fontScaleMode, FontScaleModes, FontScaleModes.Length))
if (ImGui.Combo("Global Scale per Font"u8, ref this.fontScaleMode, FontScaleModes))
this.ClearAtlas();
if (ImGui.Checkbox("Global Scale for Atlas"u8, ref this.atlasScaleMode))
this.ClearAtlas();
fixed (byte* labelPtr = "Global Scale for Atlas"u8)
{
var v = this.atlasScaleMode;
if (ImGui.Checkbox(labelPtr, ref v))
{
this.atlasScaleMode = v;
this.ClearAtlas();
}
}
ImGui.SameLine();
fixed (byte* labelPtr = "Word Wrap"u8)
{
var v = this.useWordWrap;
if (ImGui.Checkbox(labelPtr, &v))
this.useWordWrap = v;
}
ImGui.Checkbox("Word Wrap"u8, ref this.useWordWrap);
ImGui.SameLine();
fixed (byte* labelPtr = "Italic"u8)
{
var v = this.useItalic;
if (ImGui.Checkbox(labelPtr, &v))
{
this.useItalic = v;
this.ClearAtlas();
}
}
if (ImGui.Checkbox("Italic"u8, ref this.useItalic))
this.ClearAtlas();
ImGui.SameLine();
fixed (byte* labelPtr = "Bold"u8)
{
var v = this.useBold;
if (ImGui.Checkbox(labelPtr, &v))
{
this.useBold = v;
this.ClearAtlas();
}
}
if (ImGui.Checkbox("Bold"u8, ref this.useBold))
this.ClearAtlas();
ImGui.SameLine();
fixed (byte* labelPtr = "Minimum Range"u8)
{
var v = this.useMinimumBuild;
if (ImGui.Checkbox(labelPtr, &v))
{
this.useMinimumBuild = v;
this.ClearAtlas();
}
}
if (ImGui.Checkbox("Minimum Range"u8, ref this.useMinimumBuild))
this.ClearAtlas();
ImGui.SameLine();
if (ImGui.Button("Reset Text") || this.testStringBuffer.IsDisposed)
@ -215,12 +182,8 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable
{
if (ImGui.InputTextMultiline(
labelPtr,
this.testStringBuffer.Data,
(uint)this.testStringBuffer.Capacity,
new(ImGui.GetContentRegionAvail().X, ImGui.GetTextLineHeight() * 3),
0,
null,
null))
this.testStringBuffer.StorageSpan,
new(ImGui.GetContentRegionAvail().X, ImGui.GetTextLineHeight() * 3)))
{
var len = this.testStringBuffer.StorageSpan.IndexOf((byte)0);
if (len + 4 >= this.testStringBuffer.Capacity)
@ -293,8 +256,7 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable
}
else if (!handle.Value.Available)
{
fixed (byte* labelPtr = "Loading..."u8)
ImGui.TextUnformatted(labelPtr, labelPtr + 8 + ((Environment.TickCount / 200) % 3));
ImGui.TextUnformatted("Loading..."u8[..(8 + ((Environment.TickCount / 200) % 3))]);
}
else
{
@ -303,16 +265,12 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable
if (counter++ % 2 == 0)
{
using var pushPop = handle.Value.Push();
ImGui.TextUnformatted(
this.testStringBuffer.Data,
this.testStringBuffer.Data + this.testStringBuffer.Length);
ImGui.TextUnformatted(this.testStringBuffer.DataSpan);
}
else
{
handle.Value.Push();
ImGui.TextUnformatted(
this.testStringBuffer.Data,
this.testStringBuffer.Data + this.testStringBuffer.Length);
ImGui.TextUnformatted(this.testStringBuffer.DataSpan);
handle.Value.Pop();
}
}
@ -379,12 +337,9 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable
return;
unsafe void TestSingle(ImFontPtr fontPtr, IFontHandle handle)
void TestSingle(ImFontPtr fontPtr, IFontHandle handle)
{
var dim = default(Vector2);
var test = "Test string"u8;
fixed (byte* pTest = test)
ImGui.CalcTextSizeA(ref dim, fontPtr, fontPtr.FontSize, float.MaxValue, 0f, pTest, (string)null, null);
var dim = ImGui.CalcTextSizeA(fontPtr, fontPtr.FontSize, float.MaxValue, 0f, "Test string"u8, out _);
Log.Information($"{nameof(GamePrebakedFontsTestWidget)}: {handle} => {dim}");
}
}

View file

@ -73,17 +73,9 @@ internal class ImGuiWidget : IDataWindowWidget
ImGui.Checkbox("##manualType", ref this.notificationTemplate.ManualType);
ImGui.SameLine();
ImGui.Combo(
"Type##type",
ref this.notificationTemplate.TypeInt,
NotificationTemplate.TypeTitles,
NotificationTemplate.TypeTitles.Length);
ImGui.Combo("Type##type", ref this.notificationTemplate.TypeInt, NotificationTemplate.TypeTitles);
ImGui.Combo(
"Icon##iconCombo",
ref this.notificationTemplate.IconInt,
NotificationTemplate.IconTitles,
NotificationTemplate.IconTitles.Length);
ImGui.Combo("Icon##iconCombo", ref this.notificationTemplate.IconInt, NotificationTemplate.IconTitles);
switch (this.notificationTemplate.IconInt)
{
case 1 or 2:
@ -96,8 +88,7 @@ internal class ImGuiWidget : IDataWindowWidget
ImGui.Combo(
"Asset##iconAssetCombo",
ref this.notificationTemplate.IconAssetInt,
NotificationTemplate.AssetSources,
NotificationTemplate.AssetSources.Length);
NotificationTemplate.AssetSources);
break;
case 3 or 7:
ImGui.InputText(
@ -116,20 +107,17 @@ internal class ImGuiWidget : IDataWindowWidget
ImGui.Combo(
"Initial Duration",
ref this.notificationTemplate.InitialDurationInt,
NotificationTemplate.InitialDurationTitles,
NotificationTemplate.InitialDurationTitles.Length);
NotificationTemplate.InitialDurationTitles);
ImGui.Combo(
"Extension Duration",
ref this.notificationTemplate.HoverExtendDurationInt,
NotificationTemplate.HoverExtendDurationTitles,
NotificationTemplate.HoverExtendDurationTitles.Length);
NotificationTemplate.HoverExtendDurationTitles);
ImGui.Combo(
"Progress",
ref this.notificationTemplate.ProgressMode,
NotificationTemplate.ProgressModeTitles,
NotificationTemplate.ProgressModeTitles.Length);
NotificationTemplate.ProgressModeTitles);
ImGui.Checkbox("Respect UI Hidden", ref this.notificationTemplate.RespectUiHidden);

View file

@ -89,7 +89,7 @@ internal class NounProcessorWidget : IDataWindowWidget
var language = this.languages[this.selectedLanguageIndex];
ImGui.SetNextItemWidth(300);
if (ImGui.Combo("###SelectedSheetName", ref this.selectedSheetNameIndex, NounSheets.Select(t => t.Name).ToArray(), NounSheets.Length))
if (ImGui.Combo("###SelectedSheetName", ref this.selectedSheetNameIndex, NounSheets.Select(t => t.Name).ToArray()))
{
this.rowId = 1;
}
@ -97,7 +97,7 @@ internal class NounProcessorWidget : IDataWindowWidget
ImGui.SameLine();
ImGui.SetNextItemWidth(120);
if (ImGui.Combo("###SelectedLanguage", ref this.selectedLanguageIndex, this.languageNames, this.languageNames.Length))
if (ImGui.Combo("###SelectedLanguage", ref this.selectedLanguageIndex, this.languageNames))
{
language = this.languages[this.selectedLanguageIndex];
this.rowId = 1;
@ -107,7 +107,7 @@ internal class NounProcessorWidget : IDataWindowWidget
var sheet = dataManager.Excel.GetSheet<RawRow>(Language.English, sheetType.Name);
var minRowId = (int)sheet.FirstOrDefault().RowId;
var maxRowId = (int)sheet.LastOrDefault().RowId;
if (ImGui.InputInt("RowId###RowId", ref this.rowId, 1, 10, ImGuiInputTextFlags.AutoSelectAll))
if (ImGui.InputInt("RowId###RowId", ref this.rowId, 1, 10, flags: ImGuiInputTextFlags.AutoSelectAll))
{
if (this.rowId < minRowId)
this.rowId = minRowId;
@ -120,7 +120,7 @@ internal class NounProcessorWidget : IDataWindowWidget
ImGui.TextUnformatted($"(Range: {minRowId} - {maxRowId})");
ImGui.SetNextItemWidth(120);
if (ImGui.InputInt("Amount###Amount", ref this.amount, 1, 10, ImGuiInputTextFlags.AutoSelectAll))
if (ImGui.InputInt("Amount###Amount", ref this.amount, 1, 10, flags: ImGuiInputTextFlags.AutoSelectAll))
{
if (this.amount <= 0)
this.amount = 1;

View file

@ -568,7 +568,7 @@ internal class SeStringCreatorWidget : IDataWindowWidget
}
}).OrderBy(sheetName => sheetName, StringComparer.InvariantCulture).ToArray();
var sheetChanged = ImGui.Combo("Sheet Name", ref this.importSelectedSheetName, this.validImportSheetNames, this.validImportSheetNames.Length);
var sheetChanged = ImGui.Combo("Sheet Name", ref this.importSelectedSheetName, this.validImportSheetNames);
try
{
@ -683,7 +683,7 @@ internal class SeStringCreatorWidget : IDataWindowWidget
ImGui.TableNextColumn(); // Type
var type = (int)entry.Type;
ImGui.SetNextItemWidth(-1);
if (ImGui.Combo($"##Type{i}", ref type, ["String", "Macro", "Fixed"], 3))
if (ImGui.Combo($"##Type{i}", ref type, ["String", "Macro", "Fixed"]))
{
entry.Type = (TextEntryType)type;
updateString |= true;

View file

@ -115,7 +115,7 @@ internal unsafe class SeStringRendererTestWidget : IDataWindowWidget
ImGui.SameLine();
var t4 = this.style.ThemeIndex ?? AtkStage.Instance()->AtkUIColorHolder->ActiveColorThemeType;
ImGui.PushItemWidth(ImGui.CalcTextSize("WWWWWWWWWWWWWW").X);
if (ImGui.Combo("##theme", ref t4, ThemeNames, ThemeNames.Length))
if (ImGui.Combo("##theme", ref t4, ThemeNames))
this.style.ThemeIndex = t4;
ImGui.SameLine();
@ -265,12 +265,8 @@ internal unsafe class SeStringRendererTestWidget : IDataWindowWidget
{
if (ImGui.InputTextMultiline(
labelPtr,
this.testStringBuffer.Data,
(uint)this.testStringBuffer.Capacity,
new(ImGui.GetContentRegionAvail().X, ImGui.GetTextLineHeight() * 3),
0,
null,
null))
this.testStringBuffer.StorageSpan,
new(ImGui.GetContentRegionAvail().X, ImGui.GetTextLineHeight() * 3)))
{
var len = this.testStringBuffer.StorageSpan.IndexOf((byte)0);
if (len + 4 >= this.testStringBuffer.Capacity)
@ -278,7 +274,7 @@ internal unsafe class SeStringRendererTestWidget : IDataWindowWidget
if (len < this.testStringBuffer.Capacity)
{
this.testStringBuffer.LengthUnsafe = len;
this.testStringBuffer.StorageSpan[len] = default;
this.testStringBuffer.StorageSpan[len] = 0;
}
this.testString = string.Empty;

View file

@ -243,8 +243,8 @@ internal class TaskSchedulerWidget : IDataWindowWidget
if (ImGui.CollapsingHeader("Download"))
{
ImGui.InputText("URL", ref this.url, (uint)this.url.Length);
ImGui.InputText("Local Path", ref this.localPath, (uint)this.localPath.Length);
ImGui.InputText("URL", ref this.url);
ImGui.InputText("Local Path", ref this.localPath);
ImGui.SameLine();
if (ImGuiComponents.IconButton("##localpathpicker", FontAwesomeIcon.File))

View file

@ -71,7 +71,7 @@ internal class TexWidget : IDataWindowWidget
private enum DrawBlameTableColumnUserId
{
NativeAddress,
NativeAddress = 1,
Actions,
Name,
Width,
@ -231,7 +231,7 @@ internal class TexWidget : IDataWindowWidget
ImGui.PopID();
}
if (ImGui.CollapsingHeader($"CropCopy##{this.DrawExistingTextureModificationArgs}"))
if (ImGui.CollapsingHeader($"CropCopy##{nameof(this.DrawExistingTextureModificationArgs)}"))
{
ImGui.PushID(nameof(this.DrawExistingTextureModificationArgs));
this.DrawExistingTextureModificationArgs();
@ -709,8 +709,7 @@ internal class TexWidget : IDataWindowWidget
if (ImGui.Combo(
"Assembly",
ref this.inputManifestResourceAssemblyIndex,
this.inputManifestResourceAssemblyCandidateNames,
this.inputManifestResourceAssemblyCandidateNames.Length))
this.inputManifestResourceAssemblyCandidateNames))
{
this.inputManifestResourceNameIndex = 0;
this.inputManifestResourceNameCandidates = null;
@ -727,8 +726,7 @@ internal class TexWidget : IDataWindowWidget
ImGui.Combo(
"Name",
ref this.inputManifestResourceNameIndex,
this.inputManifestResourceNameCandidates,
this.inputManifestResourceNameCandidates.Length);
this.inputManifestResourceNameCandidates);
var name =
this.inputManifestResourceNameIndex >= 0
@ -844,15 +842,14 @@ internal class TexWidget : IDataWindowWidget
ImGui.Combo(
nameof(this.textureModificationArgs.DxgiFormat),
ref this.renderTargetChoiceInt,
this.supportedRenderTargetFormatNames,
this.supportedRenderTargetFormatNames.Length);
this.supportedRenderTargetFormatNames);
Span<int> wh = stackalloc int[2];
wh[0] = this.textureModificationArgs.NewWidth;
wh[1] = this.textureModificationArgs.NewHeight;
if (ImGui.InputInt2(
if (ImGui.InputInt(
$"{nameof(this.textureModificationArgs.NewWidth)}/{nameof(this.textureModificationArgs.NewHeight)}",
ref wh[0]))
wh))
{
this.textureModificationArgs.NewWidth = wh[0];
this.textureModificationArgs.NewHeight = wh[1];

View file

@ -41,9 +41,9 @@ internal class ToastWidget : IDataWindowWidget
ImGui.InputText("Toast text", ref this.inputTextToast, 200);
ImGui.Combo("Toast Position", ref this.toastPosition, new[] { "Bottom", "Top", }, 2);
ImGui.Combo("Toast Speed", ref this.toastSpeed, new[] { "Slow", "Fast", }, 2);
ImGui.Combo("Quest Toast Position", ref this.questToastPosition, new[] { "Centre", "Right", "Left" }, 3);
ImGui.Combo("Toast Position", ref this.toastPosition, ["Bottom", "Top"]);
ImGui.Combo("Toast Speed", ref this.toastSpeed, ["Slow", "Fast"]);
ImGui.Combo("Quest Toast Position", ref this.questToastPosition, ["Centre", "Right", "Left"]);
ImGui.Checkbox("Quest Checkmark", ref this.questToastCheckmark);
ImGui.Checkbox("Quest Play Sound", ref this.questToastSound);
ImGui.InputInt("Quest Icon ID", ref this.questToastIconId);

View file

@ -101,7 +101,7 @@ internal class UldWidget : IDataWindowWidget
}
var selectedUldPrev = this.selectedUld;
ImGui.Combo("##selectUld", ref this.selectedUld, uldNames, uldNames.Length);
ImGui.Combo("##selectUld", ref this.selectedUld, uldNames);
ImGui.SameLine();
if (ImGuiComponents.IconButton("selectUldLeft", FontAwesomeIcon.AngleLeft))
this.selectedUld = ((this.selectedUld + uldNames.Length) - 1) % uldNames.Length;
@ -117,7 +117,7 @@ internal class UldWidget : IDataWindowWidget
ClearTask(ref this.selectedUldFileTask);
}
ImGui.Combo("##selectTheme", ref this.selectedTheme, ThemeDisplayNames, ThemeDisplayNames.Length);
ImGui.Combo("##selectTheme", ref this.selectedTheme, ThemeDisplayNames);
ImGui.SameLine();
if (ImGuiComponents.IconButton("selectThemeLeft", FontAwesomeIcon.AngleLeft))
this.selectedTheme = ((this.selectedTheme + ThemeDisplayNames.Length) - 1) % ThemeDisplayNames.Length;

View file

@ -174,7 +174,7 @@ internal class ProfileManagerWidget
{
try
{
profman.ImportProfile(ImGui.GetClipboardTextS());
profman.ImportProfile(ImGui.GetClipboardText());
Service<NotificationManager>.Get().AddNotification(Locs.NotificationImportSuccess, type: NotificationType.Success);
}
catch (Exception ex)

View file

@ -210,7 +210,8 @@ public class SettingsTabLook : SettingsTab
var len = Encoding.UTF8.GetByteCount(buildingFonts);
var p = stackalloc byte[len];
Encoding.UTF8.GetBytes(buildingFonts, new(p, len));
ImGui.TextUnformatted(p, (p + len + ((Environment.TickCount / 200) % 3)) - 2);
ImGui.TextUnformatted(
new ReadOnlySpan<byte>(p, len)[..((len + ((Environment.TickCount / 200) % 3)) - 2)]);
}
}

View file

@ -70,7 +70,7 @@ public sealed class LanguageChooserSettingsEntry : SettingsEntry
public override void Draw()
{
ImGui.Text(this.Name);
ImGui.Combo("##XlLangCombo", ref this.langIndex, this.locLanguages, this.locLanguages.Length);
ImGui.Combo("##XlLangCombo", ref this.langIndex, this.locLanguages);
ImGuiHelpers.SafeTextColoredWrapped(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingsLanguageHint", "Select the language Dalamud will be displayed in."));
}
}

View file

@ -84,7 +84,7 @@ public class StyleEditorWindow : Window
var styleAry = config.SavedStyles.Select(x => x.Name).ToArray();
ImGui.Text(Loc.Localize("StyleEditorChooseStyle", "Choose Style:"));
if (ImGui.Combo("###styleChooserCombo", ref this.currentSel, styleAry, styleAry.Length))
if (ImGui.Combo("###styleChooserCombo", ref this.currentSel, styleAry))
{
var newStyle = config.SavedStyles[this.currentSel];
newStyle.Apply();
@ -166,7 +166,7 @@ public class StyleEditorWindow : Window
{
this.SaveStyle();
var styleJson = ImGui.GetClipboardTextS();
var styleJson = ImGui.GetClipboardText();
try
{
@ -245,7 +245,7 @@ public class StyleEditorWindow : Window
ImGui.Text("Alignment");
ImGui.SliderFloat2("WindowTitleAlign", ref style.WindowTitleAlign, 0.0f, 1.0f, "%.2f");
var windowMenuButtonPosition = (int)style.WindowMenuButtonPosition + 1;
if (ImGui.Combo("WindowMenuButtonPosition", ref windowMenuButtonPosition, "None\0Left\0Right\0"))
if (ImGui.Combo("WindowMenuButtonPosition", ref windowMenuButtonPosition, ["None", "Left", "Right"]))
style.WindowMenuButtonPosition = (ImGuiDir)(windowMenuButtonPosition - 1);
ImGui.SliderFloat2("ButtonTextAlign", ref style.ButtonTextAlign, 0.0f, 1.0f, "%.2f");
ImGui.SameLine();

View file

@ -54,7 +54,7 @@ public interface IDrawListTextureWrap : IDalamudTextureWrap
/// <summary>Resizes this texture and draws an ImGui window.</summary>
/// <param name="windowName">Name and ID of the window to draw. Use the value that goes into
/// <see cref="ImGui.Begin(string)"/>.</param>
/// <see cref="ImGui.Begin(ImU8String, ImGuiWindowFlags)"/>.</param>
/// <param name="scale">Scale to apply to all draw commands in the draw list.</param>
void ResizeAndDrawWindow(ReadOnlySpan<char> windowName, Vector2 scale);
}

View file

@ -1,9 +1,4 @@
using System.Diagnostics;
using System.Linq;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using Dalamud.Bindings.ImGui;
@ -15,13 +10,13 @@ internal sealed unsafe partial class DrawListTextureWrap
/// <inheritdoc/>
public void ResizeAndDrawWindow(ReadOnlySpan<char> windowName, Vector2 scale)
{
ref var window = ref ImGuiWindow.FindWindowByName(windowName);
if (Unsafe.IsNullRef(ref window))
var window = ImGuiP.FindWindowByName(windowName);
if (window.IsNull)
throw new ArgumentException("Window not found", nameof(windowName));
this.Size = window.Size;
var numDrawList = CountDrawList(ref window);
var numDrawList = CountDrawList(window);
var drawLists = stackalloc ImDrawList*[numDrawList];
var drawData = new ImDrawData
{
@ -34,7 +29,7 @@ internal sealed unsafe partial class DrawListTextureWrap
DisplaySize = window.Size,
FramebufferScale = scale,
};
AddWindowToDrawData(ref window, ref drawLists);
AddWindowToDrawData(window, ref drawLists);
for (var i = 0; i < numDrawList; i++)
{
drawData.TotalVtxCount += drawData.CmdLists[i]->VtxBuffer.Size;
@ -45,10 +40,9 @@ internal sealed unsafe partial class DrawListTextureWrap
return;
static bool IsWindowActiveAndVisible(scoped in ImGuiWindow window) =>
window.Active != 0 && window.Hidden == 0;
static bool IsWindowActiveAndVisible(ImGuiWindowPtr window) => window is { Active: true, Hidden: false };
static void AddWindowToDrawData(scoped ref ImGuiWindow window, ref ImDrawList** wptr)
static void AddWindowToDrawData(ImGuiWindowPtr window, ref ImDrawList** wptr)
{
switch (window.DrawList.CmdBuffer.Size)
{
@ -63,13 +57,13 @@ internal sealed unsafe partial class DrawListTextureWrap
for (var i = 0; i < window.DC.ChildWindows.Size; i++)
{
ref var child = ref *(ImGuiWindow*)window.DC.ChildWindows[i];
if (IsWindowActiveAndVisible(in child)) // Clipped children may have been marked not active
AddWindowToDrawData(ref child, ref wptr);
var child = window.DC.ChildWindows[i];
if (IsWindowActiveAndVisible(child)) // Clipped children may have been marked not active
AddWindowToDrawData(child, ref wptr);
}
}
static int CountDrawList(scoped ref ImGuiWindow window)
static int CountDrawList(ImGuiWindowPtr window)
{
var res = window.DrawList.CmdBuffer.Size switch
{
@ -79,51 +73,8 @@ internal sealed unsafe partial class DrawListTextureWrap
_ => 1,
};
for (var i = 0; i < window.DC.ChildWindows.Size; i++)
res += CountDrawList(ref *(ImGuiWindow*)window.DC.ChildWindows[i]);
res += CountDrawList(window.DC.ChildWindows[i]);
return res;
}
}
[StructLayout(LayoutKind.Explicit, Size = 0x448)]
private struct ImGuiWindow
{
[FieldOffset(0x048)]
public Vector2 Pos;
[FieldOffset(0x050)]
public Vector2 Size;
[FieldOffset(0x0CB)]
public byte Active;
[FieldOffset(0x0D2)]
public byte Hidden;
[FieldOffset(0x118)]
public ImGuiWindowTempData DC;
[FieldOffset(0x2C0)]
public ImDrawListPtr DrawList;
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
#pragma warning disable SA1300
public static extern ImGuiWindow* igCustom_FindWindowByName(byte* inherit);
#pragma warning restore SA1300
public static ref ImGuiWindow FindWindowByName(ReadOnlySpan<char> name)
{
var nb = Encoding.UTF8.GetByteCount(name);
var buf = stackalloc byte[nb + 1];
buf[Encoding.UTF8.GetBytes(name, new(buf, nb))] = 0;
return ref *igCustom_FindWindowByName(buf);
}
[StructLayout(LayoutKind.Explicit, Size = 0xF0)]
public struct ImGuiWindowTempData
{
[FieldOffset(0x98)]
public ImVector<nint> ChildWindows;
}
}
}

View file

@ -16,7 +16,7 @@ internal sealed unsafe class UnknownTextureWrap : IDalamudTextureWrap, IDeferred
/// <summary>Initializes a new instance of the <see cref="UnknownTextureWrap"/> class.</summary>
/// <param name="unknown">The pointer to <see cref="IUnknown"/> that is suitable for use with
/// <see cref="IDalamudTextureWrap.ImGuiHandle"/>.</param>
/// <see cref="IDalamudTextureWrap.Handle"/>.</param>
/// <param name="width">The width of the texture.</param>
/// <param name="height">The height of the texture.</param>
/// <param name="callAddRef">If <c>true</c>, call <see cref="IUnknown.AddRef"/>.</param>

View file

@ -44,7 +44,14 @@ public static class ImGuiExtensions
if (needClipping)
{
var fineClipRect = new Vector4(clipMin.X, clipMin.Y, clipMax.X, clipMax.Y);
drawListPtr.AddText(ImGui.GetFont(), ImGui.GetFontSize(), pos, ImGui.GetColorU32(ImGuiCol.Text), text, ref fineClipRect);
drawListPtr.AddText(
ImGui.GetFont(),
ImGui.GetFontSize(),
pos,
ImGui.GetColorU32(ImGuiCol.Text),
text,
0,
fineClipRect);
}
else
{

View file

@ -136,11 +136,7 @@ public static partial class ImGuiHelpers
/// <param name="name">The name/ID of the window.</param>
/// <param name="position">The position of the window.</param>
/// <param name="condition">When to set the position.</param>
public static void SetWindowPosRelativeMainViewport(string name, Vector2 position, ImGuiCond condition = ImGuiCond.None)
=> ImGui.SetWindowPos(name, position + MainViewport.Pos, condition);
/// <inheritdoc cref="SetWindowPosRelativeMainViewport(string, Vector2, ImGuiCond)"/>
public static void SetWindowPosRelativeMainViewport(ReadOnlySpan<byte> name, Vector2 position, ImGuiCond condition = ImGuiCond.None)
public static void SetWindowPosRelativeMainViewport(ImU8String name, Vector2 position, ImGuiCond condition = ImGuiCond.None)
=> ImGui.SetWindowPos(name, position + MainViewport.Pos, condition);
/// <summary>
@ -166,11 +162,7 @@ public static partial class ImGuiHelpers
/// </summary>
/// <param name="text">Text in the button.</param>
/// <returns><see cref="Vector2"/> with the size of the button.</returns>
public static Vector2 GetButtonSize(string text)
=> ImGui.CalcTextSize(text) + (ImGui.GetStyle().FramePadding * 2);
/// <inheritdoc cref="GetButtonSize(string)"/>
public static Vector2 GetButtonSize(ReadOnlySpan<byte> text)
public static Vector2 GetButtonSize(ImU8String text)
=> ImGui.CalcTextSize(text) + (ImGui.GetStyle().FramePadding * 2);
/// <summary>
@ -179,11 +171,8 @@ public static partial class ImGuiHelpers
/// <param name="text">The text to show.</param>
/// <param name="textCopy">The text to copy when clicked.</param>
/// <param name="color">The color of the text.</param>
public static void ClickToCopyText(string text, string? textCopy = null, Vector4? color = null)
public static void ClickToCopyText(ImU8String text, ImU8String textCopy = default, Vector4? color = null)
{
text ??= string.Empty;
textCopy ??= text;
using (var col = new ImRaii.Color())
{
if (color.HasValue)
@ -191,7 +180,7 @@ public static partial class ImGuiHelpers
col.Push(ImGuiCol.Text, color.Value);
}
ImGui.TextUnformatted(text);
ImGui.TextUnformatted(text.Span);
}
if (ImGui.IsItemHovered())
@ -206,52 +195,17 @@ public static partial class ImGuiHelpers
}
ImGui.SameLine();
ImGui.TextUnformatted(textCopy);
ImGui.TextUnformatted(textCopy.IsNull ? text.Span : textCopy.Span);
}
}
if (ImGui.IsItemClicked())
{
ImGui.SetClipboardText(textCopy);
}
}
/// <inheritdoc cref="ClickToCopyText(string, string?, Vector4?)"/>
public static void ClickToCopyText(ReadOnlySpan<byte> text, ReadOnlySpan<byte> textCopy = default, Vector4? color = null)
{
if (textCopy.IsEmpty)
textCopy = text;
using (var col = new ImRaii.Color())
{
if (color.HasValue)
{
col.Push(ImGuiCol.Text, color.Value);
}
ImGui.TextUnformatted(text);
ImGui.SetClipboardText(textCopy.IsNull ? text.Span : textCopy.Span);
}
if (ImGui.IsItemHovered())
{
ImGui.SetMouseCursor(ImGuiMouseCursor.Hand);
using (ImRaii.Tooltip())
{
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.TextUnformatted(FontAwesomeIcon.Copy.ToIconString());
}
ImGui.SameLine();
ImGui.TextUnformatted(textCopy);
}
}
if (ImGui.IsItemClicked())
{
ImGui.SetClipboardText(textCopy);
}
text.Dispose();
textCopy.Dispose();
}
/// <summary>Draws a SeString.</summary>
@ -285,32 +239,14 @@ public static partial class ImGuiHelpers
/// Write unformatted text wrapped.
/// </summary>
/// <param name="text">The text to write.</param>
public static void SafeTextWrapped(string text) => ImGui.TextWrapped(text.Replace("%", "%%"));
/// <inheritdoc cref="SafeTextWrapped(string)"/>
public static void SafeTextWrapped(ReadOnlySpan<byte> text)
{
if (text.Contains((byte)'%'))
ImGui.TextWrapped(Encoding.UTF8.GetString(text).Replace("%", "%%"));
else
ImGui.TextWrapped(text);
}
public static void SafeTextWrapped(ImU8String text) => ImGui.TextWrapped(text);
/// <summary>
/// Write unformatted text wrapped.
/// </summary>
/// <param name="color">The color of the text.</param>
/// <param name="text">The text to write.</param>
public static void SafeTextColoredWrapped(Vector4 color, string text)
{
using (ImRaii.PushColor(ImGuiCol.Text, color))
{
SafeTextWrapped(text);
}
}
/// <inheritdoc cref="SafeTextColoredWrapped(Vector4, string)"/>
public static void SafeTextColoredWrapped(Vector4 color, ReadOnlySpan<byte> text)
public static void SafeTextColoredWrapped(Vector4 color, ImU8String text)
{
using (ImRaii.PushColor(ImGuiCol.Text, color))
{
@ -510,16 +446,9 @@ public static partial class ImGuiHelpers
/// Show centered text.
/// </summary>
/// <param name="text">Text to show.</param>
public static void CenteredText(string text)
public static void CenteredText(ImU8String text)
{
CenterCursorForText(text);
ImGui.TextUnformatted(text);
}
/// <inheritdoc cref="CenteredText(string)"/>
public static void CenteredText(ReadOnlySpan<byte> text)
{
CenterCursorForText(text);
CenterCursorForText(text.Span);
ImGui.TextUnformatted(text);
}
@ -527,11 +456,7 @@ public static partial class ImGuiHelpers
/// Center the ImGui cursor for a certain text.
/// </summary>
/// <param name="text">The text to center for.</param>
public static void CenterCursorForText(string text)
=> CenterCursorFor(ImGui.CalcTextSize(text).X);
/// <inheritdoc cref="CenterCursorForText(string)"/>
public static void CenterCursorForText(ReadOnlySpan<byte> text)
public static void CenterCursorForText(ImU8String text)
=> CenterCursorFor(ImGui.CalcTextSize(text).X);
/// <summary>
@ -666,17 +591,13 @@ public static partial class ImGuiHelpers
/// </summary>
/// <param name="data">The callback data.</param>
/// <param name="s">The new text.</param>
internal static unsafe void SetTextFromCallback(ImGuiInputTextCallbackData* data, string s)
internal static void SetTextFromCallback(ref ImGuiInputTextCallbackData data, ImU8String s)
{
if (data->BufTextLen != 0)
data->DeleteChars(0, data->BufTextLen);
if (data.BufTextLen != 0)
data.DeleteChars(0, data.BufTextLen);
var len = Encoding.UTF8.GetByteCount(s);
var buf = len < 1024 ? stackalloc byte[len] : new byte[len];
Encoding.UTF8.GetBytes(s, buf);
fixed (byte* pBuf = buf)
data->InsertChars(0, pBuf, pBuf + len);
data->SelectAll();
data.InsertChars(0, s);
data.SelectAll();
}
/// <summary>

View file

@ -161,12 +161,10 @@ public readonly ref struct ImGuiId
ImGui.PushID((void*)this.Numeric);
return true;
case Type.U16:
fixed (void* p = this.U16)
ImGui.PushID((byte*)p, (byte*)p + (this.U16.Length * 2));
ImGui.PushID(this.U16);
return true;
case Type.U8:
fixed (void* p = this.U8)
ImGui.PushID((byte*)p, (byte*)p + this.U8.Length);
ImGui.PushID(this.U8);
return true;
case Type.None:
default:

View file

@ -25,7 +25,7 @@ public unsafe struct ImVectorWrapper<T> : IList<T>, IList, IReadOnlyList<T>, IDi
/// Initializes a new instance of the <see cref="ImVectorWrapper{T}"/> struct.<br />
/// If <paramref name="ownership"/> is set to true, you must call <see cref="Dispose"/> after use,
/// and the underlying memory for <see cref="ImVector"/> must have been allocated using
/// <see cref="ImGui.MemAlloc(ulong)"/>. Otherwise, it will crash.
/// <see cref="ImGui.MemAlloc(nuint)"/>. Otherwise, it will crash.
/// </summary>
/// <param name="vector">The underlying vector.</param>
/// <param name="destroyer">The destroyer function to call on item removal.</param>

View file

@ -1,5 +1,4 @@
using System.Numerics;
using System.Text;
using Dalamud.Bindings.ImGui;
@ -11,28 +10,16 @@ public static partial class ImRaii
{
private static int disabledCount = 0;
public static IEndObject Child(string strId)
public static IEndObject Child(ImU8String strId)
=> new EndUnconditionally(ImGui.EndChild, ImGui.BeginChild(strId));
public static IEndObject Child(ReadOnlySpan<byte> strId)
=> new EndUnconditionally(ImGui.EndChild, ImGui.BeginChild(strId));
public static IEndObject Child(string strId, Vector2 size)
public static IEndObject Child(ImU8String strId, Vector2 size)
=> new EndUnconditionally(ImGui.EndChild, ImGui.BeginChild(strId, size));
public static IEndObject Child(ReadOnlySpan<byte> strId, Vector2 size)
=> new EndUnconditionally(ImGui.EndChild, ImGui.BeginChild(strId, size));
public static IEndObject Child(string strId, Vector2 size, bool border)
public static IEndObject Child(ImU8String strId, Vector2 size, bool border)
=> new EndUnconditionally(ImGui.EndChild, ImGui.BeginChild(strId, size, border));
public static IEndObject Child(ReadOnlySpan<byte> strId, Vector2 size, bool border)
=> new EndUnconditionally(ImGui.EndChild, ImGui.BeginChild(strId, size, border));
public static IEndObject Child(string strId, Vector2 size, bool border, ImGuiWindowFlags flags)
=> new EndUnconditionally(ImGui.EndChild, ImGui.BeginChild(strId, size, border, flags));
public static IEndObject Child(ReadOnlySpan<byte> strId, Vector2 size, bool border, ImGuiWindowFlags flags)
public static IEndObject Child(ImU8String strId, Vector2 size, bool border, ImGuiWindowFlags flags)
=> new EndUnconditionally(ImGui.EndChild, ImGui.BeginChild(strId, size, border, flags));
public static IEndObject DragDropTarget()
@ -44,88 +31,40 @@ public static partial class ImRaii
public static IEndObject DragDropSource(ImGuiDragDropFlags flags)
=> new EndConditionally(ImGui.EndDragDropSource, ImGui.BeginDragDropSource(flags));
public static IEndObject Popup(string id)
public static IEndObject Popup(ImU8String id)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopup(id));
public static IEndObject Popup(ReadOnlySpan<byte> id)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopup(id));
public static IEndObject Popup(string id, ImGuiWindowFlags flags)
public static IEndObject Popup(ImU8String id, ImGuiWindowFlags flags)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopup(id, flags));
public static IEndObject Popup(ReadOnlySpan<byte> id, ImGuiWindowFlags flags)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopup(id, flags));
public static IEndObject PopupModal(string id)
public static IEndObject PopupModal(ImU8String id)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupModal(id));
public static IEndObject PopupModal(ReadOnlySpan<byte> id)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupModal(id));
public static IEndObject PopupModal(string id, ref bool open)
public static IEndObject PopupModal(ImU8String id, ref bool open)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupModal(id, ref open));
public static IEndObject PopupModal(ReadOnlySpan<byte> id, ref bool open)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupModal(id, ref open));
public static IEndObject PopupModal(string id, ref bool open, ImGuiWindowFlags flags)
public static IEndObject PopupModal(ImU8String id, ref bool open, ImGuiWindowFlags flags)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupModal(id, ref open, flags));
public static IEndObject PopupModal(ReadOnlySpan<byte> id, ref bool open, ImGuiWindowFlags flags)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupModal(id, ref open, flags));
public static IEndObject ContextPopup(string id)
public static IEndObject ContextPopup(ImU8String id)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupContextWindow(id));
public static IEndObject ContextPopup(ReadOnlySpan<byte> id)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupContextWindow(id));
public static IEndObject ContextPopup(string id, ImGuiPopupFlags flags)
public static IEndObject ContextPopup(ImU8String id, ImGuiPopupFlags flags)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupContextWindow(id, flags));
public static IEndObject ContextPopup(ReadOnlySpan<byte> id, ImGuiPopupFlags flags)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupContextWindow(id, flags));
public static IEndObject ContextPopupItem(string id)
public static IEndObject ContextPopupItem(ImU8String id)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupContextItem(id));
public static IEndObject ContextPopupItem(ReadOnlySpan<byte> id)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupContextItem(id));
public static IEndObject ContextPopupItem(string id, ImGuiPopupFlags flags)
public static IEndObject ContextPopupItem(ImU8String id, ImGuiPopupFlags flags)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupContextItem(id, flags));
public static IEndObject ContextPopupItem(ReadOnlySpan<byte> id, ImGuiPopupFlags flags)
=> new EndConditionally(ImGui.EndPopup, ImGui.BeginPopupContextItem(id, flags));
public static IEndObject Combo(string label, string previewValue)
public static IEndObject Combo(ImU8String label, ImU8String previewValue)
=> new EndConditionally(ImGui.EndCombo, ImGui.BeginCombo(label, previewValue));
public static IEndObject Combo(ReadOnlySpan<byte> label, string previewValue)
=> new EndConditionally(ImGui.EndCombo, ImGui.BeginCombo(label, previewValue));
public static IEndObject Combo(string label, ReadOnlySpan<byte> previewValue)
=> new EndConditionally(ImGui.EndCombo, ImGui.BeginCombo(label, previewValue));
public static IEndObject Combo(ReadOnlySpan<byte> label, ReadOnlySpan<byte> previewValue)
=> new EndConditionally(ImGui.EndCombo, ImGui.BeginCombo(label, previewValue));
public static IEndObject Combo(string label, string previewValue, ImGuiComboFlags flags)
public static IEndObject Combo(ImU8String label, ImU8String previewValue, ImGuiComboFlags flags)
=> new EndConditionally(ImGui.EndCombo, ImGui.BeginCombo(label, previewValue, flags));
public static IEndObject Combo(ReadOnlySpan<byte> label, string previewValue, ImGuiComboFlags flags)
=> new EndConditionally(ImGui.EndCombo, ImGui.BeginCombo(label, previewValue, flags));
public static IEndObject Combo(string label, ReadOnlySpan<byte> previewValue, ImGuiComboFlags flags)
=> new EndConditionally(ImGui.EndCombo, ImGui.BeginCombo(label, previewValue, flags));
public static IEndObject Combo(ReadOnlySpan<byte> label, ReadOnlySpan<byte> previewValue, ImGuiComboFlags flags)
=> new EndConditionally(ImGui.EndCombo, ImGui.BeginCombo(label, previewValue, flags));
public static IEndObject Menu(string label)
=> new EndConditionally(ImGui.EndMenu, ImGui.BeginMenu(label));
public static IEndObject Menu(ReadOnlySpan<byte> label)
public static IEndObject Menu(ImU8String label)
=> new EndConditionally(ImGui.EndMenu, ImGui.BeginMenu(label));
public static IEndObject MenuBar()
@ -170,91 +109,49 @@ public static partial class ImRaii
return new EndUnconditionally(ImGui.PopTextWrapPos, true);
}
public static IEndObject ListBox(string label)
public static IEndObject ListBox(ImU8String label)
=> new EndConditionally(ImGui.EndListBox, ImGui.BeginListBox(label));
public static IEndObject ListBox(ReadOnlySpan<byte> label)
=> new EndConditionally(ImGui.EndListBox, ImGui.BeginListBox(label));
public static IEndObject ListBox(string label, Vector2 size)
public static IEndObject ListBox(ImU8String label, Vector2 size)
=> new EndConditionally(ImGui.EndListBox, ImGui.BeginListBox(label, size));
public static IEndObject ListBox(ReadOnlySpan<byte> label, Vector2 size)
=> new EndConditionally(ImGui.EndListBox, ImGui.BeginListBox(label, size));
public static IEndObject Table(string table, int numColumns)
public static IEndObject Table(ImU8String table, int numColumns)
=> new EndConditionally(ImGui.EndTable, ImGui.BeginTable(table, numColumns));
public static IEndObject Table(ReadOnlySpan<byte> table, int numColumns)
=> new EndConditionally(ImGui.EndTable, ImGui.BeginTable(table, numColumns));
public static IEndObject Table(string table, int numColumns, ImGuiTableFlags flags)
public static IEndObject Table(ImU8String table, int numColumns, ImGuiTableFlags flags)
=> new EndConditionally(ImGui.EndTable, ImGui.BeginTable(table, numColumns, flags));
public static IEndObject Table(ReadOnlySpan<byte> table, int numColumns, ImGuiTableFlags flags)
=> new EndConditionally(ImGui.EndTable, ImGui.BeginTable(table, numColumns, flags));
public static IEndObject Table(string table, int numColumns, ImGuiTableFlags flags, Vector2 outerSize)
public static IEndObject Table(ImU8String table, int numColumns, ImGuiTableFlags flags, Vector2 outerSize)
=> new EndConditionally(ImGui.EndTable, ImGui.BeginTable(table, numColumns, flags, outerSize));
public static IEndObject Table(ReadOnlySpan<byte> table, int numColumns, ImGuiTableFlags flags, Vector2 outerSize)
=> new EndConditionally(ImGui.EndTable, ImGui.BeginTable(table, numColumns, flags, outerSize));
public static IEndObject Table(string table, int numColumns, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth)
public static IEndObject Table(ImU8String table, int numColumns, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth)
=> new EndConditionally(ImGui.EndTable, ImGui.BeginTable(table, numColumns, flags, outerSize, innerWidth));
public static IEndObject Table(ReadOnlySpan<byte> table, int numColumns, ImGuiTableFlags flags, Vector2 outerSize, float innerWidth)
=> new EndConditionally(ImGui.EndTable, ImGui.BeginTable(table, numColumns, flags, outerSize, innerWidth));
public static IEndObject TabBar(string label)
public static IEndObject TabBar(ImU8String label)
=> new EndConditionally(ImGui.EndTabBar, ImGui.BeginTabBar(label));
public static IEndObject TabBar(ReadOnlySpan<byte> label)
=> new EndConditionally(ImGui.EndTabBar, ImGui.BeginTabBar(label));
public static IEndObject TabBar(string label, ImGuiTabBarFlags flags)
public static IEndObject TabBar(ImU8String label, ImGuiTabBarFlags flags)
=> new EndConditionally(ImGui.EndTabBar, ImGui.BeginTabBar(label, flags));
public static IEndObject TabBar(ReadOnlySpan<byte> label, ImGuiTabBarFlags flags)
=> new EndConditionally(ImGui.EndTabBar, ImGui.BeginTabBar(label, flags));
public static IEndObject TabItem(string label)
=> new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label));
public static IEndObject TabItem(ReadOnlySpan<byte> label)
public static IEndObject TabItem(ImU8String label)
=> new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label));
public static unsafe IEndObject TabItem(byte* label, ImGuiTabItemFlags flags)
=> new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, null, flags));
=> new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, flags));
public static unsafe IEndObject TabItem(string label, ImGuiTabItemFlags flags)
=> new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, null, flags));
public static unsafe IEndObject TabItem(ImU8String label, ImGuiTabItemFlags flags)
=> new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, flags));
public static unsafe IEndObject TabItem(ReadOnlySpan<byte> label, ImGuiTabItemFlags flags)
=> new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, null, flags));
public static IEndObject TabItem(string label, ref bool open)
public static IEndObject TabItem(ImU8String label, ref bool open)
=> new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, ref open));
public static IEndObject TabItem(ReadOnlySpan<byte> label, ref bool open)
=> new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, ref open));
public static IEndObject TabItem(string label, ref bool open, ImGuiTabItemFlags flags)
public static IEndObject TabItem(ImU8String label, ref bool open, ImGuiTabItemFlags flags)
=> new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, ref open, flags));
public static IEndObject TabItem(ReadOnlySpan<byte> label, ref bool open, ImGuiTabItemFlags flags)
=> new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label, ref open, flags));
public static IEndObject TreeNode(string label)
public static IEndObject TreeNode(ImU8String label)
=> new EndConditionally(ImGui.TreePop, ImGui.TreeNodeEx(label));
public static IEndObject TreeNode(ReadOnlySpan<byte> label)
=> new EndConditionally(ImGui.TreePop, ImGui.TreeNodeEx(label));
public static IEndObject TreeNode(string label, ImGuiTreeNodeFlags flags)
=> new EndConditionally(flags.HasFlag(ImGuiTreeNodeFlags.NoTreePushOnOpen) ? Nop : ImGui.TreePop, ImGui.TreeNodeEx(label, flags));
public static IEndObject TreeNode(ReadOnlySpan<byte> label, ImGuiTreeNodeFlags flags)
public static IEndObject TreeNode(ImU8String label, ImGuiTreeNodeFlags flags)
=> new EndConditionally(flags.HasFlag(ImGuiTreeNodeFlags.NoTreePushOnOpen) ? Nop : ImGui.TreePop, ImGui.TreeNodeEx(label, flags));
public static IEndObject Disabled()

View file

@ -6,10 +6,7 @@ namespace Dalamud.Interface.Utility.Raii;
// If condition is false, no id is pushed.
public static partial class ImRaii
{
public static Id PushId(string id, bool enabled = true)
=> enabled ? new Id().Push(id) : new Id();
public static Id PushId(ReadOnlySpan<byte> id, bool enabled = true)
public static Id PushId(ImU8String id, bool enabled = true)
=> enabled ? new Id().Push(id) : new Id();
public static Id PushId(int id, bool enabled = true)
@ -22,18 +19,7 @@ public static partial class ImRaii
{
private int count;
public Id Push(string id, bool condition = true)
{
if (condition)
{
ImGui.PushID(id);
++this.count;
}
return this;
}
public Id Push(ReadOnlySpan<byte> id, bool condition = true)
public Id Push(ImU8String id, bool condition = true)
{
if (condition)
{

View file

@ -37,7 +37,7 @@ namespace Dalamud.Utility;
/// <summary>
/// Class providing various helper methods for use in Dalamud and plugins.
/// </summary>
public static class Util
public static partial class Util
{
private static readonly string[] PageProtectionFlagNames = [
"PAGE_NOACCESS",

291
filter_imgui_bindings.ps1 Normal file
View file

@ -0,0 +1,291 @@
$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest
$namespaceDefPattern = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?:^\s*)namespace\s+(?<namespace>[\w.]+)\b', 'Compiled,Multiline,Singleline'
$usingPattern = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?:^|;)\s*using\s+(?<using>\w+)\s*;', 'Compiled,Multiline,Singleline'
$classDefPattern = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?<indent>^\s*)(?<visibility>public\s+|internal\s+|protected\s+|private\s+)?(?<static>static\s+)?(?<unsafe>unsafe\s+)?(?<partial>partial\s+)?(?<type>class\s+|struct\s+)(?<name>\w+)\b', 'Compiled,Multiline,Singleline'
$methodPattern = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?:^\s+?\[.*?\](?:\r\n|\r|\n))?(?<indent>^\s*)(?<prototype>(?<visibility>public\s+|internal\s+|protected\s+|private\s+)?(?<static>static\s+)?(?<unsafe>unsafe\s+)?(?<return>(?!public|internal|protected|private|static|unsafe)\w+(?:\s*<\s*\w+?(?:<\s*\w+\s*>?)?\s*>)?(?:\s*\*+)?\s+)(?<name>\w+)(?<args>\s*\([^)]*\)))(?:\r\n|\r|\n)[\s\S]+?(?:^\k<indent>}(?:\r\n|\r|\n))', 'Compiled,Multiline,Singleline'
$referNativeFunction = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '(?<!\.\s*)\b(\w+)Native(?=\()', 'Compiled'
$referNativeFunctionQualified = New-Object -TypeName System.Text.RegularExpressions.Regex -ArgumentList '\b(\w+)\s*\.\s*(\w+)Native(?=\()', 'Compiled'
$sourcePaths = (
"$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\Generated\Functions",
"$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\Generated\Structs",
"$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\Internals\Functions",
"$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\Manual\Functions",
# "$PSScriptRoot\imgui\Dalamud.Bindings.ImPlot\Generated\Functions",
# "$PSScriptRoot\imgui\Dalamud.Bindings.ImPlot\Generated\Structs",
$null
)
# replace "ImGuiKey.GamepadStart"
$tmp = Get-Content -Path "$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\Generated\Enums\ImGuiKeyPrivate.cs" -Raw
$tmp = $tmp.Replace("unchecked((int)GamepadStart)", "unchecked((int)ImGuiKey.GamepadStart)").Trim()
$tmp | Set-Content -Path "$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\Generated\Enums\ImGuiKeyPrivate.cs" -Encoding ascii
try
{
Remove-Item -Path "$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\Generated\Handles\ImTextureID.cs" -Force
}
catch [System.Management.Automation.ItemNotFoundException]
{
# pass
}
foreach ($sourcePath in $sourcePaths)
{
if (!$sourcePath)
{
continue
}
$targetPath = "$( Split-Path $( Split-Path $sourcePath ) )/Custom/Generated/$( Split-Path $( Split-Path $sourcePath ) -Leaf )/$( Split-Path $sourcePath -Leaf )"
$null = New-Item -Path $targetPath -Type Container -Force
$namespace = $null
$classes = New-Object -TypeName "System.Collections.Generic.Dictionary[string, System.Collections.Generic.Dictionary[string, System.Collections.Generic.List[System.Text.RegularExpressions.Match]]]"
$imports = New-Object -TypeName "System.Collections.Generic.SortedSet[string]"
$null = $imports.Add("System.Diagnostics")
$null = $imports.Add("System.Runtime.CompilerServices")
$null = $imports.Add("System.Runtime.InteropServices")
$null = $imports.Add("System.Numerics")
$null = $imports.Add("HexaGen.Runtime")
if (!$sourcePath.StartsWith("$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\"))
{
$null = $imports.Add("Dalamud.Bindings.ImGui")
}
$husks = New-Object -TypeName "System.Text.StringBuilder"
foreach ($file in (Get-ChildItem -Path $sourcePath))
{
$fileData = Get-Content -Path $file.FullName -Raw
$fileData = [Regex]::Replace($fileData, '#else\s*$[\s\S]*?^\s*#endif\s*$', '#endif', 'Multiline')
$fileData = [Regex]::Replace($fileData, '^\s*(#if(?:def)?\s+.*|#endif\s*)$', '', 'Multiline')
$namespace = $namespaceDefPattern.Match($fileData).Groups["namespace"].Value
$classDefMatches = $classDefPattern.Matches($fileData)
foreach ($using in $usingPattern.Matches($fileData))
{
$null = $imports.Add($using.Groups["using"])
}
$null = $husks.Append("/* $( $file.Name ) */`r`n").Append($methodPattern.Replace($fileData, ""))
foreach ($i in (0..($classDefMatches.Count - 1)))
{
$classGroup = $classDefMatches[$i].Groups
$className = "$($classGroup["type"].Value.Trim() ) $($classGroup["name"].Value.Trim() )"
if ( $className.EndsWith("Union"))
{
$className = $className.Substring(0, $className.Length - 5)
}
$methods = $nativeMethods = $null
$methodMatches = $methodPattern.Matches($(
if (!$classes.TryGetValue($className, [ref]$methods))
{
$methods = New-Object -TypeName "System.Collections.Generic.Dictionary[string, System.Collections.Generic.List[System.Text.RegularExpressions.Match]]"
$classes.Add($className, $methods)
}
If ($i -eq ($classDefMatches.Count - 1))
{
$fileData.Substring($classDefMatches[$i].Index)
}
Else
{
$fileData.Substring($classDefMatches[$i].Index, $classDefMatches[$i + 1].Index - $classDefMatches[$i].Index)
}
))
foreach ($methodMatch in $methodMatches)
{
$methodName = $methodMatch.Groups["name"].Value
if ( $methodMatch.Groups["args"].Value.Contains("stbtt_pack_context"))
{
continue
}
$overload = $null
$methodContainer = $( If ( $methodName.EndsWith("Native"))
{
if ($null -eq $nativeMethods -and !$classes.TryGetValue("$( $className )Native", [ref]$nativeMethods))
{
$nativeMethods = New-Object -TypeName "System.Collections.Generic.Dictionary[string, System.Collections.Generic.List[System.Text.RegularExpressions.Match]]"
$classes.Add("$( $className )Native", $nativeMethods)
}
$nativeMethods
}
else
{
$methods
} )
if (!$methodContainer.TryGetValue($methodName, [ref]$overload))
{
$overload = New-Object -TypeName "System.Collections.Generic.List[System.Text.RegularExpressions.Match]"
$methodContainer.Add($methodName, $overload)
}
$overload.Add($methodMatch)
}
}
}
$husks = $husks.ToString()
$husks = [Regex]::Replace($husks, '^\s*//.*\r\n', '', 'Multiline')
$husks = [Regex]::Replace($husks, '^\s*using .*;\r\n', '', 'Multiline')
# $husks = $emptyClassPattern.Replace($husks, '')
# $husks = $emptyNamespacePattern.Replace($husks, '')
$husks = [Regex]::Replace($husks, '\s*\r\n', "`r`n", 'Multiline').Trim()
if ($husks -ne '')
{
$husks = [Regex]::Replace($husks, '\}\s*' + [Regex]::Escape("namespace $namespace") + '\s*\{', "", 'Multiline').Trim()
$husks = $husks.Replace("public unsafe struct", "public unsafe partial struct")
$husks = $referNativeFunctionQualified.Replace($husks, '$1Native.$2')
$husks = "// <auto-generated/>`r`n`r`nusing $([string]::Join(";`r`nusing ", $imports) );`r`n`r`n$husks"
$husks | Set-Content -Path "$targetPath.gen.cs" -Encoding ascii
}
$husks = "// <auto-generated/>`r`n`r`nusing $([string]::Join(";`r`nusing ", $imports) );`r`n`r`nnamespace $namespace;`r`n`r`n"
$sb = New-Object -TypeName "System.Text.StringBuilder"
$discardMethods = New-Object -TypeName "System.Collections.Generic.SortedSet[string]"
$null = $discardMethods.Add("ImFontAtlasBuildPackCustomRectsNative")
foreach ($classDef in $classes.Keys)
{
$null = $sb.Clear().Append($husks).Append("public unsafe partial $classDef`r`n{`r`n")
$className = $classDef.Split(" ")[1]
$isNative = $className.EndsWith("Native")
$discardMethods.Clear()
if (!$isNative)
{
foreach ($methods in $classes[$classDef].Values)
{
$methodName = $methods[0].Groups["name"].Value;
# discard Drag/Slider functions
if ($methodName.StartsWith("Drag") -or
$methodName.StartsWith("Slider") -or
$methodName.StartsWith("VSlider") -or
$methodName.StartsWith("InputFloat") -or
$methodName.StartsWith("InputInt") -or
$methodName.StartsWith("InputDouble") -or
$methodName.StartsWith("InputScalar") -or
$methodName.StartsWith("ColorEdit") -or
$methodName.StartsWith("ColorPicker"))
{
$null = $discardMethods.Add($methodName)
continue
}
# discard specific functions
if ($methodName.StartsWith("ImGuiTextRange") -or
$methodName.StartsWith("AddInputCharacter"))
{
$null = $discardMethods.Add($methodName)
continue
}
# discard Get...Ref functions
if ($methodName.StartsWith("Get") -And
$methodName.EndsWith("Ref"))
{
$null = $discardMethods.Add($methodName)
continue
}
foreach ($overload in $methods)
{
$returnType = $overload.Groups["return"].Value.Trim()
$argDef = $overload.Groups["args"].Value
# discard functions returning a string of some sort
if ($returnType -eq "string" -and
$methodName.EndsWith("S"))
{
$null = $discardMethods.Add($methodName.Substring(0, $methodName.Length - 1))
$null = $discardMethods.Add($methodName)
break
}
# discard formatting functions or functions accepting (begin, end) or (data, size) pairs
if ($argDef.Contains("fmt") -or
$argDef -match "\btext\b" -or
# $argDef.Contains("byte* textEnd") -or
$argDef.Contains("str") -or
# $argDef.Contains("byte* strEnd") -or
# $argDef.Contains("byte* strIdEnd") -or
$argDef.Contains("label") -or
$argDef.Contains("name") -or
$argDef.Contains("prefix") -or
$argDef.Contains("byte* shortcut") -or
$argDef.Contains("byte* type") -or
$argDef.Contains("byte* iniData") -or
$argDef.Contains("int dataSize") -or
$argDef.Contains("values, int valuesCount") -or
$argDef.Contains("data, int itemCount") -or
$argDef.Contains("pData, int components") -or
$argDef.Contains("ushort* glyphRanges") -or
$argDef.Contains("nuint args"))
{
$null = $discardMethods.Add($methodName)
break
}
}
}
}
foreach ($methods in $classes[$classDef].Values)
{
$methodName = $methods[0].Groups["name"];
if ( $discardMethods.Contains($methodName))
{
continue
}
foreach ($overload in $methods)
{
if ($isNative)
{
$null = $sb.Append($overload.Groups[0].Value.Replace("internal ", "public ").Replace("Native(", "(").Replace("funcTable", "$($className.Substring(0, $className.Length - 6) ).funcTable"))
continue
}
$tmp = $overload.Groups[0].Value
$tmp = $referNativeFunction.Replace($tmp, "$( $className )Native.`$1")
$tmp = $referNativeFunctionQualified.Replace($tmp, '$1Native.$2')
$tmp = $tmp -creplace '(?<=Get[A-Za-z0-9_]+\()ref ([A-Za-z*]+) self(?=, |\))', 'this scoped in $1 self'
$tmp = $tmp -creplace '(?<=\()(ref )?([A-Za-z*]+) self(?=, |\))', 'this $1$2 self'
$null = $sb.Append($tmp)
}
}
$null = $sb.Append("}`r`n")
$nativeMethods = $null
if (!$classes.TryGetValue($classDef + "Native", [ref]$nativeMethods))
{
$nativeMethods = $null
}
foreach ($methodName in $discardMethods)
{
if ($nativeMethods -ne $null)
{
$overloads = $null
if ($nativeMethods.TryGetValue($methodName + "Native", [ref]$overloads))
{
foreach ($overload in $overloads)
{
$null = $sb.Append("// DISCARDED: $( $overload.Groups["prototype"].Value )`r`n")
}
continue
}
}
$null = $sb.Append("// DISCARDED: $methodName`r`n")
}
$sb.ToString() | Set-Content -Path "$targetPath/$className.gen.cs" -Encoding ascii
}
}

View file

@ -76,4 +76,6 @@ Set-Location -Path "bin/Debug/net9.0"
.\Generator.exe
# Restore initial directory
Set-Location -Path $initialDirectory
Set-Location -Path $initialDirectory
& "$PSScriptRoot\filter_imgui_bindings.ps1"

View file

@ -0,0 +1,695 @@
// <auto-generated/>
using HexaGen.Runtime;
using System;
using System.Diagnostics;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
/* Functions.000.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.001.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.002.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.003.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.004.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.005.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.006.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.007.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.008.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.009.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.010.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.011.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.012.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.013.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.014.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.015.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.016.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.017.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.018.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.019.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.020.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.021.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.022.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.023.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.024.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.025.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.026.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.027.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.028.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.029.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.030.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.031.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.032.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.033.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.034.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.035.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.036.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.037.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.038.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.039.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.040.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.041.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.042.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.043.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.044.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.045.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.046.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.047.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.048.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.049.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.050.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.051.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.052.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.053.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.054.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.055.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.056.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.057.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.058.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.059.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.060.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.061.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.062.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.063.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.064.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.065.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.066.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.067.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.068.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.069.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.070.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.071.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.072.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.073.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.074.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.075.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.076.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.077.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.078.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.079.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.080.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.081.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.082.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.083.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.084.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.085.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.086.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.087.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.088.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.089.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.090.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.091.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.092.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.093.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.094.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.095.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.096.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}
/* Functions.097.cs */
namespace Dalamud.Bindings.ImGui
{
public unsafe partial class ImGui
{
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,15 @@
// <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 ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN
{
}

View file

@ -0,0 +1,15 @@
// <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 ImBitVector
{
}

View file

@ -0,0 +1,15 @@
// <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 ImBitVectorPtr
{
}

View file

@ -0,0 +1,15 @@
// <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 ImChunkStreamImGuiTableSettings
{
}

View file

@ -0,0 +1,15 @@
// <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 ImChunkStreamImGuiWindowSettings
{
}

View file

@ -0,0 +1,50 @@
// <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 ImColor
{
public unsafe void Destroy()
{
fixed (ImColor* @this = &this)
{
ImGuiNative.Destroy(@this);
}
}
public unsafe void HSV(float h, float s, float v, float a)
{
fixed (ImColor* @this = &this)
{
ImGuiNative.HSV(@this, h, s, v, a);
}
}
public unsafe void HSV(float h, float s, float v)
{
fixed (ImColor* @this = &this)
{
ImGuiNative.HSV(@this, h, s, v, (float)(1.0f));
}
}
public unsafe void SetHSV(float h, float s, float v, float a)
{
fixed (ImColor* @this = &this)
{
ImGuiNative.SetHSV(@this, h, s, v, a);
}
}
public unsafe void SetHSV(float h, float s, float v)
{
fixed (ImColor* @this = &this)
{
ImGuiNative.SetHSV(@this, h, s, v, (float)(1.0f));
}
}
}

View file

@ -0,0 +1,35 @@
// <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 ImColorPtr
{
public unsafe void Destroy()
{
ImGuiNative.Destroy(Handle);
}
public unsafe void HSV(float h, float s, float v, float a)
{
ImGuiNative.HSV(Handle, h, s, v, a);
}
public unsafe void HSV(float h, float s, float v)
{
ImGuiNative.HSV(Handle, h, s, v, (float)(1.0f));
}
public unsafe void SetHSV(float h, float s, float v, float a)
{
ImGuiNative.SetHSV(Handle, h, s, v, a);
}
public unsafe void SetHSV(float h, float s, float v)
{
ImGuiNative.SetHSV(Handle, h, s, v, (float)(1.0f));
}
}

View file

@ -0,0 +1,15 @@
// <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 ImDrawChannel
{
}

View file

@ -0,0 +1,15 @@
// <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 ImDrawChannelPtr
{
}

View file

@ -0,0 +1,30 @@
// <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 ImDrawCmd
{
public unsafe void Destroy()
{
fixed (ImDrawCmd* @this = &this)
{
ImGuiNative.Destroy(@this);
}
}
public unsafe ImTextureID GetTexID()
{
fixed (ImDrawCmd* @this = &this)
{
ImTextureID ret = ImGuiNative.GetTexID(@this);
return ret;
}
}
}

View file

@ -0,0 +1,15 @@
// <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 ImDrawCmdHeader
{
}

View file

@ -0,0 +1,24 @@
// <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 ImDrawCmdPtr
{
public unsafe void Destroy()
{
ImGuiNative.Destroy(Handle);
}
public unsafe ImTextureID GetTexID()
{
ImTextureID ret = ImGuiNative.GetTexID(Handle);
return ret;
}
}

View file

@ -0,0 +1,43 @@
// <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 ImDrawData
{
public unsafe void Clear()
{
fixed (ImDrawData* @this = &this)
{
ImGuiNative.Clear(@this);
}
}
public unsafe void DeIndexAllBuffers()
{
fixed (ImDrawData* @this = &this)
{
ImGuiNative.DeIndexAllBuffers(@this);
}
}
public unsafe void Destroy()
{
fixed (ImDrawData* @this = &this)
{
ImGuiNative.Destroy(@this);
}
}
public unsafe void ScaleClipRects(Vector2 fbScale)
{
fixed (ImDrawData* @this = &this)
{
ImGuiNative.ScaleClipRects(@this, fbScale);
}
}
}

View file

@ -0,0 +1,15 @@
// <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 ImDrawDataBuilder
{
}

View file

@ -0,0 +1,15 @@
// <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 ImDrawDataBuilderPtr
{
}

View file

@ -0,0 +1,31 @@
// <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 ImDrawDataPtr
{
public unsafe void Clear()
{
ImGuiNative.Clear(Handle);
}
public unsafe void DeIndexAllBuffers()
{
ImGuiNative.DeIndexAllBuffers(Handle);
}
public unsafe void Destroy()
{
ImGuiNative.Destroy(Handle);
}
public unsafe void ScaleClipRects(Vector2 fbScale)
{
ImGuiNative.ScaleClipRects(Handle, fbScale);
}
}

View file

@ -0,0 +1,759 @@
// <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 ImDrawList
{
public unsafe int _CalcCircleAutoSegmentCount(float radius)
{
fixed (ImDrawList* @this = &this)
{
int ret = ImGuiNative._CalcCircleAutoSegmentCount(@this, radius);
return ret;
}
}
public unsafe void _ClearFreeMemory()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative._ClearFreeMemory(@this);
}
}
public unsafe void _OnChangedClipRect()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative._OnChangedClipRect(@this);
}
}
public unsafe void _OnChangedTextureID()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative._OnChangedTextureID(@this);
}
}
public unsafe void _OnChangedVtxOffset()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative._OnChangedVtxOffset(@this);
}
}
public unsafe void _PathArcToFastEx(Vector2 center, float radius, int aMinSample, int aMaxSample, int aStep)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative._PathArcToFastEx(@this, center, radius, aMinSample, aMaxSample, aStep);
}
}
public unsafe void _PathArcToN(Vector2 center, float radius, float aMin, float aMax, int numSegments)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative._PathArcToN(@this, center, radius, aMin, aMax, numSegments);
}
}
public unsafe void _PopUnusedDrawCmd()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative._PopUnusedDrawCmd(@this);
}
}
public unsafe void _ResetForNewFrame()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative._ResetForNewFrame(@this);
}
}
public unsafe void _TryMergeDrawCmds()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative._TryMergeDrawCmds(@this);
}
}
public unsafe void AddBezierCubic(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness, int numSegments)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddBezierCubic(@this, p1, p2, p3, p4, col, thickness, numSegments);
}
}
public unsafe void AddBezierCubic(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddBezierCubic(@this, p1, p2, p3, p4, col, thickness, (int)(0));
}
}
public unsafe void AddBezierQuadratic(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness, int numSegments)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddBezierQuadratic(@this, p1, p2, p3, col, thickness, numSegments);
}
}
public unsafe void AddBezierQuadratic(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddBezierQuadratic(@this, p1, p2, p3, col, thickness, (int)(0));
}
}
public unsafe void AddCallback(ImDrawCallback callback, void* callbackData)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddCallback(@this, callback, callbackData);
}
}
public unsafe void AddCircle(Vector2 center, float radius, uint col, int numSegments, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddCircle(@this, center, radius, col, numSegments, thickness);
}
}
public unsafe void AddCircle(Vector2 center, float radius, uint col, int numSegments)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddCircle(@this, center, radius, col, numSegments, (float)(1.0f));
}
}
public unsafe void AddCircle(Vector2 center, float radius, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddCircle(@this, center, radius, col, (int)(0), (float)(1.0f));
}
}
public unsafe void AddCircle(Vector2 center, float radius, uint col, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddCircle(@this, center, radius, col, (int)(0), thickness);
}
}
public unsafe void AddCircleFilled(Vector2 center, float radius, uint col, int numSegments)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddCircleFilled(@this, center, radius, col, numSegments);
}
}
public unsafe void AddCircleFilled(Vector2 center, float radius, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddCircleFilled(@this, center, radius, col, (int)(0));
}
}
public unsafe void AddConvexPolyFilled(Vector2* points, int numPoints, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddConvexPolyFilled(@this, points, numPoints, col);
}
}
public unsafe void AddConvexPolyFilled(ref Vector2 points, int numPoints, uint col)
{
fixed (ImDrawList* @this = &this)
{
fixed (Vector2* ppoints = &points)
{
ImGuiNative.AddConvexPolyFilled(@this, (Vector2*)ppoints, numPoints, col);
}
}
}
public unsafe void AddDrawCmd()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddDrawCmd(@this);
}
}
public unsafe void AddImage(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, Vector2 uvMin, Vector2 uvMax, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImage(@this, userTextureId, pMin, pMax, uvMin, uvMax, col);
}
}
public unsafe void AddImage(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, Vector2 uvMin, Vector2 uvMax)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImage(@this, userTextureId, pMin, pMax, uvMin, uvMax, (uint)(4294967295));
}
}
public unsafe void AddImage(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, Vector2 uvMin)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImage(@this, userTextureId, pMin, pMax, uvMin, (Vector2)(new Vector2(1,1)), (uint)(4294967295));
}
}
public unsafe void AddImage(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImage(@this, userTextureId, pMin, pMax, (Vector2)(new Vector2(0,0)), (Vector2)(new Vector2(1,1)), (uint)(4294967295));
}
}
public unsafe void AddImage(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, Vector2 uvMin, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImage(@this, userTextureId, pMin, pMax, uvMin, (Vector2)(new Vector2(1,1)), col);
}
}
public unsafe void AddImage(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImage(@this, userTextureId, pMin, pMax, (Vector2)(new Vector2(0,0)), (Vector2)(new Vector2(1,1)), col);
}
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImageQuad(@this, userTextureId, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
}
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImageQuad(@this, userTextureId, p1, p2, p3, p4, uv1, uv2, uv3, uv4, (uint)(4294967295));
}
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImageQuad(@this, userTextureId, p1, p2, p3, p4, uv1, uv2, uv3, (Vector2)(new Vector2(0,1)), (uint)(4294967295));
}
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImageQuad(@this, userTextureId, p1, p2, p3, p4, uv1, uv2, (Vector2)(new Vector2(1,1)), (Vector2)(new Vector2(0,1)), (uint)(4294967295));
}
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImageQuad(@this, userTextureId, p1, p2, p3, p4, uv1, (Vector2)(new Vector2(1,0)), (Vector2)(new Vector2(1,1)), (Vector2)(new Vector2(0,1)), (uint)(4294967295));
}
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImageQuad(@this, userTextureId, p1, p2, p3, p4, (Vector2)(new Vector2(0,0)), (Vector2)(new Vector2(1,0)), (Vector2)(new Vector2(1,1)), (Vector2)(new Vector2(0,1)), (uint)(4294967295));
}
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImageQuad(@this, userTextureId, p1, p2, p3, p4, uv1, uv2, uv3, (Vector2)(new Vector2(0,1)), col);
}
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImageQuad(@this, userTextureId, p1, p2, p3, p4, uv1, uv2, (Vector2)(new Vector2(1,1)), (Vector2)(new Vector2(0,1)), col);
}
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImageQuad(@this, userTextureId, p1, p2, p3, p4, uv1, (Vector2)(new Vector2(1,0)), (Vector2)(new Vector2(1,1)), (Vector2)(new Vector2(0,1)), col);
}
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImageQuad(@this, userTextureId, p1, p2, p3, p4, (Vector2)(new Vector2(0,0)), (Vector2)(new Vector2(1,0)), (Vector2)(new Vector2(1,1)), (Vector2)(new Vector2(0,1)), col);
}
}
public unsafe void AddImageRounded(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, Vector2 uvMin, Vector2 uvMax, uint col, float rounding, ImDrawFlags flags)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImageRounded(@this, userTextureId, pMin, pMax, uvMin, uvMax, col, rounding, flags);
}
}
public unsafe void AddImageRounded(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, Vector2 uvMin, Vector2 uvMax, uint col, float rounding)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddImageRounded(@this, userTextureId, pMin, pMax, uvMin, uvMax, col, rounding, (ImDrawFlags)(0));
}
}
public unsafe void AddLine(Vector2 p1, Vector2 p2, uint col, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddLine(@this, p1, p2, col, thickness);
}
}
public unsafe void AddLine(Vector2 p1, Vector2 p2, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddLine(@this, p1, p2, col, (float)(1.0f));
}
}
public unsafe void AddNgon(Vector2 center, float radius, uint col, int numSegments, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddNgon(@this, center, radius, col, numSegments, thickness);
}
}
public unsafe void AddNgon(Vector2 center, float radius, uint col, int numSegments)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddNgon(@this, center, radius, col, numSegments, (float)(1.0f));
}
}
public unsafe void AddNgonFilled(Vector2 center, float radius, uint col, int numSegments)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddNgonFilled(@this, center, radius, col, numSegments);
}
}
public unsafe void AddPolyline(Vector2* points, int numPoints, uint col, ImDrawFlags flags, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddPolyline(@this, points, numPoints, col, flags, thickness);
}
}
public unsafe void AddPolyline(ref Vector2 points, int numPoints, uint col, ImDrawFlags flags, float thickness)
{
fixed (ImDrawList* @this = &this)
{
fixed (Vector2* ppoints = &points)
{
ImGuiNative.AddPolyline(@this, (Vector2*)ppoints, numPoints, col, flags, thickness);
}
}
}
public unsafe void AddQuad(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddQuad(@this, p1, p2, p3, p4, col, thickness);
}
}
public unsafe void AddQuad(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddQuad(@this, p1, p2, p3, p4, col, (float)(1.0f));
}
}
public unsafe void AddQuadFilled(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddQuadFilled(@this, p1, p2, p3, p4, col);
}
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col, float rounding, ImDrawFlags flags, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddRect(@this, pMin, pMax, col, rounding, flags, thickness);
}
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col, float rounding, ImDrawFlags flags)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddRect(@this, pMin, pMax, col, rounding, flags, (float)(1.0f));
}
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col, float rounding)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddRect(@this, pMin, pMax, col, rounding, (ImDrawFlags)(0), (float)(1.0f));
}
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddRect(@this, pMin, pMax, col, (float)(0.0f), (ImDrawFlags)(0), (float)(1.0f));
}
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col, ImDrawFlags flags)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddRect(@this, pMin, pMax, col, (float)(0.0f), flags, (float)(1.0f));
}
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col, float rounding, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddRect(@this, pMin, pMax, col, rounding, (ImDrawFlags)(0), thickness);
}
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col, ImDrawFlags flags, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddRect(@this, pMin, pMax, col, (float)(0.0f), flags, thickness);
}
}
public unsafe void AddRectFilled(Vector2 pMin, Vector2 pMax, uint col, float rounding, ImDrawFlags flags)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddRectFilled(@this, pMin, pMax, col, rounding, flags);
}
}
public unsafe void AddRectFilled(Vector2 pMin, Vector2 pMax, uint col, float rounding)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddRectFilled(@this, pMin, pMax, col, rounding, (ImDrawFlags)(0));
}
}
public unsafe void AddRectFilled(Vector2 pMin, Vector2 pMax, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddRectFilled(@this, pMin, pMax, col, (float)(0.0f), (ImDrawFlags)(0));
}
}
public unsafe void AddRectFilled(Vector2 pMin, Vector2 pMax, uint col, ImDrawFlags flags)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddRectFilled(@this, pMin, pMax, col, (float)(0.0f), flags);
}
}
public unsafe void AddRectFilledMultiColor(Vector2 pMin, Vector2 pMax, uint colUprLeft, uint colUprRight, uint colBotRight, uint colBotLeft)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddRectFilledMultiColor(@this, pMin, pMax, colUprLeft, colUprRight, colBotRight, colBotLeft);
}
}
public unsafe void AddTriangle(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddTriangle(@this, p1, p2, p3, col, thickness);
}
}
public unsafe void AddTriangle(Vector2 p1, Vector2 p2, Vector2 p3, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddTriangle(@this, p1, p2, p3, col, (float)(1.0f));
}
}
public unsafe void AddTriangleFilled(Vector2 p1, Vector2 p2, Vector2 p3, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.AddTriangleFilled(@this, p1, p2, p3, col);
}
}
public unsafe void ChannelsMerge()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.ChannelsMerge(@this);
}
}
public unsafe void ChannelsSetCurrent(int n)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.ChannelsSetCurrent(@this, n);
}
}
public unsafe void ChannelsSplit(int count)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.ChannelsSplit(@this, count);
}
}
public unsafe ImDrawList* CloneOutput()
{
fixed (ImDrawList* @this = &this)
{
ImDrawList* ret = ImGuiNative.CloneOutput(@this);
return ret;
}
}
public unsafe void Destroy()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.Destroy(@this);
}
}
public unsafe void PathArcTo(Vector2 center, float radius, float aMin, float aMax, int numSegments)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathArcTo(@this, center, radius, aMin, aMax, numSegments);
}
}
public unsafe void PathArcTo(Vector2 center, float radius, float aMin, float aMax)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathArcTo(@this, center, radius, aMin, aMax, (int)(0));
}
}
public unsafe void PathArcToFast(Vector2 center, float radius, int aMinOf12, int aMaxOf12)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathArcToFast(@this, center, radius, aMinOf12, aMaxOf12);
}
}
public unsafe void PathBezierCubicCurveTo(Vector2 p2, Vector2 p3, Vector2 p4, int numSegments)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathBezierCubicCurveTo(@this, p2, p3, p4, numSegments);
}
}
public unsafe void PathBezierCubicCurveTo(Vector2 p2, Vector2 p3, Vector2 p4)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathBezierCubicCurveTo(@this, p2, p3, p4, (int)(0));
}
}
public unsafe void PathBezierQuadraticCurveTo(Vector2 p2, Vector2 p3, int numSegments)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathBezierQuadraticCurveTo(@this, p2, p3, numSegments);
}
}
public unsafe void PathBezierQuadraticCurveTo(Vector2 p2, Vector2 p3)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathBezierQuadraticCurveTo(@this, p2, p3, (int)(0));
}
}
public unsafe void PathClear()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathClear(@this);
}
}
public unsafe void PathFillConvex(uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathFillConvex(@this, col);
}
}
public unsafe void PathLineTo(Vector2 pos)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathLineTo(@this, pos);
}
}
public unsafe void PathLineToMergeDuplicate(Vector2 pos)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathLineToMergeDuplicate(@this, pos);
}
}
public unsafe void PathRect(Vector2 rectMin, Vector2 rectMax, float rounding, ImDrawFlags flags)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathRect(@this, rectMin, rectMax, rounding, flags);
}
}
public unsafe void PathRect(Vector2 rectMin, Vector2 rectMax, float rounding)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathRect(@this, rectMin, rectMax, rounding, (ImDrawFlags)(0));
}
}
public unsafe void PathRect(Vector2 rectMin, Vector2 rectMax)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathRect(@this, rectMin, rectMax, (float)(0.0f), (ImDrawFlags)(0));
}
}
public unsafe void PathRect(Vector2 rectMin, Vector2 rectMax, ImDrawFlags flags)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathRect(@this, rectMin, rectMax, (float)(0.0f), flags);
}
}
public unsafe void PathStroke(uint col, ImDrawFlags flags, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathStroke(@this, col, flags, thickness);
}
}
public unsafe void PathStroke(uint col, ImDrawFlags flags)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathStroke(@this, col, flags, (float)(1.0f));
}
}
public unsafe void PathStroke(uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathStroke(@this, col, (ImDrawFlags)(0), (float)(1.0f));
}
}
public unsafe void PathStroke(uint col, float thickness)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PathStroke(@this, col, (ImDrawFlags)(0), thickness);
}
}
public unsafe void PopClipRect()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PopClipRect(@this);
}
}
public unsafe void PopTextureID()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PopTextureID(@this);
}
}
public unsafe void PrimQuadUV(Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uvA, Vector2 uvB, Vector2 uvC, Vector2 uvD, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PrimQuadUV(@this, a, b, c, d, uvA, uvB, uvC, uvD, col);
}
}
public unsafe void PrimRect(Vector2 a, Vector2 b, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PrimRect(@this, a, b, col);
}
}
public unsafe void PrimRectUV(Vector2 a, Vector2 b, Vector2 uvA, Vector2 uvB, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PrimRectUV(@this, a, b, uvA, uvB, col);
}
}
public unsafe void PrimReserve(int idxCount, int vtxCount)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PrimReserve(@this, idxCount, vtxCount);
}
}
public unsafe void PrimUnreserve(int idxCount, int vtxCount)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PrimUnreserve(@this, idxCount, vtxCount);
}
}
public unsafe void PrimVtx(Vector2 pos, Vector2 uv, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PrimVtx(@this, pos, uv, col);
}
}
public unsafe void PrimWriteIdx(ushort idx)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PrimWriteIdx(@this, idx);
}
}
public unsafe void PrimWriteVtx(Vector2 pos, Vector2 uv, uint col)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PrimWriteVtx(@this, pos, uv, col);
}
}
public unsafe void PushClipRect(Vector2 clipRectMin, Vector2 clipRectMax, bool intersectWithCurrentClipRect)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PushClipRect(@this, clipRectMin, clipRectMax, intersectWithCurrentClipRect ? (byte)1 : (byte)0);
}
}
public unsafe void PushClipRect(Vector2 clipRectMin, Vector2 clipRectMax)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PushClipRect(@this, clipRectMin, clipRectMax, (byte)(0));
}
}
public unsafe void PushClipRectFullScreen()
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PushClipRectFullScreen(@this);
}
}
public unsafe void PushTextureID(ImTextureID textureId)
{
fixed (ImDrawList* @this = &this)
{
ImGuiNative.PushTextureID(@this, textureId);
}
}
}
// DISCARDED: AddText

View file

@ -0,0 +1,444 @@
// <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 ImDrawListPtr
{
public unsafe int _CalcCircleAutoSegmentCount(float radius)
{
int ret = ImGuiNative._CalcCircleAutoSegmentCount(Handle, radius);
return ret;
}
public unsafe void _ClearFreeMemory()
{
ImGuiNative._ClearFreeMemory(Handle);
}
public unsafe void _OnChangedClipRect()
{
ImGuiNative._OnChangedClipRect(Handle);
}
public unsafe void _OnChangedTextureID()
{
ImGuiNative._OnChangedTextureID(Handle);
}
public unsafe void _OnChangedVtxOffset()
{
ImGuiNative._OnChangedVtxOffset(Handle);
}
public unsafe void _PathArcToFastEx(Vector2 center, float radius, int aMinSample, int aMaxSample, int aStep)
{
ImGuiNative._PathArcToFastEx(Handle, center, radius, aMinSample, aMaxSample, aStep);
}
public unsafe void _PathArcToN(Vector2 center, float radius, float aMin, float aMax, int numSegments)
{
ImGuiNative._PathArcToN(Handle, center, radius, aMin, aMax, numSegments);
}
public unsafe void _PopUnusedDrawCmd()
{
ImGuiNative._PopUnusedDrawCmd(Handle);
}
public unsafe void _ResetForNewFrame()
{
ImGuiNative._ResetForNewFrame(Handle);
}
public unsafe void _TryMergeDrawCmds()
{
ImGuiNative._TryMergeDrawCmds(Handle);
}
public unsafe void AddBezierCubic(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness, int numSegments)
{
ImGuiNative.AddBezierCubic(Handle, p1, p2, p3, p4, col, thickness, numSegments);
}
public unsafe void AddBezierCubic(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness)
{
ImGuiNative.AddBezierCubic(Handle, p1, p2, p3, p4, col, thickness, (int)(0));
}
public unsafe void AddBezierQuadratic(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness, int numSegments)
{
ImGuiNative.AddBezierQuadratic(Handle, p1, p2, p3, col, thickness, numSegments);
}
public unsafe void AddBezierQuadratic(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness)
{
ImGuiNative.AddBezierQuadratic(Handle, p1, p2, p3, col, thickness, (int)(0));
}
public unsafe void AddCallback(ImDrawCallback callback, void* callbackData)
{
ImGuiNative.AddCallback(Handle, callback, callbackData);
}
public unsafe void AddCircle(Vector2 center, float radius, uint col, int numSegments, float thickness)
{
ImGuiNative.AddCircle(Handle, center, radius, col, numSegments, thickness);
}
public unsafe void AddCircle(Vector2 center, float radius, uint col, int numSegments)
{
ImGuiNative.AddCircle(Handle, center, radius, col, numSegments, (float)(1.0f));
}
public unsafe void AddCircle(Vector2 center, float radius, uint col)
{
ImGuiNative.AddCircle(Handle, center, radius, col, (int)(0), (float)(1.0f));
}
public unsafe void AddCircle(Vector2 center, float radius, uint col, float thickness)
{
ImGuiNative.AddCircle(Handle, center, radius, col, (int)(0), thickness);
}
public unsafe void AddCircleFilled(Vector2 center, float radius, uint col, int numSegments)
{
ImGuiNative.AddCircleFilled(Handle, center, radius, col, numSegments);
}
public unsafe void AddCircleFilled(Vector2 center, float radius, uint col)
{
ImGuiNative.AddCircleFilled(Handle, center, radius, col, (int)(0));
}
public unsafe void AddConvexPolyFilled(Vector2* points, int numPoints, uint col)
{
ImGuiNative.AddConvexPolyFilled(Handle, points, numPoints, col);
}
public unsafe void AddConvexPolyFilled(ref Vector2 points, int numPoints, uint col)
{
fixed (Vector2* ppoints = &points)
{
ImGuiNative.AddConvexPolyFilled(Handle, (Vector2*)ppoints, numPoints, col);
}
}
public unsafe void AddDrawCmd()
{
ImGuiNative.AddDrawCmd(Handle);
}
public unsafe void AddImage(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, Vector2 uvMin, Vector2 uvMax, uint col)
{
ImGuiNative.AddImage(Handle, userTextureId, pMin, pMax, uvMin, uvMax, col);
}
public unsafe void AddImage(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, Vector2 uvMin, Vector2 uvMax)
{
ImGuiNative.AddImage(Handle, userTextureId, pMin, pMax, uvMin, uvMax, (uint)(4294967295));
}
public unsafe void AddImage(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, Vector2 uvMin)
{
ImGuiNative.AddImage(Handle, userTextureId, pMin, pMax, uvMin, (Vector2)(new Vector2(1,1)), (uint)(4294967295));
}
public unsafe void AddImage(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax)
{
ImGuiNative.AddImage(Handle, userTextureId, pMin, pMax, (Vector2)(new Vector2(0,0)), (Vector2)(new Vector2(1,1)), (uint)(4294967295));
}
public unsafe void AddImage(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, Vector2 uvMin, uint col)
{
ImGuiNative.AddImage(Handle, userTextureId, pMin, pMax, uvMin, (Vector2)(new Vector2(1,1)), col);
}
public unsafe void AddImage(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, uint col)
{
ImGuiNative.AddImage(Handle, userTextureId, pMin, pMax, (Vector2)(new Vector2(0,0)), (Vector2)(new Vector2(1,1)), col);
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4, uint col)
{
ImGuiNative.AddImageQuad(Handle, userTextureId, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4)
{
ImGuiNative.AddImageQuad(Handle, userTextureId, p1, p2, p3, p4, uv1, uv2, uv3, uv4, (uint)(4294967295));
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3)
{
ImGuiNative.AddImageQuad(Handle, userTextureId, p1, p2, p3, p4, uv1, uv2, uv3, (Vector2)(new Vector2(0,1)), (uint)(4294967295));
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2)
{
ImGuiNative.AddImageQuad(Handle, userTextureId, p1, p2, p3, p4, uv1, uv2, (Vector2)(new Vector2(1,1)), (Vector2)(new Vector2(0,1)), (uint)(4294967295));
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1)
{
ImGuiNative.AddImageQuad(Handle, userTextureId, p1, p2, p3, p4, uv1, (Vector2)(new Vector2(1,0)), (Vector2)(new Vector2(1,1)), (Vector2)(new Vector2(0,1)), (uint)(4294967295));
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4)
{
ImGuiNative.AddImageQuad(Handle, userTextureId, p1, p2, p3, p4, (Vector2)(new Vector2(0,0)), (Vector2)(new Vector2(1,0)), (Vector2)(new Vector2(1,1)), (Vector2)(new Vector2(0,1)), (uint)(4294967295));
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, uint col)
{
ImGuiNative.AddImageQuad(Handle, userTextureId, p1, p2, p3, p4, uv1, uv2, uv3, (Vector2)(new Vector2(0,1)), col);
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, uint col)
{
ImGuiNative.AddImageQuad(Handle, userTextureId, p1, p2, p3, p4, uv1, uv2, (Vector2)(new Vector2(1,1)), (Vector2)(new Vector2(0,1)), col);
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, uint col)
{
ImGuiNative.AddImageQuad(Handle, userTextureId, p1, p2, p3, p4, uv1, (Vector2)(new Vector2(1,0)), (Vector2)(new Vector2(1,1)), (Vector2)(new Vector2(0,1)), col);
}
public unsafe void AddImageQuad(ImTextureID userTextureId, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col)
{
ImGuiNative.AddImageQuad(Handle, userTextureId, p1, p2, p3, p4, (Vector2)(new Vector2(0,0)), (Vector2)(new Vector2(1,0)), (Vector2)(new Vector2(1,1)), (Vector2)(new Vector2(0,1)), col);
}
public unsafe void AddImageRounded(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, Vector2 uvMin, Vector2 uvMax, uint col, float rounding, ImDrawFlags flags)
{
ImGuiNative.AddImageRounded(Handle, userTextureId, pMin, pMax, uvMin, uvMax, col, rounding, flags);
}
public unsafe void AddImageRounded(ImTextureID userTextureId, Vector2 pMin, Vector2 pMax, Vector2 uvMin, Vector2 uvMax, uint col, float rounding)
{
ImGuiNative.AddImageRounded(Handle, userTextureId, pMin, pMax, uvMin, uvMax, col, rounding, (ImDrawFlags)(0));
}
public unsafe void AddLine(Vector2 p1, Vector2 p2, uint col, float thickness)
{
ImGuiNative.AddLine(Handle, p1, p2, col, thickness);
}
public unsafe void AddLine(Vector2 p1, Vector2 p2, uint col)
{
ImGuiNative.AddLine(Handle, p1, p2, col, (float)(1.0f));
}
public unsafe void AddNgon(Vector2 center, float radius, uint col, int numSegments, float thickness)
{
ImGuiNative.AddNgon(Handle, center, radius, col, numSegments, thickness);
}
public unsafe void AddNgon(Vector2 center, float radius, uint col, int numSegments)
{
ImGuiNative.AddNgon(Handle, center, radius, col, numSegments, (float)(1.0f));
}
public unsafe void AddNgonFilled(Vector2 center, float radius, uint col, int numSegments)
{
ImGuiNative.AddNgonFilled(Handle, center, radius, col, numSegments);
}
public unsafe void AddPolyline(Vector2* points, int numPoints, uint col, ImDrawFlags flags, float thickness)
{
ImGuiNative.AddPolyline(Handle, points, numPoints, col, flags, thickness);
}
public unsafe void AddPolyline(ref Vector2 points, int numPoints, uint col, ImDrawFlags flags, float thickness)
{
fixed (Vector2* ppoints = &points)
{
ImGuiNative.AddPolyline(Handle, (Vector2*)ppoints, numPoints, col, flags, thickness);
}
}
public unsafe void AddQuad(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness)
{
ImGuiNative.AddQuad(Handle, p1, p2, p3, p4, col, thickness);
}
public unsafe void AddQuad(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col)
{
ImGuiNative.AddQuad(Handle, p1, p2, p3, p4, col, (float)(1.0f));
}
public unsafe void AddQuadFilled(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col)
{
ImGuiNative.AddQuadFilled(Handle, p1, p2, p3, p4, col);
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col, float rounding, ImDrawFlags flags, float thickness)
{
ImGuiNative.AddRect(Handle, pMin, pMax, col, rounding, flags, thickness);
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col, float rounding, ImDrawFlags flags)
{
ImGuiNative.AddRect(Handle, pMin, pMax, col, rounding, flags, (float)(1.0f));
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col, float rounding)
{
ImGuiNative.AddRect(Handle, pMin, pMax, col, rounding, (ImDrawFlags)(0), (float)(1.0f));
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col)
{
ImGuiNative.AddRect(Handle, pMin, pMax, col, (float)(0.0f), (ImDrawFlags)(0), (float)(1.0f));
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col, ImDrawFlags flags)
{
ImGuiNative.AddRect(Handle, pMin, pMax, col, (float)(0.0f), flags, (float)(1.0f));
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col, float rounding, float thickness)
{
ImGuiNative.AddRect(Handle, pMin, pMax, col, rounding, (ImDrawFlags)(0), thickness);
}
public unsafe void AddRect(Vector2 pMin, Vector2 pMax, uint col, ImDrawFlags flags, float thickness)
{
ImGuiNative.AddRect(Handle, pMin, pMax, col, (float)(0.0f), flags, thickness);
}
public unsafe void AddRectFilled(Vector2 pMin, Vector2 pMax, uint col, float rounding, ImDrawFlags flags)
{
ImGuiNative.AddRectFilled(Handle, pMin, pMax, col, rounding, flags);
}
public unsafe void AddRectFilled(Vector2 pMin, Vector2 pMax, uint col, float rounding)
{
ImGuiNative.AddRectFilled(Handle, pMin, pMax, col, rounding, (ImDrawFlags)(0));
}
public unsafe void AddRectFilled(Vector2 pMin, Vector2 pMax, uint col)
{
ImGuiNative.AddRectFilled(Handle, pMin, pMax, col, (float)(0.0f), (ImDrawFlags)(0));
}
public unsafe void AddRectFilled(Vector2 pMin, Vector2 pMax, uint col, ImDrawFlags flags)
{
ImGuiNative.AddRectFilled(Handle, pMin, pMax, col, (float)(0.0f), flags);
}
public unsafe void AddRectFilledMultiColor(Vector2 pMin, Vector2 pMax, uint colUprLeft, uint colUprRight, uint colBotRight, uint colBotLeft)
{
ImGuiNative.AddRectFilledMultiColor(Handle, pMin, pMax, colUprLeft, colUprRight, colBotRight, colBotLeft);
}
public unsafe void AddTriangle(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness)
{
ImGuiNative.AddTriangle(Handle, p1, p2, p3, col, thickness);
}
public unsafe void AddTriangle(Vector2 p1, Vector2 p2, Vector2 p3, uint col)
{
ImGuiNative.AddTriangle(Handle, p1, p2, p3, col, (float)(1.0f));
}
public unsafe void AddTriangleFilled(Vector2 p1, Vector2 p2, Vector2 p3, uint col)
{
ImGuiNative.AddTriangleFilled(Handle, p1, p2, p3, col);
}
public unsafe void ChannelsMerge()
{
ImGuiNative.ChannelsMerge(Handle);
}
public unsafe void ChannelsSetCurrent(int n)
{
ImGuiNative.ChannelsSetCurrent(Handle, n);
}
public unsafe void ChannelsSplit(int count)
{
ImGuiNative.ChannelsSplit(Handle, count);
}
public unsafe ImDrawListPtr CloneOutput()
{
ImDrawListPtr ret = ImGuiNative.CloneOutput(Handle);
return ret;
}
public unsafe void Destroy()
{
ImGuiNative.Destroy(Handle);
}
public unsafe void PathArcTo(Vector2 center, float radius, float aMin, float aMax, int numSegments)
{
ImGuiNative.PathArcTo(Handle, center, radius, aMin, aMax, numSegments);
}
public unsafe void PathArcTo(Vector2 center, float radius, float aMin, float aMax)
{
ImGuiNative.PathArcTo(Handle, center, radius, aMin, aMax, (int)(0));
}
public unsafe void PathArcToFast(Vector2 center, float radius, int aMinOf12, int aMaxOf12)
{
ImGuiNative.PathArcToFast(Handle, center, radius, aMinOf12, aMaxOf12);
}
public unsafe void PathBezierCubicCurveTo(Vector2 p2, Vector2 p3, Vector2 p4, int numSegments)
{
ImGuiNative.PathBezierCubicCurveTo(Handle, p2, p3, p4, numSegments);
}
public unsafe void PathBezierCubicCurveTo(Vector2 p2, Vector2 p3, Vector2 p4)
{
ImGuiNative.PathBezierCubicCurveTo(Handle, p2, p3, p4, (int)(0));
}
public unsafe void PathBezierQuadraticCurveTo(Vector2 p2, Vector2 p3, int numSegments)
{
ImGuiNative.PathBezierQuadraticCurveTo(Handle, p2, p3, numSegments);
}
public unsafe void PathBezierQuadraticCurveTo(Vector2 p2, Vector2 p3)
{
ImGuiNative.PathBezierQuadraticCurveTo(Handle, p2, p3, (int)(0));
}
public unsafe void PathClear()
{
ImGuiNative.PathClear(Handle);
}
public unsafe void PathFillConvex(uint col)
{
ImGuiNative.PathFillConvex(Handle, col);
}
public unsafe void PathLineTo(Vector2 pos)
{
ImGuiNative.PathLineTo(Handle, pos);
}
public unsafe void PathLineToMergeDuplicate(Vector2 pos)
{
ImGuiNative.PathLineToMergeDuplicate(Handle, pos);
}
public unsafe void PathRect(Vector2 rectMin, Vector2 rectMax, float rounding, ImDrawFlags flags)
{
ImGuiNative.PathRect(Handle, rectMin, rectMax, rounding, flags);
}
public unsafe void PathRect(Vector2 rectMin, Vector2 rectMax, float rounding)
{
ImGuiNative.PathRect(Handle, rectMin, rectMax, rounding, (ImDrawFlags)(0));
}
public unsafe void PathRect(Vector2 rectMin, Vector2 rectMax)
{
ImGuiNative.PathRect(Handle, rectMin, rectMax, (float)(0.0f), (ImDrawFlags)(0));
}
public unsafe void PathRect(Vector2 rectMin, Vector2 rectMax, ImDrawFlags flags)
{
ImGuiNative.PathRect(Handle, rectMin, rectMax, (float)(0.0f), flags);
}
public unsafe void PathStroke(uint col, ImDrawFlags flags, float thickness)
{
ImGuiNative.PathStroke(Handle, col, flags, thickness);
}
public unsafe void PathStroke(uint col, ImDrawFlags flags)
{
ImGuiNative.PathStroke(Handle, col, flags, (float)(1.0f));
}
public unsafe void PathStroke(uint col)
{
ImGuiNative.PathStroke(Handle, col, (ImDrawFlags)(0), (float)(1.0f));
}
public unsafe void PathStroke(uint col, float thickness)
{
ImGuiNative.PathStroke(Handle, col, (ImDrawFlags)(0), thickness);
}
public unsafe void PopClipRect()
{
ImGuiNative.PopClipRect(Handle);
}
public unsafe void PopTextureID()
{
ImGuiNative.PopTextureID(Handle);
}
public unsafe void PrimQuadUV(Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uvA, Vector2 uvB, Vector2 uvC, Vector2 uvD, uint col)
{
ImGuiNative.PrimQuadUV(Handle, a, b, c, d, uvA, uvB, uvC, uvD, col);
}
public unsafe void PrimRect(Vector2 a, Vector2 b, uint col)
{
ImGuiNative.PrimRect(Handle, a, b, col);
}
public unsafe void PrimRectUV(Vector2 a, Vector2 b, Vector2 uvA, Vector2 uvB, uint col)
{
ImGuiNative.PrimRectUV(Handle, a, b, uvA, uvB, col);
}
public unsafe void PrimReserve(int idxCount, int vtxCount)
{
ImGuiNative.PrimReserve(Handle, idxCount, vtxCount);
}
public unsafe void PrimUnreserve(int idxCount, int vtxCount)
{
ImGuiNative.PrimUnreserve(Handle, idxCount, vtxCount);
}
public unsafe void PrimVtx(Vector2 pos, Vector2 uv, uint col)
{
ImGuiNative.PrimVtx(Handle, pos, uv, col);
}
public unsafe void PrimWriteIdx(ushort idx)
{
ImGuiNative.PrimWriteIdx(Handle, idx);
}
public unsafe void PrimWriteVtx(Vector2 pos, Vector2 uv, uint col)
{
ImGuiNative.PrimWriteVtx(Handle, pos, uv, col);
}
public unsafe void PushClipRect(Vector2 clipRectMin, Vector2 clipRectMax, bool intersectWithCurrentClipRect)
{
ImGuiNative.PushClipRect(Handle, clipRectMin, clipRectMax, intersectWithCurrentClipRect ? (byte)1 : (byte)0);
}
public unsafe void PushClipRect(Vector2 clipRectMin, Vector2 clipRectMax)
{
ImGuiNative.PushClipRect(Handle, clipRectMin, clipRectMax, (byte)(0));
}
public unsafe void PushClipRectFullScreen()
{
ImGuiNative.PushClipRectFullScreen(Handle);
}
public unsafe void PushTextureID(ImTextureID textureId)
{
ImGuiNative.PushTextureID(Handle, textureId);
}
}
// DISCARDED: AddText

View file

@ -0,0 +1,15 @@
// <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 ImDrawListPtrPtr
{
}

View file

@ -0,0 +1,22 @@
// <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 ImDrawListSharedData
{
public unsafe void Destroy()
{
fixed (ImDrawListSharedData* @this = &this)
{
ImGuiNative.Destroy(@this);
}
}
}

View file

@ -0,0 +1,19 @@
// <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 ImDrawListSharedDataPtr
{
public unsafe void Destroy()
{
ImGuiNative.Destroy(Handle);
}
}

View file

@ -0,0 +1,87 @@
// <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 ImDrawListSplitter
{
public unsafe void Clear()
{
fixed (ImDrawListSplitter* @this = &this)
{
ImGuiNative.Clear(@this);
}
}
public unsafe void ClearFreeMemory()
{
fixed (ImDrawListSplitter* @this = &this)
{
ImGuiNative.ClearFreeMemory(@this);
}
}
public unsafe void Destroy()
{
fixed (ImDrawListSplitter* @this = &this)
{
ImGuiNative.Destroy(@this);
}
}
public unsafe void Merge(ImDrawListPtr drawList)
{
fixed (ImDrawListSplitter* @this = &this)
{
ImGuiNative.Merge(@this, drawList);
}
}
public unsafe void Merge(ref ImDrawList drawList)
{
fixed (ImDrawListSplitter* @this = &this)
{
fixed (ImDrawList* pdrawList = &drawList)
{
ImGuiNative.Merge(@this, (ImDrawList*)pdrawList);
}
}
}
public unsafe void SetCurrentChannel(ImDrawListPtr drawList, int channelIdx)
{
fixed (ImDrawListSplitter* @this = &this)
{
ImGuiNative.SetCurrentChannel(@this, drawList, channelIdx);
}
}
public unsafe void SetCurrentChannel(ref ImDrawList drawList, int channelIdx)
{
fixed (ImDrawListSplitter* @this = &this)
{
fixed (ImDrawList* pdrawList = &drawList)
{
ImGuiNative.SetCurrentChannel(@this, (ImDrawList*)pdrawList, channelIdx);
}
}
}
public unsafe void Split(ImDrawListPtr drawList, int count)
{
fixed (ImDrawListSplitter* @this = &this)
{
ImGuiNative.Split(@this, drawList, count);
}
}
public unsafe void Split(ref ImDrawList drawList, int count)
{
fixed (ImDrawListSplitter* @this = &this)
{
fixed (ImDrawList* pdrawList = &drawList)
{
ImGuiNative.Split(@this, (ImDrawList*)pdrawList, count);
}
}
}
}

View file

@ -0,0 +1,60 @@
// <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 ImDrawListSplitterPtr
{
public unsafe void Clear()
{
ImGuiNative.Clear(Handle);
}
public unsafe void ClearFreeMemory()
{
ImGuiNative.ClearFreeMemory(Handle);
}
public unsafe void Destroy()
{
ImGuiNative.Destroy(Handle);
}
public unsafe void Merge(ImDrawListPtr drawList)
{
ImGuiNative.Merge(Handle, drawList);
}
public unsafe void Merge(ref ImDrawList drawList)
{
fixed (ImDrawList* pdrawList = &drawList)
{
ImGuiNative.Merge(Handle, (ImDrawList*)pdrawList);
}
}
public unsafe void SetCurrentChannel(ImDrawListPtr drawList, int channelIdx)
{
ImGuiNative.SetCurrentChannel(Handle, drawList, channelIdx);
}
public unsafe void SetCurrentChannel(ref ImDrawList drawList, int channelIdx)
{
fixed (ImDrawList* pdrawList = &drawList)
{
ImGuiNative.SetCurrentChannel(Handle, (ImDrawList*)pdrawList, channelIdx);
}
}
public unsafe void Split(ImDrawListPtr drawList, int count)
{
ImGuiNative.Split(Handle, drawList, count);
}
public unsafe void Split(ref ImDrawList drawList, int count)
{
fixed (ImDrawList* pdrawList = &drawList)
{
ImGuiNative.Split(Handle, (ImDrawList*)pdrawList, count);
}
}
}

View file

@ -0,0 +1,15 @@
// <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 ImDrawVert
{
}

View file

@ -0,0 +1,15 @@
// <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 ImDrawVertPtr
{
}

View file

@ -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

View file

@ -0,0 +1,30 @@
// <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 ImFontAtlasCustomRect
{
public unsafe void Destroy()
{
fixed (ImFontAtlasCustomRect* @this = &this)
{
ImGuiNative.Destroy(@this);
}
}
public unsafe bool IsPacked()
{
fixed (ImFontAtlasCustomRect* @this = &this)
{
byte ret = ImGuiNative.IsPacked(@this);
return ret != 0;
}
}
}

View file

@ -0,0 +1,24 @@
// <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 ImFontAtlasCustomRectPtr
{
public unsafe void Destroy()
{
ImGuiNative.Destroy(Handle);
}
public unsafe bool IsPacked()
{
byte ret = ImGuiNative.IsPacked(Handle);
return ret != 0;
}
}

View file

@ -0,0 +1,15 @@
// <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 ImFontAtlasTexture
{
}

View file

@ -0,0 +1,15 @@
// <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 ImFontAtlasTexturePtr
{
}

View file

@ -0,0 +1,15 @@
// <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 ImFontBuilderIO
{
}

View file

@ -0,0 +1,15 @@
// <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 ImFontBuilderIOPtr
{
}

View file

@ -0,0 +1,22 @@
// <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 ImFontConfig
{
public unsafe void Destroy()
{
fixed (ImFontConfig* @this = &this)
{
ImGuiNative.Destroy(@this);
}
}
}

View file

@ -0,0 +1,19 @@
// <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 ImFontConfigPtr
{
public unsafe void Destroy()
{
ImGuiNative.Destroy(Handle);
}
}

View file

@ -0,0 +1,15 @@
// <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 ImFontGlyph
{
}

View file

@ -0,0 +1,15 @@
// <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 ImFontGlyphHotData
{
}

View file

@ -0,0 +1,15 @@
// <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 ImFontGlyphHotDataPtr
{
}

View file

@ -0,0 +1,15 @@
// <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 ImFontGlyphPtr
{
}

View file

@ -0,0 +1,76 @@
// <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 ImFontGlyphRangesBuilder
{
public unsafe void AddChar(ushort c)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGuiNative.AddChar(@this, c);
}
}
public unsafe void AddRanges(ushort* ranges)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGuiNative.AddRanges(@this, ranges);
}
}
public unsafe void BuildRanges(ImVector<ushort>* outRanges)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGuiNative.BuildRanges(@this, outRanges);
}
}
public unsafe void BuildRanges(ref ImVector<ushort> outRanges)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (ImVector<ushort>* poutRanges = &outRanges)
{
ImGuiNative.BuildRanges(@this, (ImVector<ushort>*)poutRanges);
}
}
}
public unsafe void Clear()
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGuiNative.Clear(@this);
}
}
public unsafe void Destroy()
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGuiNative.Destroy(@this);
}
}
public unsafe bool GetBit(nuint n)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
byte ret = ImGuiNative.GetBit(@this, n);
return ret != 0;
}
}
public unsafe void SetBit(nuint n)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGuiNative.SetBit(@this, n);
}
}
}
// DISCARDED: AddText

View file

@ -0,0 +1,52 @@
// <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 ImFontGlyphRangesBuilderPtr
{
public unsafe void AddChar(ushort c)
{
ImGuiNative.AddChar(Handle, c);
}
public unsafe void AddRanges(ushort* ranges)
{
ImGuiNative.AddRanges(Handle, ranges);
}
public unsafe void BuildRanges(ImVector<ushort>* outRanges)
{
ImGuiNative.BuildRanges(Handle, outRanges);
}
public unsafe void BuildRanges(ref ImVector<ushort> outRanges)
{
fixed (ImVector<ushort>* poutRanges = &outRanges)
{
ImGuiNative.BuildRanges(Handle, (ImVector<ushort>*)poutRanges);
}
}
public unsafe void Clear()
{
ImGuiNative.Clear(Handle);
}
public unsafe void Destroy()
{
ImGuiNative.Destroy(Handle);
}
public unsafe bool GetBit(nuint n)
{
byte ret = ImGuiNative.GetBit(Handle, n);
return ret != 0;
}
public unsafe void SetBit(nuint n)
{
ImGuiNative.SetBit(Handle, n);
}
}
// DISCARDED: AddText

View file

@ -0,0 +1,15 @@
// <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 ImFontKerningPair
{
}

View file

@ -0,0 +1,15 @@
// <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 ImFontKerningPairPtr
{
}

View file

@ -0,0 +1,117 @@
// <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 ImFontPtr
{
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)
{
ImGuiNative.AddGlyph(Handle, 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 (ImFontConfig* psrcCfg = &srcCfg)
{
ImGuiNative.AddGlyph(Handle, (ImFontConfig*)psrcCfg, c, textureIndex, x0, y0, x1, y1, u0, v0, u1, v1, advanceX);
}
}
public unsafe void AddKerningPair(ushort leftC, ushort rightC, float distanceAdjustment)
{
ImGuiNative.AddKerningPair(Handle, leftC, rightC, distanceAdjustment);
}
public unsafe void AddRemapChar(ushort dst, ushort src, bool overwriteDst)
{
ImGuiNative.AddRemapChar(Handle, dst, src, overwriteDst ? (byte)1 : (byte)0);
}
public unsafe void AddRemapChar(ushort dst, ushort src)
{
ImGuiNative.AddRemapChar(Handle, dst, src, (byte)(1));
}
public unsafe void BuildLookupTable()
{
ImGuiNative.BuildLookupTable(Handle);
}
public unsafe void ClearOutputData()
{
ImGuiNative.ClearOutputData(Handle);
}
public unsafe void Destroy()
{
ImGuiNative.Destroy(Handle);
}
public unsafe ImFontGlyph* FindGlyph(ushort c)
{
ImFontGlyph* ret = ImGuiNative.FindGlyph(Handle, c);
return ret;
}
public unsafe ImFontGlyph* FindGlyphNoFallback(ushort c)
{
ImFontGlyph* ret = ImGuiNative.FindGlyphNoFallback(Handle, c);
return ret;
}
public unsafe float GetCharAdvance(ushort c)
{
float ret = ImGuiNative.GetCharAdvance(Handle, c);
return ret;
}
public unsafe float GetDistanceAdjustmentForPair(ushort leftC, ushort rightC)
{
float ret = ImGuiNative.GetDistanceAdjustmentForPair(Handle, leftC, rightC);
return ret;
}
public unsafe float GetDistanceAdjustmentForPairFromHotData(ushort leftC, ImFontGlyphHotData* rightCInfo)
{
float ret = ImGuiNative.GetDistanceAdjustmentForPairFromHotData(Handle, leftC, rightCInfo);
return ret;
}
public unsafe float GetDistanceAdjustmentForPairFromHotData(ushort leftC, ref ImFontGlyphHotData rightCInfo)
{
fixed (ImFontGlyphHotData* prightCInfo = &rightCInfo)
{
float ret = ImGuiNative.GetDistanceAdjustmentForPairFromHotData(Handle, leftC, (ImFontGlyphHotData*)prightCInfo);
return ret;
}
}
public unsafe void GrowIndex(int newSize)
{
ImGuiNative.GrowIndex(Handle, newSize);
}
public unsafe bool IsGlyphRangeUnused(uint cBegin, uint cLast)
{
byte ret = ImGuiNative.IsGlyphRangeUnused(Handle, cBegin, cLast);
return ret != 0;
}
public unsafe bool IsLoaded()
{
byte ret = ImGuiNative.IsLoaded(Handle);
return ret != 0;
}
public unsafe void RenderChar(ImDrawListPtr drawList, float size, Vector2 pos, uint col, ushort c)
{
ImGuiNative.RenderChar(Handle, drawList, size, pos, col, c);
}
public unsafe void RenderChar(ref ImDrawList drawList, float size, Vector2 pos, uint col, ushort c)
{
fixed (ImDrawList* pdrawList = &drawList)
{
ImGuiNative.RenderChar(Handle, (ImDrawList*)pdrawList, size, pos, col, c);
}
}
public unsafe void SetGlyphVisible(ushort c, bool visible)
{
ImGuiNative.SetGlyphVisible(Handle, c, visible ? (byte)1 : (byte)0);
}
}
// DISCARDED: CalcWordWrapPositionA
// DISCARDED: CalcWordWrapPositionAS
// DISCARDED: GetDebugName
// DISCARDED: GetDebugNameS
// DISCARDED: RenderText

View file

@ -0,0 +1,15 @@
// <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 ImFontPtrPtr
{
}

View file

@ -0,0 +1,15 @@
// <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 ImGuiColorMod
{
}

View file

@ -0,0 +1,15 @@
// <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 ImGuiColorModPtr
{
}

View file

@ -0,0 +1,22 @@
// <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 ImGuiComboPreviewData
{
public unsafe void Destroy()
{
fixed (ImGuiComboPreviewData* @this = &this)
{
ImGuiNative.Destroy(@this);
}
}
}

View file

@ -0,0 +1,19 @@
// <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 ImGuiComboPreviewDataPtr
{
public unsafe void Destroy()
{
ImGuiNative.Destroy(Handle);
}
}

View file

@ -0,0 +1,22 @@
// <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 ImGuiContext
{
public unsafe void Destroy()
{
fixed (ImGuiContext* @this = &this)
{
ImGuiNative.Destroy(@this);
}
}
}

View file

@ -0,0 +1,22 @@
// <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 ImGuiContextHook
{
public unsafe void Destroy()
{
fixed (ImGuiContextHook* @this = &this)
{
ImGuiNative.Destroy(@this);
}
}
}

Some files were not shown because too many files have changed in this diff Show more