Merge pull request #2352 from Soreepeong/fix/imgui

ImGui bindings fixes
This commit is contained in:
goat 2025-08-09 12:30:46 +02:00 committed by GitHub
commit 4413634508
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
231 changed files with 537 additions and 614 deletions

View file

@ -1,19 +1,18 @@
using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using Dalamud.Bindings.ImGui; using Dalamud.Bindings.ImGui;
using Dalamud.Memory;
using Serilog; using Serilog;
using TerraFX.Interop.Windows; using TerraFX.Interop.Windows;
using static Dalamud.Interface.ImGuiBackend.Helpers.ImGuiViewportHelpers;
using static TerraFX.Interop.Windows.Windows; using static TerraFX.Interop.Windows.Windows;
using ERROR = TerraFX.Interop.Windows.ERROR; using ERROR = TerraFX.Interop.Windows.ERROR;
@ -245,7 +244,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
return default(LRESULT); return default(LRESULT);
} }
if (ImGui.IsAnyItemActive()) if (!ImGui.IsWindowHovered(ImGuiHoveredFlags.AnyWindow))
ImGui.ClearWindowFocus(); ImGui.ClearWindowFocus();
break; break;
@ -585,51 +584,50 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
private struct ViewportHandler : IDisposable private struct ViewportHandler : IDisposable
{ {
[SuppressMessage("ReSharper", "CollectionNeverQueried.Local", Justification = "Keeping references alive")] private static readonly string WindowClassName = typeof(ViewportHandler).FullName!;
private readonly List<object> delegateReferences = new();
private Win32InputHandler input; private Win32InputHandler input;
private nint classNamePtr;
private bool wantUpdateMonitors = true; private bool wantUpdateMonitors = true;
public ViewportHandler(Win32InputHandler input) public ViewportHandler(Win32InputHandler input)
{ {
this.input = input; this.input = input;
this.classNamePtr = Marshal.StringToHGlobalUni("ImGui Platform");
var pio = ImGui.GetPlatformIO(); var pio = ImGui.GetPlatformIO();
pio.PlatformCreateWindow = this.RegisterFunctionPointer<CreateWindowDelegate>(this.OnCreateWindow); pio.PlatformCreateWindow = (delegate* unmanaged[Cdecl]<ImGuiViewportPtr, void>)&OnCreateWindow;
pio.PlatformDestroyWindow = this.RegisterFunctionPointer<DestroyWindowDelegate>(this.OnDestroyWindow); pio.PlatformDestroyWindow = (delegate* unmanaged[Cdecl]<ImGuiViewportPtr, void>)&OnDestroyWindow;
pio.PlatformShowWindow = this.RegisterFunctionPointer<ShowWindowDelegate>(this.OnShowWindow); pio.PlatformShowWindow = (delegate* unmanaged[Cdecl]<ImGuiViewportPtr, void>)&OnShowWindow;
pio.PlatformSetWindowPos = this.RegisterFunctionPointer<SetWindowPosDelegate>(this.OnSetWindowPos); pio.PlatformSetWindowPos = (delegate* unmanaged[Cdecl]<ImGuiViewportPtr, Vector2, void>)&OnSetWindowPos;
pio.PlatformGetWindowPos = this.RegisterFunctionPointer<GetWindowPosDelegate>(this.OnGetWindowPos); pio.PlatformGetWindowPos = (delegate* unmanaged[Cdecl]<Vector2*, ImGuiViewportPtr, Vector2*>)&OnGetWindowPos;
pio.PlatformSetWindowSize = this.RegisterFunctionPointer<SetWindowSizeDelegate>(this.OnSetWindowSize); pio.PlatformSetWindowSize = (delegate* unmanaged[Cdecl]<ImGuiViewportPtr, Vector2, void>)&OnSetWindowSize;
pio.PlatformGetWindowSize = this.RegisterFunctionPointer<GetWindowSizeDelegate>(this.OnGetWindowSize); pio.PlatformGetWindowSize = (delegate* unmanaged[Cdecl]<Vector2*, ImGuiViewportPtr, Vector2*>)&OnGetWindowSize;
pio.PlatformSetWindowFocus = this.RegisterFunctionPointer<SetWindowFocusDelegate>(this.OnSetWindowFocus); pio.PlatformSetWindowFocus = (delegate* unmanaged[Cdecl]<ImGuiViewportPtr, void>)&OnSetWindowFocus;
pio.PlatformGetWindowFocus = this.RegisterFunctionPointer<GetWindowFocusDelegate>(this.OnGetWindowFocus); pio.PlatformGetWindowFocus = (delegate* unmanaged[Cdecl]<ImGuiViewportPtr, byte>)&OnGetWindowFocus;
pio.PlatformGetWindowMinimized = pio.PlatformGetWindowMinimized = (delegate* unmanaged[Cdecl]<ImGuiViewportPtr, byte>)&OnGetWindowMinimized;
this.RegisterFunctionPointer<GetWindowMinimizedDelegate>(this.OnGetWindowMinimized); pio.PlatformSetWindowTitle = (delegate* unmanaged[Cdecl]<ImGuiViewportPtr, byte*, void>)&OnSetWindowTitle;
pio.PlatformSetWindowTitle = this.RegisterFunctionPointer<SetWindowTitleDelegate>(this.OnSetWindowTitle); pio.PlatformSetWindowAlpha = (delegate* unmanaged[Cdecl]<ImGuiViewportPtr, float, void>)&OnSetWindowAlpha;
pio.PlatformSetWindowAlpha = this.RegisterFunctionPointer<SetWindowAlphaDelegate>(this.OnSetWindowAlpha); pio.PlatformUpdateWindow = (delegate* unmanaged[Cdecl]<ImGuiViewportPtr, void>)&OnUpdateWindow;
pio.PlatformUpdateWindow = this.RegisterFunctionPointer<UpdateWindowDelegate>(this.OnUpdateWindow);
// pio.Platform_SetImeInputPos = this.RegisterFunctionPointer<SetImeInputPosDelegate>(this.OnSetImeInputPos); // pio.Platform_SetImeInputPos = this.RegisterFunctionPointer<SetImeInputPosDelegate>(this.OnSetImeInputPos);
// pio.Platform_GetWindowDpiScale = this.RegisterFunctionPointer<GetWindowDpiScaleDelegate>(this.OnGetWindowDpiScale); // pio.Platform_GetWindowDpiScale = this.RegisterFunctionPointer<GetWindowDpiScaleDelegate>(this.OnGetWindowDpiScale);
// pio.Platform_ChangedViewport = this.RegisterFunctionPointer<ChangedViewportDelegate>(this.OnChangedViewport); // pio.Platform_ChangedViewport = this.RegisterFunctionPointer<ChangedViewportDelegate>(this.OnChangedViewport);
var wcex = new WNDCLASSEXW fixed (char* windowClassNamePtr = WindowClassName)
{ {
cbSize = (uint)sizeof(WNDCLASSEXW), var wcex = new WNDCLASSEXW
style = CS.CS_HREDRAW | CS.CS_VREDRAW, {
hInstance = GetModuleHandleW(null), cbSize = (uint)sizeof(WNDCLASSEXW),
hbrBackground = (HBRUSH)(1 + COLOR.COLOR_BACKGROUND), style = CS.CS_HREDRAW | CS.CS_VREDRAW,
lpfnWndProc = (delegate* unmanaged<HWND, uint, WPARAM, LPARAM, LRESULT>)Marshal hInstance = (HINSTANCE)Marshal.GetHINSTANCE(typeof(ViewportHandler).Module),
.GetFunctionPointerForDelegate(this.input.wndProcDelegate), hbrBackground = (HBRUSH)(1 + COLOR.COLOR_BACKGROUND),
lpszClassName = (ushort*)this.classNamePtr, lpfnWndProc = (delegate* unmanaged<HWND, uint, WPARAM, LPARAM, LRESULT>)Marshal
}; .GetFunctionPointerForDelegate(this.input.wndProcDelegate),
lpszClassName = (ushort*)windowClassNamePtr,
};
if (RegisterClassExW(&wcex) == 0) if (RegisterClassExW(&wcex) == 0)
throw Marshal.GetExceptionForHR(Marshal.GetHRForLastWin32Error()) ?? new("RegisterClassEx Fail"); throw Marshal.GetExceptionForHR(Marshal.GetHRForLastWin32Error()) ?? new("RegisterClassEx Fail");
}
// Register main window handle (which is owned by the main application, not by us) // Register main window handle (which is owned by the main application, not by us)
// This is mostly for simplicity and consistency, so that our code (e.g. mouse handling etc.) can use same logic for main and secondary viewports. // This is mostly for simplicity and consistency, so that our code (e.g. mouse handling etc.) can use same logic for main and secondary viewports.
@ -657,11 +655,11 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
ImGui.GetPlatformIO().Handle->Monitors = default; ImGui.GetPlatformIO().Handle->Monitors = default;
} }
if (this.classNamePtr != 0) fixed (char* windowClassNamePtr = WindowClassName)
{ {
UnregisterClassW((ushort*)this.classNamePtr, GetModuleHandleW(null)); UnregisterClassW(
Marshal.FreeHGlobal(this.classNamePtr); (ushort*)windowClassNamePtr,
this.classNamePtr = 0; (HINSTANCE)Marshal.GetHINSTANCE(typeof(ViewportHandler).Module));
} }
pio.PlatformCreateWindow = null; pio.PlatformCreateWindow = null;
@ -750,13 +748,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
} }
} }
private void* RegisterFunctionPointer<T>(T obj) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
{ private static void OnCreateWindow(ImGuiViewportPtr viewport)
this.delegateReferences.Add(obj);
return Marshal.GetFunctionPointerForDelegate(obj).ToPointer();
}
private void OnCreateWindow(ImGuiViewportPtr viewport)
{ {
var data = (ImGuiViewportDataWin32*)Marshal.AllocHGlobal(Marshal.SizeOf<ImGuiViewportDataWin32>()); var data = (ImGuiViewportDataWin32*)Marshal.AllocHGlobal(Marshal.SizeOf<ImGuiViewportDataWin32>());
viewport.PlatformUserData = data; viewport.PlatformUserData = data;
@ -784,12 +777,12 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
}; };
AdjustWindowRectEx(&rect, (uint)data->DwStyle, false, (uint)data->DwExStyle); AdjustWindowRectEx(&rect, (uint)data->DwStyle, false, (uint)data->DwExStyle);
fixed (char* pwszWindowTitle = "Untitled") fixed (char* windowClassNamePtr = WindowClassName)
{ {
data->Hwnd = CreateWindowExW( data->Hwnd = CreateWindowExW(
(uint)data->DwExStyle, (uint)data->DwExStyle,
(ushort*)this.classNamePtr, (ushort*)windowClassNamePtr,
(ushort*)pwszWindowTitle, (ushort*)windowClassNamePtr,
(uint)data->DwStyle, (uint)data->DwStyle,
rect.left, rect.left,
rect.top, rect.top,
@ -797,8 +790,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
rect.bottom - rect.top, rect.bottom - rect.top,
parentWindow, parentWindow,
default, default,
GetModuleHandleW(null), (HINSTANCE)Marshal.GetHINSTANCE(typeof(ViewportHandler).Module),
default); null);
} }
data->HwndOwned = true; data->HwndOwned = true;
@ -806,7 +799,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
viewport.PlatformHandle = viewport.PlatformHandleRaw = data->Hwnd; viewport.PlatformHandle = viewport.PlatformHandleRaw = data->Hwnd;
} }
private void OnDestroyWindow(ImGuiViewportPtr viewport) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
private static void OnDestroyWindow(ImGuiViewportPtr viewport)
{ {
// This is also called on the main viewport for some reason, and we never set that viewport's PlatformUserData // This is also called on the main viewport for some reason, and we never set that viewport's PlatformUserData
if (viewport.PlatformUserData == null) return; if (viewport.PlatformUserData == null) return;
@ -817,7 +811,11 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
{ {
// Transfer capture so if we started dragging from a window that later disappears, we'll still receive the MOUSEUP event. // Transfer capture so if we started dragging from a window that later disappears, we'll still receive the MOUSEUP event.
ReleaseCapture(); ReleaseCapture();
SetCapture(this.input.hWnd); if (viewport.ParentViewportId != 0)
{
var parentViewport = ImGui.FindViewportByID(viewport.ParentViewportId);
SetCapture((HWND)parentViewport.PlatformHandle);
}
} }
if (data->Hwnd != nint.Zero && data->HwndOwned) if (data->Hwnd != nint.Zero && data->HwndOwned)
@ -836,7 +834,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
viewport.PlatformUserData = viewport.PlatformHandle = null; viewport.PlatformUserData = viewport.PlatformHandle = null;
} }
private void OnShowWindow(ImGuiViewportPtr viewport) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
private static void OnShowWindow(ImGuiViewportPtr viewport)
{ {
var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData;
@ -846,7 +845,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
ShowWindow(data->Hwnd, SW.SW_SHOW); ShowWindow(data->Hwnd, SW.SW_SHOW);
} }
private void OnUpdateWindow(ImGuiViewportPtr viewport) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
private static void OnUpdateWindow(ImGuiViewportPtr viewport)
{ {
// (Optional) Update Win32 style if it changed _after_ creation. // (Optional) Update Win32 style if it changed _after_ creation.
// Generally they won't change unless configuration flags are changed, but advanced uses (such as manually rewriting viewport flags) make this useful. // Generally they won't change unless configuration flags are changed, but advanced uses (such as manually rewriting viewport flags) make this useful.
@ -907,17 +907,18 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
} }
} }
private Vector2* OnGetWindowPos(Vector2* returnStorage, ImGuiViewportPtr viewport) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
private static Vector2* OnGetWindowPos(Vector2* returnValueStorage, ImGuiViewportPtr viewport)
{ {
var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData;
var pt = new POINT { x = 0, y = 0 }; var pt = new POINT { x = 0, y = 0 };
ClientToScreen(data->Hwnd, &pt); ClientToScreen(data->Hwnd, &pt);
returnStorage->X = pt.x; *returnValueStorage = new(pt.x, pt.y);
returnStorage->Y = pt.y; return returnValueStorage;
return returnStorage;
} }
private void OnSetWindowPos(ImGuiViewportPtr viewport, Vector2 pos) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
private static void OnSetWindowPos(ImGuiViewportPtr viewport, Vector2 pos)
{ {
var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData;
var rect = new RECT((int)pos.X, (int)pos.Y, (int)pos.X, (int)pos.Y); var rect = new RECT((int)pos.X, (int)pos.Y, (int)pos.X, (int)pos.Y);
@ -934,17 +935,18 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
SWP.SWP_NOACTIVATE); SWP.SWP_NOACTIVATE);
} }
private Vector2* OnGetWindowSize(Vector2* returnStorage, ImGuiViewportPtr viewport) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
private static Vector2* OnGetWindowSize(Vector2* returnValueStorage, ImGuiViewportPtr viewport)
{ {
var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData;
RECT rect; RECT rect;
GetClientRect(data->Hwnd, &rect); GetClientRect(data->Hwnd, &rect);
returnStorage->X = rect.right - rect.left; *returnValueStorage = new(rect.right - rect.left, rect.bottom - rect.top);
returnStorage->Y = rect.bottom - rect.top; return returnValueStorage;
return returnStorage;
} }
private void OnSetWindowSize(ImGuiViewportPtr viewport, Vector2 size) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
private static void OnSetWindowSize(ImGuiViewportPtr viewport, Vector2 size)
{ {
var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData;
@ -962,7 +964,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
SWP.SWP_NOACTIVATE); SWP.SWP_NOACTIVATE);
} }
private void OnSetWindowFocus(ImGuiViewportPtr viewport) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
private static void OnSetWindowFocus(ImGuiViewportPtr viewport)
{ {
var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData;
@ -971,26 +974,30 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
SetFocus(data->Hwnd); SetFocus(data->Hwnd);
} }
private bool OnGetWindowFocus(ImGuiViewportPtr viewport) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
private static byte OnGetWindowFocus(ImGuiViewportPtr viewport)
{ {
var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData;
return GetForegroundWindow() == data->Hwnd; return GetForegroundWindow() == data->Hwnd ? (byte)1 : (byte)0;
} }
private bool OnGetWindowMinimized(ImGuiViewportPtr viewport) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
private static byte OnGetWindowMinimized(ImGuiViewportPtr viewport)
{ {
var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData;
return IsIconic(data->Hwnd); return IsIconic(data->Hwnd) ? (byte)1 : (byte)0;
} }
private void OnSetWindowTitle(ImGuiViewportPtr viewport, string title) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
private static void OnSetWindowTitle(ImGuiViewportPtr viewport, byte* title)
{ {
var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData;
fixed (char* pwszTitle = title) fixed (char* pwszTitle = MemoryHelper.ReadStringNullTerminated((nint)title))
SetWindowTextW(data->Hwnd, (ushort*)pwszTitle); SetWindowTextW(data->Hwnd, (ushort*)pwszTitle);
} }
private void OnSetWindowAlpha(ImGuiViewportPtr viewport, float alpha) [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
private static void OnSetWindowAlpha(ImGuiViewportPtr viewport, float alpha)
{ {
var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData;
var style = GetWindowLongW(data->Hwnd, GWL.GWL_EXSTYLE); var style = GetWindowLongW(data->Hwnd, GWL.GWL_EXSTYLE);

View file

@ -223,15 +223,15 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer
ImDrawDataPtr drawData, ImDrawDataPtr drawData,
bool clearRenderTarget) bool clearRenderTarget)
{ {
// Do nothing when there's nothing to draw
if (drawData.IsNull || !drawData.Valid)
return;
// Avoid rendering when minimized // Avoid rendering when minimized
if (drawData.DisplaySize.X <= 0 || drawData.DisplaySize.Y <= 0) if (drawData.DisplaySize.X <= 0 || drawData.DisplaySize.Y <= 0)
return; return;
using var oldState = new D3D11DeviceContextStateBackup(this.featureLevel, this.context.Get()); // Set up render target
// Setup desired DX state
this.SetupRenderState(drawData);
this.context.Get()->OMSetRenderTargets(1, &renderTargetView, null); this.context.Get()->OMSetRenderTargets(1, &renderTargetView, null);
if (clearRenderTarget) if (clearRenderTarget)
{ {
@ -239,17 +239,17 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer
this.context.Get()->ClearRenderTargetView(renderTargetView, (float*)&color); this.context.Get()->ClearRenderTargetView(renderTargetView, (float*)&color);
} }
if (!drawData.Valid || drawData.CmdListsCount == 0) // Stop if there's nothing to draw
return;
var cmdLists = new Span<ImDrawListPtr>(drawData.Handle->CmdLists, drawData.Handle->CmdListsCount); var cmdLists = new Span<ImDrawListPtr>(drawData.Handle->CmdLists, drawData.Handle->CmdListsCount);
if (cmdLists.IsEmpty)
return;
// Create and grow vertex/index buffers if needed // Create and grow vertex/index buffers if needed
if (this.vertexBufferSize < drawData.TotalVtxCount) if (this.vertexBufferSize < drawData.TotalVtxCount)
this.vertexBuffer.Dispose(); this.vertexBuffer.Dispose();
if (this.vertexBuffer.Get() is null) if (this.vertexBuffer.Get() is null)
{ {
this.vertexBufferSize = drawData.TotalVtxCount + 5000; this.vertexBufferSize = drawData.TotalVtxCount + 8192;
var desc = new D3D11_BUFFER_DESC( var desc = new D3D11_BUFFER_DESC(
(uint)(sizeof(ImDrawVert) * this.vertexBufferSize), (uint)(sizeof(ImDrawVert) * this.vertexBufferSize),
(uint)D3D11_BIND_FLAG.D3D11_BIND_VERTEX_BUFFER, (uint)D3D11_BIND_FLAG.D3D11_BIND_VERTEX_BUFFER,
@ -264,7 +264,7 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer
this.indexBuffer.Dispose(); this.indexBuffer.Dispose();
if (this.indexBuffer.Get() is null) if (this.indexBuffer.Get() is null)
{ {
this.indexBufferSize = drawData.TotalIdxCount + 5000; this.indexBufferSize = drawData.TotalIdxCount + 16384;
var desc = new D3D11_BUFFER_DESC( var desc = new D3D11_BUFFER_DESC(
(uint)(sizeof(ushort) * this.indexBufferSize), (uint)(sizeof(ushort) * this.indexBufferSize),
(uint)D3D11_BIND_FLAG.D3D11_BIND_INDEX_BUFFER, (uint)D3D11_BIND_FLAG.D3D11_BIND_INDEX_BUFFER,
@ -275,9 +275,14 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer
this.indexBuffer.Attach(buffer); this.indexBuffer.Attach(buffer);
} }
// Upload vertex/index data into a single contiguous GPU buffer using var oldState = new D3D11DeviceContextStateBackup(this.featureLevel, this.context.Get());
// Setup desired DX state
this.SetupRenderState(drawData);
try try
{ {
// Upload vertex/index data into a single contiguous GPU buffer.
var vertexData = default(D3D11_MAPPED_SUBRESOURCE); var vertexData = default(D3D11_MAPPED_SUBRESOURCE);
var indexData = default(D3D11_MAPPED_SUBRESOURCE); var indexData = default(D3D11_MAPPED_SUBRESOURCE);
this.context.Get()->Map( this.context.Get()->Map(
@ -306,26 +311,18 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer
targetVertices = targetVertices[vertices.Length..]; targetVertices = targetVertices[vertices.Length..];
targetIndices = targetIndices[indices.Length..]; targetIndices = targetIndices[indices.Length..];
} }
}
finally
{
this.context.Get()->Unmap((ID3D11Resource*)this.vertexBuffer.Get(), 0);
this.context.Get()->Unmap((ID3D11Resource*)this.indexBuffer.Get(), 0);
}
// Setup orthographic projection matrix into our constant buffer. // Setup orthographic projection matrix into our constant buffer.
// Our visible imgui space lies from DisplayPos (LT) to DisplayPos+DisplaySize (RB). // Our visible imgui space lies from DisplayPos (LT) to DisplayPos+DisplaySize (RB).
// DisplayPos is (0,0) for single viewport apps. // DisplayPos is (0,0) for single viewport apps.
try var constantBufferData = default(D3D11_MAPPED_SUBRESOURCE);
{
var data = default(D3D11_MAPPED_SUBRESOURCE);
this.context.Get()->Map( this.context.Get()->Map(
(ID3D11Resource*)this.vertexConstantBuffer.Get(), (ID3D11Resource*)this.vertexConstantBuffer.Get(),
0, 0,
D3D11_MAP.D3D11_MAP_WRITE_DISCARD, D3D11_MAP.D3D11_MAP_WRITE_DISCARD,
0, 0,
&data).ThrowOnError(); &constantBufferData).ThrowOnError();
*(Matrix4x4*)data.pData = Matrix4x4.CreateOrthographicOffCenter( *(Matrix4x4*)constantBufferData.pData = Matrix4x4.CreateOrthographicOffCenter(
drawData.DisplayPos.X, drawData.DisplayPos.X,
drawData.DisplayPos.X + drawData.DisplaySize.X, drawData.DisplayPos.X + drawData.DisplaySize.X,
drawData.DisplayPos.Y + drawData.DisplaySize.Y, drawData.DisplayPos.Y + drawData.DisplaySize.Y,
@ -335,6 +332,8 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer
} }
finally finally
{ {
this.context.Get()->Unmap((ID3D11Resource*)this.vertexBuffer.Get(), 0);
this.context.Get()->Unmap((ID3D11Resource*)this.indexBuffer.Get(), 0);
this.context.Get()->Unmap((ID3D11Resource*)this.vertexConstantBuffer.Get(), 0); this.context.Get()->Unmap((ID3D11Resource*)this.vertexConstantBuffer.Get(), 0);
} }
@ -343,8 +342,6 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer
var vertexOffset = 0; var vertexOffset = 0;
var indexOffset = 0; var indexOffset = 0;
var clipOff = new Vector4(drawData.DisplayPos, drawData.DisplayPos.X, drawData.DisplayPos.Y); 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) foreach (ref var cmdList in cmdLists)
{ {
var cmds = new ImVectorWrapper<ImDrawCmd>(cmdList.Handle->CmdBuffer.ToUntyped()); var cmds = new ImVectorWrapper<ImDrawCmd>(cmdList.Handle->CmdBuffer.ToUntyped());
@ -467,7 +464,8 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer
buffer = this.vertexConstantBuffer.Get(); buffer = this.vertexConstantBuffer.Get();
ctx->VSSetConstantBuffers(0, 1, &buffer); ctx->VSSetConstantBuffers(0, 1, &buffer);
// PS handled later ctx->PSSetShader(this.pixelShader, null, 0);
ctx->PSSetSamplers(0, 1, this.sampler.GetAddressOf());
ctx->GSSetShader(null, null, 0); ctx->GSSetShader(null, null, 0);
ctx->HSSetShader(null, null, 0); ctx->HSSetShader(null, null, 0);

View file

@ -2,11 +2,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using System.Numerics; using System.Numerics;
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Text.Unicode; using System.Text.Unicode;
@ -209,8 +207,7 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService
} }
} }
private static ImGuiInputTextStatePtr GetInputTextState() => private static ImGuiInputTextStatePtr GetInputTextState() => new(&ImGui.GetCurrentContext().Handle->InputTextState);
(ImGuiInputTextState*)((nint)ImGui.GetCurrentContext().Handle + 0x4588);
private static (string String, bool Supported) ToUcs2(char* data, int nc = -1) private static (string String, bool Supported) ToUcs2(char* data, int nc = -1)
{ {

File diff suppressed because one or more lines are too long

View file

@ -203,8 +203,8 @@ public static partial class ImGuiHelpers
ImGui.SetClipboardText(textCopy.IsNull ? text.Span : textCopy.Span); ImGui.SetClipboardText(textCopy.IsNull ? text.Span : textCopy.Span);
} }
text.Dispose(); text.Recycle();
textCopy.Dispose(); textCopy.Recycle();
} }
/// <summary>Draws a SeString.</summary> /// <summary>Draws a SeString.</summary>

View file

@ -21,7 +21,7 @@ $sourcePaths = (
# replace "ImGuiKey.GamepadStart" # replace "ImGuiKey.GamepadStart"
$tmp = Get-Content -Path "$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\Generated\Enums\ImGuiKeyPrivate.cs" -Raw $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 = $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 $tmp.Trim() | Set-Content -Path "$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\Generated\Enums\ImGuiKeyPrivate.cs" -Encoding ascii
try try
{ {
@ -141,7 +141,9 @@ foreach ($sourcePath in $sourcePaths)
$husks = $husks.Replace("public unsafe struct", "public unsafe partial struct") $husks = $husks.Replace("public unsafe struct", "public unsafe partial struct")
$husks = $referNativeFunctionQualified.Replace($husks, '$1Native.$2') $husks = $referNativeFunctionQualified.Replace($husks, '$1Native.$2')
$husks = "// <auto-generated/>`r`n`r`nusing $([string]::Join(";`r`nusing ", $imports) );`r`n`r`n$husks" $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 = $husks -ireplace 'nuint (ActiveIdUsingKeyInputMask)', 'ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN $1'
$husks = $husks.Replace('ref Unsafe.AsRef<nuint>(&Handle->ActiveIdUsingKeyInputMask)', 'ref Unsafe.AsRef<ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN>(&Handle->ActiveIdUsingKeyInputMask)')
$husks.Trim() | 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" $husks = "// <auto-generated/>`r`n`r`nusing $([string]::Join(";`r`nusing ", $imports) );`r`n`r`nnamespace $namespace;`r`n`r`n"
@ -286,6 +288,6 @@ foreach ($sourcePath in $sourcePaths)
$null = $sb.Append("// DISCARDED: $methodName`r`n") $null = $sb.Append("// DISCARDED: $methodName`r`n")
} }
$sb.ToString() | Set-Content -Path "$targetPath/$className.gen.cs" -Encoding ascii $sb.ToString().Trim() | Set-Content -Path "$targetPath/$className.gen.cs" -Encoding ascii
} }
} }

View file

@ -8896,4 +8896,3 @@ public unsafe partial class ImGui
// DISCARDED: internal static byte VSliderFloatNative(byte* label, Vector2 size, float* v, float vMin, float vMax, byte* format, ImGuiSliderFlags flags) // DISCARDED: internal static byte VSliderFloatNative(byte* label, Vector2 size, float* v, float vMin, float vMax, byte* format, ImGuiSliderFlags flags)
// DISCARDED: internal static byte VSliderIntNative(byte* label, Vector2 size, int* v, int vMin, int vMax, byte* format, ImGuiSliderFlags flags) // DISCARDED: internal static byte VSliderIntNative(byte* label, Vector2 size, int* v, int vMin, int vMax, byte* format, ImGuiSliderFlags flags)
// DISCARDED: internal static byte VSliderScalarNative(byte* label, Vector2 size, ImGuiDataType dataType, void* pData, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags) // DISCARDED: internal static byte VSliderScalarNative(byte* label, Vector2 size, ImGuiDataType dataType, void* pData, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags)

View file

@ -4828,4 +4828,3 @@ public unsafe partial class ImGuiNative
} }
} }

