Skip to content

Commit

Permalink
upgrade imgui.net to use imgui 1.90.7
Browse files Browse the repository at this point in the history
  • Loading branch information
zaafar committed Jun 5, 2024
1 parent 0b2d0f8 commit 73ff3c5
Show file tree
Hide file tree
Showing 13 changed files with 1,871 additions and 1,721 deletions.
Binary file modified deps/cimgui/linux-x64/cimgui.so
Binary file not shown.
Binary file modified deps/cimgui/osx/cimgui.dylib
Binary file not shown.
Binary file modified deps/cimgui/win-arm64/cimgui.dll
Binary file not shown.
Binary file modified deps/cimgui/win-x64/cimgui.dll
Binary file not shown.
Binary file modified deps/cimgui/win-x86/cimgui.dll
Binary file not shown.
2,998 changes: 1,528 additions & 1,470 deletions src/CodeGenerator/definitions/cimgui/definitions.json

Large diffs are not rendered by default.

502 changes: 271 additions & 231 deletions src/CodeGenerator/definitions/cimgui/structs_and_enums.json

Large diffs are not rendered by default.

59 changes: 44 additions & 15 deletions src/ImGui.NET/Generated/ImGui.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4588,61 +4588,70 @@ public static void DestroyPlatformWindows()
{
ImGuiNative.igDestroyPlatformWindows();
}
public static uint DockSpace(uint id)
public static uint DockSpace(uint dockspace_id)
{
Vector2 size = new Vector2();
ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0;
ImGuiWindowClass* window_class = null;
uint ret = ImGuiNative.igDockSpace(id, size, flags, window_class);
uint ret = ImGuiNative.igDockSpace(dockspace_id, size, flags, window_class);
return ret;
}
public static uint DockSpace(uint id, Vector2 size)
public static uint DockSpace(uint dockspace_id, Vector2 size)
{
ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0;
ImGuiWindowClass* window_class = null;
uint ret = ImGuiNative.igDockSpace(id, size, flags, window_class);
uint ret = ImGuiNative.igDockSpace(dockspace_id, size, flags, window_class);
return ret;
}
public static uint DockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags)
public static uint DockSpace(uint dockspace_id, Vector2 size, ImGuiDockNodeFlags flags)
{
ImGuiWindowClass* window_class = null;
uint ret = ImGuiNative.igDockSpace(id, size, flags, window_class);
uint ret = ImGuiNative.igDockSpace(dockspace_id, size, flags, window_class);
return ret;
}
public static uint DockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags, ImGuiWindowClassPtr window_class)
public static uint DockSpace(uint dockspace_id, Vector2 size, ImGuiDockNodeFlags flags, ImGuiWindowClassPtr window_class)
{
ImGuiWindowClass* native_window_class = window_class.NativePtr;
uint ret = ImGuiNative.igDockSpace(id, size, flags, native_window_class);
uint ret = ImGuiNative.igDockSpace(dockspace_id, size, flags, native_window_class);
return ret;
}
public static uint DockSpaceOverViewport()
{
uint dockspace_id = 0;
ImGuiViewport* viewport = null;
ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0;
ImGuiWindowClass* window_class = null;
uint ret = ImGuiNative.igDockSpaceOverViewport(viewport, flags, window_class);
uint ret = ImGuiNative.igDockSpaceOverViewport(dockspace_id, viewport, flags, window_class);
return ret;
}
public static uint DockSpaceOverViewport(ImGuiViewportPtr viewport)
public static uint DockSpaceOverViewport(uint dockspace_id)
{
ImGuiViewport* viewport = null;
ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0;
ImGuiWindowClass* window_class = null;
uint ret = ImGuiNative.igDockSpaceOverViewport(dockspace_id, viewport, flags, window_class);
return ret;
}
public static uint DockSpaceOverViewport(uint dockspace_id, ImGuiViewportPtr viewport)
{
ImGuiViewport* native_viewport = viewport.NativePtr;
ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0;
ImGuiWindowClass* window_class = null;
uint ret = ImGuiNative.igDockSpaceOverViewport(native_viewport, flags, window_class);
uint ret = ImGuiNative.igDockSpaceOverViewport(dockspace_id, native_viewport, flags, window_class);
return ret;
}
public static uint DockSpaceOverViewport(ImGuiViewportPtr viewport, ImGuiDockNodeFlags flags)
public static uint DockSpaceOverViewport(uint dockspace_id, ImGuiViewportPtr viewport, ImGuiDockNodeFlags flags)
{
ImGuiViewport* native_viewport = viewport.NativePtr;
ImGuiWindowClass* window_class = null;
uint ret = ImGuiNative.igDockSpaceOverViewport(native_viewport, flags, window_class);
uint ret = ImGuiNative.igDockSpaceOverViewport(dockspace_id, native_viewport, flags, window_class);
return ret;
}
public static uint DockSpaceOverViewport(ImGuiViewportPtr viewport, ImGuiDockNodeFlags flags, ImGuiWindowClassPtr window_class)
public static uint DockSpaceOverViewport(uint dockspace_id, ImGuiViewportPtr viewport, ImGuiDockNodeFlags flags, ImGuiWindowClassPtr window_class)
{
ImGuiViewport* native_viewport = viewport.NativePtr;
ImGuiWindowClass* native_window_class = window_class.NativePtr;
uint ret = ImGuiNative.igDockSpaceOverViewport(native_viewport, flags, native_window_class);
uint ret = ImGuiNative.igDockSpaceOverViewport(dockspace_id, native_viewport, flags, native_window_class);
return ret;
}
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_1_OR_GREATER
Expand Down Expand Up @@ -21232,6 +21241,15 @@ public static void SetNextItemOpen(bool is_open, ImGuiCond cond)
byte native_is_open = is_open ? (byte)1 : (byte)0;
ImGuiNative.igSetNextItemOpen(native_is_open, cond);
}
public static void SetNextItemShortcut(ImGuiKey key_chord)
{
ImGuiInputFlags flags = (ImGuiInputFlags)0;
ImGuiNative.igSetNextItemShortcut(key_chord, flags);
}
public static void SetNextItemShortcut(ImGuiKey key_chord, ImGuiInputFlags flags)
{
ImGuiNative.igSetNextItemShortcut(key_chord, flags);
}
public static void SetNextItemWidth(float item_width)
{
ImGuiNative.igSetNextItemWidth(item_width);
Expand Down Expand Up @@ -21903,6 +21921,17 @@ public static void SetWindowSize(string name, Vector2 size, ImGuiCond cond)
Util.Free(native_name);
}
}
public static bool Shortcut(ImGuiKey key_chord)
{
ImGuiInputFlags flags = (ImGuiInputFlags)0;
byte ret = ImGuiNative.igShortcut_Nil(key_chord, flags);
return ret != 0;
}
public static bool Shortcut(ImGuiKey key_chord, ImGuiInputFlags flags)
{
byte ret = ImGuiNative.igShortcut_Nil(key_chord, flags);
return ret != 0;
}
public static void ShowAboutWindow()
{
byte* p_open = null;
Expand Down
2 changes: 2 additions & 0 deletions src/ImGui.NET/Generated/ImGuiIO.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ public unsafe partial struct ImGuiIO
public fixed byte MouseDownOwned[5];
public fixed byte MouseDownOwnedUnlessPopupClose[5];
public byte MouseWheelRequestAxisSwap;
public byte MouseCtrlLeftAsRightClick;
public fixed float MouseDownDuration[5];
public fixed float MouseDownDurationPrev[5];
public Vector2 MouseDragMaxDistanceAbs_0;
Expand Down Expand Up @@ -364,6 +365,7 @@ public unsafe partial struct ImGuiIOPtr
public RangeAccessor<bool> MouseDownOwned => new RangeAccessor<bool>(NativePtr->MouseDownOwned, 5);
public RangeAccessor<bool> MouseDownOwnedUnlessPopupClose => new RangeAccessor<bool>(NativePtr->MouseDownOwnedUnlessPopupClose, 5);
public ref bool MouseWheelRequestAxisSwap => ref Unsafe.AsRef<bool>(&NativePtr->MouseWheelRequestAxisSwap);
public ref bool MouseCtrlLeftAsRightClick => ref Unsafe.AsRef<bool>(&NativePtr->MouseCtrlLeftAsRightClick);
public RangeAccessor<float> MouseDownDuration => new RangeAccessor<float>(NativePtr->MouseDownDuration, 5);
public RangeAccessor<float> MouseDownDurationPrev => new RangeAccessor<float>(NativePtr->MouseDownDurationPrev, 5);
public RangeAccessor<Vector2> MouseDragMaxDistanceAbs => new RangeAccessor<Vector2>(&NativePtr->MouseDragMaxDistanceAbs_0, 5);
Expand Down
18 changes: 18 additions & 0 deletions src/ImGui.NET/Generated/ImGuiInputFlags.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace ImGuiNET
{
[System.Flags]
public enum ImGuiInputFlags
{
None = 0,
Repeat = 1,
RouteActive = 1024,
RouteFocused = 2048,
RouteGlobal = 4096,
RouteAlways = 8192,
RouteOverFocused = 16384,
RouteOverActive = 32768,
RouteUnlessBgFocused = 65536,
RouteFromRootWindow = 131072,
Tooltip = 262144,
}
}
3 changes: 1 addition & 2 deletions src/ImGui.NET/Generated/ImGuiKey.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ public enum ImGuiKey
ModShift = 8192,
ModAlt = 16384,
ModSuper = 32768,
ModShortcut = 2048,
ModMask = 63488,
ModMask = 61440,
NamedKey_BEGIN = 512,
NamedKey_END = 666,
NamedKey_COUNT = 154,
Expand Down
8 changes: 6 additions & 2 deletions src/ImGui.NET/Generated/ImGuiNative.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igDestroyPlatformWindows();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern uint igDockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags, ImGuiWindowClass* window_class);
public static extern uint igDockSpace(uint dockspace_id, Vector2 size, ImGuiDockNodeFlags flags, ImGuiWindowClass* window_class);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern uint igDockSpaceOverViewport(ImGuiViewport* viewport, ImGuiDockNodeFlags flags, ImGuiWindowClass* window_class);
public static extern uint igDockSpaceOverViewport(uint dockspace_id, ImGuiViewport* viewport, ImGuiDockNodeFlags flags, ImGuiWindowClass* window_class);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragFloat(byte* label, float* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
Expand Down Expand Up @@ -581,6 +581,8 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextItemOpen(byte is_open, ImGuiCond cond);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextItemShortcut(ImGuiKey key_chord, ImGuiInputFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextItemWidth(float item_width);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowBgAlpha(float alpha);
Expand Down Expand Up @@ -641,6 +643,8 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetWindowSize_Str(byte* name, Vector2 size, ImGuiCond cond);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igShortcut_Nil(ImGuiKey key_chord, ImGuiInputFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igShowAboutWindow(byte* p_open);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igShowDebugLogWindow(byte* p_open);
Expand Down
2 changes: 1 addition & 1 deletion src/ImGui.NET/ImGui.NET.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>A .NET wrapper for the Dear ImGui library.</Description>
<AssemblyVersion>1.90.6.1</AssemblyVersion>
<AssemblyVersion>1.90.7.1</AssemblyVersion>
<Authors>Eric Mellino</Authors>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down

0 comments on commit 73ff3c5

Please sign in to comment.