Skip to content

Commit

Permalink
Update to v1.86.
Browse files Browse the repository at this point in the history
  • Loading branch information
mellinoe committed Jan 1, 2022
1 parent ad8a51e commit 690c05e
Show file tree
Hide file tree
Showing 14 changed files with 2,768 additions and 1,674 deletions.
Binary file modified deps/cimgui/linux-x64/cimgui.so
Binary file not shown.
Binary file modified deps/cimgui/osx-x64/cimgui.dylib
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.
3,523 changes: 2,174 additions & 1,349 deletions src/CodeGenerator/definitions/cimgui/definitions.json

Large diffs are not rendered by default.

839 changes: 538 additions & 301 deletions src/CodeGenerator/definitions/cimgui/structs_and_enums.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/ImGui.NET.SampleProgram/MemoryEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using ImGuiNET;
using System.Numerics;

#if false

namespace ImGuiNET
{
// C# port of ocornut's imgui_memory_editor.h - https://gist.github.com/ocornut/0673e37e54aff644298b
Expand Down Expand Up @@ -274,4 +276,5 @@ public unsafe void Begin(int count, float items_height = -1.0f)
}
}
}
}
}
#endif
7 changes: 4 additions & 3 deletions src/ImGui.NET.SampleProgram/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Program
private static GraphicsDevice _gd;
private static CommandList _cl;
private static ImGuiController _controller;
private static MemoryEditor _memoryEditor;
// private static MemoryEditor _memoryEditor;

// UI state
private static float _f = 0.0f;
Expand Down Expand Up @@ -47,7 +47,7 @@ static void Main(string[] args)
};
_cl = _gd.ResourceFactory.CreateCommandList();
_controller = new ImGuiController(_gd, _gd.MainSwapchain.Framebuffer.OutputDescription, _window.Width, _window.Height);
_memoryEditor = new MemoryEditor();
// _memoryEditor = new MemoryEditor();
Random random = new Random();
_memoryEditorData = Enumerable.Range(0, 1024).Select(i => (byte)random.Next(255)).ToArray();

Expand Down Expand Up @@ -197,7 +197,8 @@ private static unsafe void SubmitUI()