File diff suppressed because one or more lines are too long

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN public unsafe partial struct ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImBitVector public unsafe partial struct ImBitVector
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImBitVectorPtr public unsafe partial struct ImBitVectorPtr
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImChunkStreamImGuiTableSettings public unsafe partial struct ImChunkStreamImGuiTableSettings
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImChunkStreamImGuiWindowSettings public unsafe partial struct ImChunkStreamImGuiWindowSettings
{ {
} }

View file

@ -47,4 +47,3 @@ public unsafe partial struct ImColor
} }
} }
} }

View file

@ -32,4 +32,3 @@ public unsafe partial struct ImColorPtr
ImGuiNative.SetHSV(Handle, h, s, v, (float)(1.0f)); ImGuiNative.SetHSV(Handle, h, s, v, (float)(1.0f));
} }
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImDrawChannel public unsafe partial struct ImDrawChannel
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImDrawChannelPtr public unsafe partial struct ImDrawChannelPtr
{ {
} }

View file

@ -27,4 +27,3 @@ public unsafe partial struct ImDrawCmd
} }
} }
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImDrawCmdHeader public unsafe partial struct ImDrawCmdHeader
{ {
} }

View file

@ -21,4 +21,3 @@ public unsafe partial struct ImDrawCmdPtr
return ret; return ret;
} }
} }

