Skip to content

Commit

Permalink
Updating ImGui to 1.84.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zaafar committed Sep 14, 2021
1 parent 7243a0f commit 1256c76
Show file tree
Hide file tree
Showing 22 changed files with 3,488 additions and 2,310 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.
4,241 changes: 2,555 additions & 1,686 deletions src/CodeGenerator/definitions/cimgui/definitions.json

Large diffs are not rendered by default.

879 changes: 528 additions & 351 deletions src/CodeGenerator/definitions/cimgui/structs_and_enums.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/ImGui.NET.SampleProgram/MemoryEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public unsafe void Draw(string title, byte[] mem_data, int mem_size, int base_di
float scroll_offset = ((DataEditingAddr / Rows) - (data_editing_addr_backup / Rows)) * line_height;
bool scroll_desired = (scroll_offset < 0.0f && DataEditingAddr < visible_start_addr + Rows * 2) || (scroll_offset > 0.0f && DataEditingAddr > visible_end_addr - Rows * 2);
if (scroll_desired)
ImGuiNative.igSetScrollYFloat(ImGuiNative.igGetScrollY() + scroll_offset);
ImGuiNative.igSetScrollY_Float(ImGuiNative.igGetScrollY() + scroll_offset);
}

for (int line_i = clipper.DisplayStart; line_i < clipper.DisplayEnd; line_i++) // display only visible items
Expand Down
5 changes: 5 additions & 0 deletions src/ImGui.NET/Generated/ImDrawCmd.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,10 @@ public void Destroy()
{
ImGuiNative.ImDrawCmd_destroy((ImDrawCmd*)(NativePtr));
}
public IntPtr GetTexID()
{
IntPtr ret = ImGuiNative.ImDrawCmd_GetTexID((ImDrawCmd*)(NativePtr));
return ret;
}
}
}
4 changes: 4 additions & 0 deletions src/ImGui.NET/Generated/ImDrawList.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ public void _ResetForNewFrame()
{
ImGuiNative.ImDrawList__ResetForNewFrame((ImDrawList*)(NativePtr));
}
public void _TryMergeDrawCmds()
{
ImGuiNative.ImDrawList__TryMergeDrawCmds((ImDrawList*)(NativePtr));
}
public void AddBezierCubic(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness)
{
int num_segments = 0;
Expand Down
6 changes: 2 additions & 4 deletions src/ImGui.NET/Generated/ImFont.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public unsafe partial struct ImFont
public short ConfigDataCount;
public ushort FallbackChar;
public ushort EllipsisChar;
public ushort DotChar;
public byte DirtyLookupTables;
public float Scale;
public float Ascent;
Expand All @@ -44,6 +45,7 @@ public unsafe partial struct ImFontPtr
public ref short ConfigDataCount => ref Unsafe.AsRef<short>(&NativePtr->ConfigDataCount);
public ref ushort FallbackChar => ref Unsafe.AsRef<ushort>(&NativePtr->FallbackChar);
public ref ushort EllipsisChar => ref Unsafe.AsRef<ushort>(&NativePtr->EllipsisChar);
public ref ushort DotChar => ref Unsafe.AsRef<ushort>(&NativePtr->DotChar);
public ref bool DirtyLookupTables => ref Unsafe.AsRef<bool>(&NativePtr->DirtyLookupTables);
public ref float Scale => ref Unsafe.AsRef<float>(&NativePtr->Scale);
public ref float Ascent => ref Unsafe.AsRef<float>(&NativePtr->Ascent);
Expand Down Expand Up @@ -111,10 +113,6 @@ public void RenderChar(ImDrawListPtr draw_list, float size, Vector2 pos, uint co
ImDrawList* native_draw_list = draw_list.NativePtr;
ImGuiNative.ImFont_RenderChar((ImFont*)(NativePtr), native_draw_list, size, pos, col, c);
}
public void SetFallbackChar(ushort c)
{
ImGuiNative.ImFont_SetFallbackChar((ImFont*)(NativePtr), c);
}
public void SetGlyphVisible(ushort c, bool visible)
{
byte native_visible = visible ? (byte)1 : (byte)0;
Expand Down
2 changes: 2 additions & 0 deletions src/ImGui.NET/Generated/ImFontAtlas.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public unsafe partial struct ImFontAtlas
public int TexDesiredWidth;
public int TexGlyphPadding;
public byte Locked;
public byte TexReady;
public byte TexPixelsUseColors;
public byte* TexPixelsAlpha8;
public uint* TexPixelsRGBA32;
Expand Down Expand Up @@ -104,6 +105,7 @@ public unsafe partial struct ImFontAtlasPtr
public ref int TexDesiredWidth => ref Unsafe.AsRef<int>(&NativePtr->TexDesiredWidth);
public ref int TexGlyphPadding => ref Unsafe.AsRef<int>(&NativePtr->TexGlyphPadding);
public ref bool Locked => ref Unsafe.AsRef<bool>(&NativePtr->Locked);
public ref bool TexReady => ref Unsafe.AsRef<bool>(&NativePtr->TexReady);
public ref bool TexPixelsUseColors => ref Unsafe.AsRef<bool>(&NativePtr->TexPixelsUseColors);
public IntPtr TexPixelsAlpha8 { get => (IntPtr)NativePtr->TexPixelsAlpha8; set => NativePtr->TexPixelsAlpha8 = (byte*)value; }
public IntPtr TexPixelsRGBA32 { get => (IntPtr)NativePtr->TexPixelsRGBA32; set => NativePtr->TexPixelsRGBA32 = (uint*)value; }
Expand Down
332 changes: 215 additions & 117 deletions src/ImGui.NET/Generated/ImGui.gen.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/ImGui.NET/Generated/ImGuiColorEditFlags.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public enum ImGuiColorEditFlags
PickerHueWheel = 67108864,
InputRGB = 134217728,
InputHSV = 268435456,
OptionsDefault = 177209344,
DefaultOptions = 177209344,
DisplayMask = 7340032,
DataTypeMask = 25165824,
PickerMask = 100663296,
Expand Down
27 changes: 19 additions & 8 deletions src/ImGui.NET/Generated/ImGuiIO.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ 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 @@ -59,7 +58,7 @@ public unsafe partial struct ImGuiIO
public byte KeyAlt;
public byte KeySuper;
public fixed byte KeysDown[512];
public fixed float NavInputs[21];
public fixed float NavInputs[20];
public byte WantCaptureMouse;
public byte WantCaptureKeyboard;
public byte WantTextInput;
Expand All @@ -75,6 +74,7 @@ public unsafe partial struct ImGuiIO
public int MetricsActiveAllocations;
public Vector2 MouseDelta;
public ImGuiKeyModFlags KeyMods;
public ImGuiKeyModFlags KeyModsPrev;
public Vector2 MousePosPrev;
public Vector2 MouseClickedPos_0;
public Vector2 MouseClickedPos_1;
Expand All @@ -97,9 +97,10 @@ public unsafe partial struct ImGuiIO
public fixed float MouseDragMaxDistanceSqr[5];
public fixed float KeysDownDuration[512];
public fixed float KeysDownDurationPrev[512];
public fixed float NavInputsDownDuration[21];
public fixed float NavInputsDownDurationPrev[21];
public fixed float NavInputsDownDuration[20];
public fixed float NavInputsDownDurationPrev[20];
public float PenPressure;
public byte AppFocusLost;
public ushort InputQueueSurrogate;
public ImVector InputQueueCharacters;
}
Expand Down Expand Up @@ -131,7 +132,6 @@ 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 @@ -163,7 +163,7 @@ public unsafe partial struct ImGuiIOPtr
public ref bool KeyAlt => ref Unsafe.AsRef<bool>(&NativePtr->KeyAlt);
public ref bool KeySuper => ref Unsafe.AsRef<bool>(&NativePtr->KeySuper);
public RangeAccessor<bool> KeysDown => new RangeAccessor<bool>(NativePtr->KeysDown, 512);
public RangeAccessor<float> NavInputs => new RangeAccessor<float>(NativePtr->NavInputs, 21);
public RangeAccessor<float> NavInputs => new RangeAccessor<float>(NativePtr->NavInputs, 20);
public ref bool WantCaptureMouse => ref Unsafe.AsRef<bool>(&NativePtr->WantCaptureMouse);
public ref bool WantCaptureKeyboard => ref Unsafe.AsRef<bool>(&NativePtr->WantCaptureKeyboard);
public ref bool WantTextInput => ref Unsafe.AsRef<bool>(&NativePtr->WantTextInput);
Expand All @@ -179,6 +179,7 @@ public unsafe partial struct ImGuiIOPtr
public ref int MetricsActiveAllocations => ref Unsafe.AsRef<int>(&NativePtr->MetricsActiveAllocations);
public ref Vector2 MouseDelta => ref Unsafe.AsRef<Vector2>(&NativePtr->MouseDelta);
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);
Expand All @@ -193,11 +194,17 @@ public unsafe partial struct ImGuiIOPtr
public RangeAccessor<float> MouseDragMaxDistanceSqr => new RangeAccessor<float>(NativePtr->MouseDragMaxDistanceSqr, 5);
public RangeAccessor<float> KeysDownDuration => new RangeAccessor<float>(NativePtr->KeysDownDuration, 512);
public RangeAccessor<float> KeysDownDurationPrev => new RangeAccessor<float>(NativePtr->KeysDownDurationPrev, 512);
public RangeAccessor<float> NavInputsDownDuration => new RangeAccessor<float>(NativePtr->NavInputsDownDuration, 21);
public RangeAccessor<float> NavInputsDownDurationPrev => new RangeAccessor<float>(NativePtr->NavInputsDownDurationPrev, 21);
public RangeAccessor<float> NavInputsDownDuration => new RangeAccessor<float>(NativePtr->NavInputsDownDuration, 20);
public RangeAccessor<float> NavInputsDownDurationPrev => new RangeAccessor<float>(NativePtr->NavInputsDownDurationPrev, 20);
public ref float PenPressure => ref Unsafe.AsRef<float>(&NativePtr->PenPressure);
public ref bool AppFocusLost => ref Unsafe.AsRef<bool>(&NativePtr->AppFocusLost);
public ref ushort InputQueueSurrogate => ref Unsafe.AsRef<ushort>(&NativePtr->InputQueueSurrogate);
public ImVector<ushort> InputQueueCharacters => new ImVector<ushort>(NativePtr->InputQueueCharacters);
public void AddFocusEvent(bool focused)
{
byte native_focused = focused ? (byte)1 : (byte)0;
ImGuiNative.ImGuiIO_AddFocusEvent((ImGuiIO*)(NativePtr), native_focused);
}
public void AddInputCharacter(uint c)
{
ImGuiNative.ImGuiIO_AddInputCharacter((ImGuiIO*)(NativePtr), c);
Expand Down Expand Up @@ -236,6 +243,10 @@ public void ClearInputCharacters()
{
ImGuiNative.ImGuiIO_ClearInputCharacters((ImGuiIO*)(NativePtr));
}
public void ClearInputKeys()
{
ImGuiNative.ImGuiIO_ClearInputKeys((ImGuiIO*)(NativePtr));
}
public void Destroy()
{
ImGuiNative.ImGuiIO_destroy((ImGuiIO*)(NativePtr));
Expand Down
2 changes: 0 additions & 2 deletions src/ImGui.NET/Generated/ImGuiInputTextFlags.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@ public enum ImGuiInputTextFlags
CharsScientific = 131072,
CallbackResize = 262144,
CallbackEdit = 524288,
Multiline = 1048576,
NoMarkEdited = 2097152,
}
}
Loading

0 comments on commit 1256c76

Please sign in to comment.