if (_showMemoryEditor)
{
_memoryEditor.Draw("Memory Editor", _memoryEditorData, _memoryEditorData.Length);
ImGui.Text("Memory editor currently supported.");
// _memoryEditor.Draw("Memory Editor", _memoryEditorData, _memoryEditorData.Length);
}
}
}
Expand Down
22 changes: 17 additions & 5 deletions src/ImGui.NET/Generated/ImGui.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6424,6 +6424,11 @@ public static ImGuiViewportPtr GetMainViewport()
ImGuiViewport* ret = ImGuiNative.igGetMainViewport();
return new ImGuiViewportPtr(ret);
}
public static int GetMouseClickedCount(ImGuiMouseButton button)
{
int ret = ImGuiNative.igGetMouseClickedCount(button);
return ret;
}
public static ImGuiMouseCursor GetMouseCursor()
{
ImGuiMouseCursor ret = ImGuiNative.igGetMouseCursor();
Expand Down Expand Up @@ -6544,11 +6549,6 @@ public static Vector2 GetWindowContentRegionMin()
ImGuiNative.igGetWindowContentRegionMin(&__retval);
return __retval;
}
public static float GetWindowContentRegionWidth()
{
float ret = ImGuiNative.igGetWindowContentRegionWidth();
return ret;
}
public static uint GetWindowDockID()
{
uint ret = ImGuiNative.igGetWindowDockID();
Expand Down Expand Up @@ -11268,6 +11268,18 @@ public static void ShowMetricsWindow(ref bool p_open)
ImGuiNative.igShowMetricsWindow(native_p_open);
p_open = native_p_open_val != 0;
}
public static void ShowStackToolWindow()
{
byte* p_open = null;
ImGuiNative.igShowStackToolWindow(p_open);
}
public static void ShowStackToolWindow(ref bool p_open)
{
byte native_p_open_val = p_open ? (byte)1 : (byte)0;
byte* native_p_open = &native_p_open_val;
ImGuiNative.igShowStackToolWindow(native_p_open);
p_open = native_p_open_val != 0;
}
public static void ShowStyleEditor()
{
ImGuiStyle* @ref = null;
Expand Down
2 changes: 2 additions & 0 deletions src/ImGui.NET/Generated/ImGuiFocusedFlags.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ public enum ImGuiFocusedFlags
ChildWindows = 1,
RootWindow = 2,
AnyWindow = 4,
NoPopupHierarchy = 8,
DockHierarchy = 16,
RootAndChildWindows = 3,
}
}
12 changes: 7 additions & 5 deletions src/ImGui.NET/Generated/ImGuiHoveredFlags.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ public enum ImGuiHoveredFlags
ChildWindows = 1,
RootWindow = 2,
AnyWindow = 4,
AllowWhenBlockedByPopup = 8,
AllowWhenBlockedByActiveItem = 32,
AllowWhenOverlapped = 64,
AllowWhenDisabled = 128,
RectOnly = 104,
NoPopupHierarchy = 8,
DockHierarchy = 16,
AllowWhenBlockedByPopup = 32,
AllowWhenBlockedByActiveItem = 128,
AllowWhenOverlapped = 256,
AllowWhenDisabled = 512,
RectOnly = 416,
RootAndChildWindows = 3,
}
}
12 changes: 10 additions & 2 deletions src/ImGui.NET/Generated/ImGuiIO.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public unsafe partial struct ImGuiIO
public ImFont* FontDefault;
public Vector2 DisplayFramebufferScale;
public byte ConfigDockingNoSplit;
public byte ConfigDockingWithShift;
public byte ConfigDockingAlwaysTabBar;
public byte ConfigDockingTransparentPayload;
public byte ConfigViewportsNoAutoMerge;
Expand Down Expand Up @@ -73,6 +74,7 @@ public unsafe partial struct ImGuiIO
public int MetricsActiveWindows;
public int MetricsActiveAllocations;
public Vector2 MouseDelta;
public byte WantCaptureMouseUnlessPopupClose;
public ImGuiKeyModFlags KeyMods;
public ImGuiKeyModFlags KeyModsPrev;
public Vector2 MousePosPrev;
Expand All @@ -84,9 +86,11 @@ public unsafe partial struct ImGuiIO
public fixed double MouseClickedTime[5];
public fixed byte MouseClicked[5];
public fixed byte MouseDoubleClicked[5];
public fixed ushort MouseClickedCount[5];
public fixed ushort MouseClickedLastCount[5];
public fixed byte MouseReleased[5];
public fixed byte MouseDownOwned[5];
public fixed byte MouseDownWasDoubleClick[5];
public fixed byte MouseDownOwnedUnlessPopupClose[5];
public fixed float MouseDownDuration[5];
public fixed float MouseDownDurationPrev[5];
public Vector2 MouseDragMaxDistanceAbs_0;
Expand Down Expand Up @@ -132,6 +136,7 @@ public unsafe partial struct ImGuiIOPtr
public ImFontPtr FontDefault => new ImFontPtr(NativePtr->FontDefault);
public ref Vector2 DisplayFramebufferScale => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayFramebufferScale);
public ref bool ConfigDockingNoSplit => ref Unsafe.AsRef<bool>(&NativePtr->ConfigDockingNoSplit);
public ref bool ConfigDockingWithShift => ref Unsafe.AsRef<bool>(&NativePtr->ConfigDockingWithShift);
public ref bool ConfigDockingAlwaysTabBar => ref Unsafe.AsRef<bool>(&NativePtr->ConfigDockingAlwaysTabBar);
public ref bool ConfigDockingTransparentPayload => ref Unsafe.AsRef<bool>(&NativePtr->ConfigDockingTransparentPayload);
public ref bool ConfigViewportsNoAutoMerge => ref Unsafe.AsRef<bool>(&NativePtr->ConfigViewportsNoAutoMerge);
Expand Down Expand Up @@ -178,16 +183,19 @@ public unsafe partial struct ImGuiIOPtr
public ref int MetricsActiveWindows => ref Unsafe.AsRef<int>(&NativePtr->MetricsActiveWindows);
public ref int MetricsActiveAllocations => ref Unsafe.AsRef<int>(&NativePtr->MetricsActiveAllocations);
public ref Vector2 MouseDelta => ref Unsafe.AsRef<Vector2>(&NativePtr->MouseDelta);
public ref bool WantCaptureMouseUnlessPopupClose => ref Unsafe.AsRef<bool>(&NativePtr->WantCaptureMouseUnlessPopupClose);
public ref ImGuiKeyModFlags KeyMods => ref Unsafe.AsRef<ImGuiKeyModFlags>(&NativePtr->KeyMods);
public ref ImGuiKeyModFlags KeyModsPrev => ref Unsafe.AsRef<ImGuiKeyModFlags>(&NativePtr->KeyModsPrev);
public ref Vector2 MousePosPrev => ref Unsafe.AsRef<Vector2>(&NativePtr->MousePosPrev);
public RangeAccessor<Vector2> MouseClickedPos => new RangeAccessor<Vector2>(&NativePtr->MouseClickedPos_0, 5);
public RangeAccessor<double> MouseClickedTime => new RangeAccessor<double>(NativePtr->MouseClickedTime, 5);
public RangeAccessor<bool> MouseClicked => new RangeAccessor<bool>(NativePtr->MouseClicked, 5);
public RangeAccessor<bool> MouseDoubleClicked => new RangeAccessor<bool>(NativePtr->MouseDoubleClicked, 5);
public RangeAccessor<ushort> MouseClickedCount => new RangeAccessor<ushort>(NativePtr->MouseClickedCount, 5);
public RangeAccessor<ushort> MouseClickedLastCount => new RangeAccessor<ushort>(NativePtr->MouseClickedLastCount, 5);
public RangeAccessor<bool> MouseReleased => new RangeAccessor<bool>(NativePtr->MouseReleased, 5);
public RangeAccessor<bool> MouseDownOwned => new RangeAccessor<bool>(NativePtr->MouseDownOwned, 5);
public RangeAccessor<bool> MouseDownWasDoubleClick => new RangeAccessor<bool>(NativePtr->MouseDownWasDoubleClick, 5);
public RangeAccessor<bool> MouseDownOwnedUnlessPopupClose => new RangeAccessor<bool>(NativePtr->MouseDownOwnedUnlessPopupClose, 5);
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
10 changes: 6 additions & 4 deletions src/ImGui.NET/Generated/ImGuiListClipper.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ public unsafe partial struct ImGuiListClipper
public int DisplayStart;
public int DisplayEnd;
public int ItemsCount;
public int StepNo;
public int ItemsFrozen;
public float ItemsHeight;
public float StartPosY;
public void* TempData;
}
public unsafe partial struct ImGuiListClipperPtr
{
Expand All @@ -26,10 +25,9 @@ public unsafe partial struct ImGuiListClipperPtr
public ref int DisplayStart => ref Unsafe.AsRef<int>(&NativePtr->DisplayStart);
public ref int DisplayEnd => ref Unsafe.AsRef<int>(&NativePtr->DisplayEnd);
public ref int ItemsCount => ref Unsafe.AsRef<int>(&NativePtr->ItemsCount);
public ref int StepNo => ref Unsafe.AsRef<int>(&NativePtr->StepNo);
public ref int ItemsFrozen => ref Unsafe.AsRef<int>(&NativePtr->ItemsFrozen);
public ref float ItemsHeight => ref Unsafe.AsRef<float>(&NativePtr->ItemsHeight);
public ref float StartPosY => ref Unsafe.AsRef<float>(&NativePtr->StartPosY);
public IntPtr TempData { get => (IntPtr)NativePtr->TempData; set => NativePtr->TempData = (void*)value; }
public void Begin(int items_count)
{
float items_height = -1.0f;
Expand All @@ -47,6 +45,10 @@ public void End()
{
ImGuiNative.ImGuiListClipper_End((ImGuiListClipper*)(NativePtr));
}
public void ForceDisplayRangeByIndices(int item_min, int item_max)
{
ImGuiNative.ImGuiListClipper_ForceDisplayRangeByIndices((ImGuiListClipper*)(NativePtr), item_min, item_max);
}
public bool Step()
{
byte ret = ImGuiNative.ImGuiListClipper_Step((ImGuiListClipper*)(NativePtr));
Expand Down
10 changes: 6 additions & 4 deletions src/ImGui.NET/Generated/ImGuiNative.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igCalcItemWidth();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igCalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igCalcTextSize(Vector2* pOut, byte* text, byte* text_end, byte hide_text_after_double_hash, float wrap_width);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igCaptureKeyboardFromApp(byte want_capture_keyboard_value);
Expand Down Expand Up @@ -267,6 +265,8 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiViewport* igGetMainViewport();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern int igGetMouseClickedCount(ImGuiMouseButton button);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiMouseCursor igGetMouseCursor();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetMouseDragDelta(Vector2* pOut, ImGuiMouseButton button, float lock_threshold);
Expand Down Expand Up @@ -307,8 +307,6 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetWindowContentRegionMin(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetWindowContentRegionWidth();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern uint igGetWindowDockID();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetWindowDpiScale();
Expand Down Expand Up @@ -637,6 +635,8 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igShowMetricsWindow(byte* p_open);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igShowStackToolWindow(byte* p_open);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igShowStyleEditor(ImGuiStyle* @ref);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igShowStyleSelector(byte* label);
Expand Down Expand Up @@ -1091,6 +1091,8 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiListClipper_End(ImGuiListClipper* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiListClipper_ForceDisplayRangeByIndices(ImGuiListClipper* self, int item_min, int item_max);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiListClipper* ImGuiListClipper_ImGuiListClipper();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiListClipper_Step(ImGuiListClipper* self);
Expand Down

0 comments on commit 690c05e

Please sign in to comment.