View file

@ -40,4 +40,3 @@ public unsafe partial struct ImDrawData
} }
} }
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImDrawDataBuilder public unsafe partial struct ImDrawDataBuilder
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImDrawDataBuilderPtr public unsafe partial struct ImDrawDataBuilderPtr
{ {
} }

View file

@ -28,4 +28,3 @@ public unsafe partial struct ImDrawDataPtr
ImGuiNative.ScaleClipRects(Handle, fbScale); ImGuiNative.ScaleClipRects(Handle, fbScale);
} }
} }

View file

@ -756,4 +756,3 @@ public unsafe partial struct ImDrawList
} }
} }
// DISCARDED: AddText // DISCARDED: AddText

View file

@ -441,4 +441,3 @@ public unsafe partial struct ImDrawListPtr
} }
} }
// DISCARDED: AddText // DISCARDED: AddText

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImDrawListPtrPtr public unsafe partial struct ImDrawListPtrPtr
{ {
} }

View file

@ -19,4 +19,3 @@ public unsafe partial struct ImDrawListSharedData
} }
} }
} }

View file

@ -16,4 +16,3 @@ public unsafe partial struct ImDrawListSharedDataPtr
ImGuiNative.Destroy(Handle); ImGuiNative.Destroy(Handle);
} }
} }

View file

@ -84,4 +84,3 @@ public unsafe partial struct ImDrawListSplitter
} }
} }
} }

View file

@ -57,4 +57,3 @@ public unsafe partial struct ImDrawListSplitterPtr
} }
} }
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImDrawVert public unsafe partial struct ImDrawVert
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImDrawVertPtr public unsafe partial struct ImDrawVertPtr
{ {
} }

View file

@ -174,4 +174,3 @@ public unsafe partial struct ImFont
// DISCARDED: GetDebugName // DISCARDED: GetDebugName
// DISCARDED: GetDebugNameS // DISCARDED: GetDebugNameS
// DISCARDED: RenderText // DISCARDED: RenderText

View file

@ -1829,4 +1829,3 @@ public unsafe partial struct ImFontAtlas
// DISCARDED: AddFontFromMemoryCompressedBase85TTF // DISCARDED: AddFontFromMemoryCompressedBase85TTF
// DISCARDED: AddFontFromMemoryCompressedTTF // DISCARDED: AddFontFromMemoryCompressedTTF
// DISCARDED: AddFontFromMemoryTTF // DISCARDED: AddFontFromMemoryTTF

View file

@ -27,4 +27,3 @@ public unsafe partial struct ImFontAtlasCustomRect
} }
} }
} }

View file

@ -21,4 +21,3 @@ public unsafe partial struct ImFontAtlasCustomRectPtr
return ret != 0; return ret != 0;
} }
} }

View file

@ -1409,4 +1409,3 @@ public unsafe partial struct ImFontAtlasPtr
// DISCARDED: AddFontFromMemoryCompressedBase85TTF // DISCARDED: AddFontFromMemoryCompressedBase85TTF
// DISCARDED: AddFontFromMemoryCompressedTTF // DISCARDED: AddFontFromMemoryCompressedTTF
// DISCARDED: AddFontFromMemoryTTF // DISCARDED: AddFontFromMemoryTTF

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImFontAtlasTexture public unsafe partial struct ImFontAtlasTexture
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImFontAtlasTexturePtr public unsafe partial struct ImFontAtlasTexturePtr
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImFontBuilderIO public unsafe partial struct ImFontBuilderIO
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImFontBuilderIOPtr public unsafe partial struct ImFontBuilderIOPtr
{ {
} }

View file

@ -19,4 +19,3 @@ public unsafe partial struct ImFontConfig
} }
} }
} }

View file

@ -16,4 +16,3 @@ public unsafe partial struct ImFontConfigPtr
ImGuiNative.Destroy(Handle); ImGuiNative.Destroy(Handle);
} }
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImFontGlyph public unsafe partial struct ImFontGlyph
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImFontGlyphHotData public unsafe partial struct ImFontGlyphHotData
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImFontGlyphHotDataPtr public unsafe partial struct ImFontGlyphHotDataPtr
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImFontGlyphPtr public unsafe partial struct ImFontGlyphPtr
{ {
} }

View file

@ -73,4 +73,3 @@ public unsafe partial struct ImFontGlyphRangesBuilder
} }
} }
// DISCARDED: AddText // DISCARDED: AddText

View file

@ -49,4 +49,3 @@ public unsafe partial struct ImFontGlyphRangesBuilderPtr
} }
} }
// DISCARDED: AddText // DISCARDED: AddText

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImFontKerningPair public unsafe partial struct ImFontKerningPair
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImFontKerningPairPtr public unsafe partial struct ImFontKerningPairPtr
{ {
} }

View file

@ -114,4 +114,3 @@ public unsafe partial struct ImFontPtr
// DISCARDED: GetDebugName // DISCARDED: GetDebugName
// DISCARDED: GetDebugNameS // DISCARDED: GetDebugNameS
// DISCARDED: RenderText // DISCARDED: RenderText

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImFontPtrPtr public unsafe partial struct ImFontPtrPtr
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiColorMod public unsafe partial struct ImGuiColorMod
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiColorModPtr public unsafe partial struct ImGuiColorModPtr
{ {
} }

View file

@ -19,4 +19,3 @@ public unsafe partial struct ImGuiComboPreviewData
} }
} }
} }

View file

@ -16,4 +16,3 @@ public unsafe partial struct ImGuiComboPreviewDataPtr
ImGuiNative.Destroy(Handle); ImGuiNative.Destroy(Handle);
} }
} }

View file

@ -19,4 +19,3 @@ public unsafe partial struct ImGuiContext
} }
} }
} }

View file

@ -19,4 +19,3 @@ public unsafe partial struct ImGuiContextHook
} }
} }
} }

View file

@ -16,4 +16,3 @@ public unsafe partial struct ImGuiContextHookPtr
ImGuiNative.Destroy(Handle); ImGuiNative.Destroy(Handle);
} }
} }

View file

@ -16,4 +16,3 @@ public unsafe partial struct ImGuiContextPtr
ImGuiNative.Destroy(Handle); ImGuiNative.Destroy(Handle);
} }
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiDataTypeInfo public unsafe partial struct ImGuiDataTypeInfo
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiDataTypeInfoPtr public unsafe partial struct ImGuiDataTypeInfoPtr
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiDataTypeTempStorage public unsafe partial struct ImGuiDataTypeTempStorage
{ {
} }

View file

@ -19,4 +19,3 @@ public unsafe partial struct ImGuiDockContext
} }
} }
} }

View file

@ -16,4 +16,3 @@ public unsafe partial struct ImGuiDockContextPtr
ImGuiNative.Destroy(Handle); ImGuiNative.Destroy(Handle);
} }
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiDockNode public unsafe partial struct ImGuiDockNode
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiDockNodePtr public unsafe partial struct ImGuiDockNodePtr
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiDockNodeSettings public unsafe partial struct ImGuiDockNodeSettings
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiDockNodeSettingsPtr public unsafe partial struct ImGuiDockNodeSettingsPtr
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiDockRequest public unsafe partial struct ImGuiDockRequest
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiDockRequestPtr public unsafe partial struct ImGuiDockRequestPtr
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiGroupData public unsafe partial struct ImGuiGroupData
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiGroupDataPtr public unsafe partial struct ImGuiGroupDataPtr
{ {
} }

View file

@ -106,4 +106,3 @@ public unsafe partial struct ImGuiIO
// DISCARDED: AddInputCharacter // DISCARDED: AddInputCharacter
// DISCARDED: AddInputCharactersUTF8 // DISCARDED: AddInputCharactersUTF8
// DISCARDED: AddInputCharacterUTF16 // DISCARDED: AddInputCharacterUTF16

View file

@ -67,4 +67,3 @@ public unsafe partial struct ImGuiIOPtr
// DISCARDED: AddInputCharacter // DISCARDED: AddInputCharacter
// DISCARDED: AddInputCharactersUTF8 // DISCARDED: AddInputCharactersUTF8
// DISCARDED: AddInputCharacterUTF16 // DISCARDED: AddInputCharacterUTF16

View file

@ -19,4 +19,3 @@ public unsafe partial struct ImGuiInputEvent
} }
} }
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiInputEventAppFocused public unsafe partial struct ImGuiInputEventAppFocused
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiInputEventKey public unsafe partial struct ImGuiInputEventKey
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiInputEventMouseButton public unsafe partial struct ImGuiInputEventMouseButton
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiInputEventMousePos public unsafe partial struct ImGuiInputEventMousePos
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiInputEventMouseViewport public unsafe partial struct ImGuiInputEventMouseViewport
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiInputEventMouseWheel public unsafe partial struct ImGuiInputEventMouseWheel
{ {
} }

View file

@ -16,4 +16,3 @@ public unsafe partial struct ImGuiInputEventPtr
ImGuiNative.Destroy(Handle); ImGuiNative.Destroy(Handle);
} }
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiInputEventText public unsafe partial struct ImGuiInputEventText
{ {
} }

View file

@ -49,4 +49,3 @@ public unsafe partial struct ImGuiInputTextCallbackData
} }
} }
// DISCARDED: InsertChars // DISCARDED: InsertChars

View file

@ -34,4 +34,3 @@ public unsafe partial struct ImGuiInputTextCallbackDataPtr
} }
} }
// DISCARDED: InsertChars // DISCARDED: InsertChars

View file

@ -19,4 +19,3 @@ public unsafe partial struct ImGuiInputTextState
} }
} }
} }

View file

@ -16,4 +16,3 @@ public unsafe partial struct ImGuiInputTextStatePtr
ImGuiNative.Destroy(Handle); ImGuiNative.Destroy(Handle);
} }
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiKeyData public unsafe partial struct ImGuiKeyData
{ {
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiKeyDataPtr public unsafe partial struct ImGuiKeyDataPtr
{ {
} }

View file

@ -19,4 +19,3 @@ public unsafe partial struct ImGuiLastItemData
} }
} }
} }

View file

@ -16,4 +16,3 @@ public unsafe partial struct ImGuiLastItemDataPtr
ImGuiNative.Destroy(Handle); ImGuiNative.Destroy(Handle);
} }
} }

View file

@ -55,4 +55,3 @@ public unsafe partial struct ImGuiListClipper
} }
} }
} }

View file

@ -19,4 +19,3 @@ public unsafe partial struct ImGuiListClipperData
} }
} }
} }

View file

@ -16,4 +16,3 @@ public unsafe partial struct ImGuiListClipperDataPtr
ImGuiNative.Destroy(Handle); ImGuiNative.Destroy(Handle);
} }
} }

View file

@ -37,4 +37,3 @@ public unsafe partial struct ImGuiListClipperPtr
return ret != 0; return ret != 0;
} }
} }

View file

@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiListClipperRange public unsafe partial struct ImGuiListClipperRange
{ {
} }

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