Update to 1.68.

internals
Eric Mellino 6 years ago
parent dcb9b89d51
commit 4ef0abb391
  1. BIN
      deps/cimgui/linux-x64/cimgui.so
  2. BIN
      deps/cimgui/osx-x64/cimgui.dylib
  3. BIN
      deps/cimgui/win-x64/cimgui.dll
  4. BIN
      deps/cimgui/win-x86/cimgui.dll
  5. 3
      src/CodeGenerator/Program.cs
  6. 13927
      src/CodeGenerator/definitions.json
  7. 84
      src/CodeGenerator/structs_and_enums.json
  8. 6
      src/ImGui.NET/Generated/ImDrawData.gen.cs
  9. 36
      src/ImGui.NET/Generated/ImFont.gen.cs
  10. 5
      src/ImGui.NET/Generated/ImGui.gen.cs
  11. 4
      src/ImGui.NET/Generated/ImGuiIO.gen.cs
  12. 6
      src/ImGui.NET/Generated/ImGuiNative.gen.cs
  13. 2
      src/ImGui.NET/Generated/ImGuiStyle.gen.cs
  14. 3
      src/ImGui.NET/Generated/ImGuiStyleVar.gen.cs
  15. 4
      src/ImGui.NET/Generated/ImGuiTabBarFlags.gen.cs
  16. 27
      src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs
  17. 2
      src/ImGui.NET/ImGui.NET.csproj

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -423,6 +423,7 @@ namespace CodeGenerator
{
string exportedName = overload.ExportedName;
if (exportedName.Contains("~")) { continue; }
if (exportedName.Contains("ImVector_")) { continue; }
if (overload.Parameters.Any(tr => tr.Type.Contains('('))) { continue; } // TODO: Parse function pointer parameters.
string ret = GetTypeString(overload.ReturnType, false);
@ -1143,7 +1144,7 @@ namespace CodeGenerator
DefaultValues = defaultValues;
ReturnType = returnType.Replace("const", string.Empty).Replace("inline", string.Empty).Trim();
StructName = structName;
IsMemberFunction = structName != "ImGui";
IsMemberFunction = !string.IsNullOrEmpty(structName);
Comment = comment;
}
}

File diff suppressed because it is too large Load Diff

@ -1326,8 +1326,13 @@
},
{
"calc_value": 22,
"name": "ImGuiStyleVar_COUNT",
"name": "ImGuiStyleVar_SelectableTextAlign",
"value": 22
},
{
"calc_value": 23,
"name": "ImGuiStyleVar_COUNT",
"value": 23
}
],
"ImGuiTabBarFlags_": [
@ -1348,12 +1353,12 @@
},
{
"calc_value": 4,
"name": "ImGuiTabBarFlags_NoCloseWithMiddleMouseButton",
"name": "ImGuiTabBarFlags_TabListPopupButton",
"value": "1 << 2"
},
{
"calc_value": 8,
"name": "ImGuiTabBarFlags_NoTabListPopupButton",
"name": "ImGuiTabBarFlags_NoCloseWithMiddleMouseButton",
"value": "1 << 3"
},
{
@ -1742,6 +1747,10 @@
{
"name": "DisplaySize",
"type": "ImVec2"
},
{
"name": "FramebufferScale",
"type": "ImVec2"
}
],
"ImDrawList": [
@ -1829,55 +1838,55 @@
],
"ImFont": [
{
"name": "FontSize",
"name": "IndexAdvanceX",
"template_type": "float",
"type": "ImVector_float"
},
{
"name": "FallbackAdvanceX",
"type": "float"
},
{
"name": "Scale",
"name": "FontSize",
"type": "float"
},
{
"name": "DisplayOffset",
"type": "ImVec2"
"name": "IndexLookup",
"template_type": "ImWchar",
"type": "ImVector_ImWchar"
},
{
"name": "Glyphs",
"template_type": "ImFontGlyph",
"type": "ImVector_ImFontGlyph"
},
{
"name": "IndexAdvanceX",
"template_type": "float",
"type": "ImVector_float"
},
{
"name": "IndexLookup",
"template_type": "ImWchar",
"type": "ImVector_ImWchar"
},
{
"name": "FallbackGlyph",
"type": "const ImFontGlyph*"
},
{
"name": "FallbackAdvanceX",
"type": "float"
"name": "DisplayOffset",
"type": "ImVec2"
},
{
"name": "FallbackChar",
"type": "ImWchar"
"name": "ContainerAtlas",
"type": "ImFontAtlas*"
},
{
"name": "ConfigData",
"type": "const ImFontConfig*"
},
{
"name": "ConfigDataCount",
"type": "short"
},
{
"name": "ConfigData",
"type": "ImFontConfig*"
"name": "FallbackChar",
"type": "ImWchar"
},
{
"name": "ContainerAtlas",
"type": "ImFontAtlas*"
"name": "Scale",
"type": "float"
},
{
"name": "Ascent",
@ -1887,13 +1896,13 @@
"name": "Descent",
"type": "float"
},
{
"name": "DirtyLookupTables",
"type": "bool"
},
{
"name": "MetricsTotalSurface",
"type": "int"
},
{
"name": "DirtyLookupTables",
"type": "bool"
}
],
"ImFontAtlas": [
@ -2164,14 +2173,6 @@
"name": "DisplayFramebufferScale",
"type": "ImVec2"
},
{
"name": "DisplayVisibleMin",
"type": "ImVec2"
},
{
"name": "DisplayVisibleMax",
"type": "ImVec2"
},
{
"name": "MouseDrawCursor",
"type": "bool"
@ -2658,6 +2659,10 @@
"name": "ButtonTextAlign",
"type": "ImVec2"
},
{
"name": "SelectableTextAlign",
"type": "ImVec2"
},
{
"name": "DisplayWindowPadding",
"type": "ImVec2"
@ -2739,15 +2744,14 @@
"type": "float"
}
],
"ImVector": [],
"Pair": [
{
"name": "key",
"type": "ImGuiID"
},
{
"name": "}",
"type": "union { int val_i; float val_f; void* val_p;"
"name": "",
"type": "union { int val_i; float val_f; void* val_p;}"
}
],
"TextRange": [

@ -14,6 +14,7 @@ namespace ImGuiNET
public int TotalVtxCount;
public Vector2 DisplayPos;
public Vector2 DisplaySize;
public Vector2 FramebufferScale;
}
public unsafe partial struct ImDrawDataPtr
{
@ -30,6 +31,7 @@ namespace ImGuiNET
public ref int TotalVtxCount => ref Unsafe.AsRef<int>(&NativePtr->TotalVtxCount);
public ref Vector2 DisplayPos => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayPos);
public ref Vector2 DisplaySize => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplaySize);
public ref Vector2 FramebufferScale => ref Unsafe.AsRef<Vector2>(&NativePtr->FramebufferScale);
public void Clear()
{
ImGuiNative.ImDrawData_Clear(NativePtr);
@ -38,9 +40,9 @@ namespace ImGuiNET
{
ImGuiNative.ImDrawData_DeIndexAllBuffers(NativePtr);
}
public void ScaleClipRects(Vector2 sc)
public void ScaleClipRects(Vector2 fb_scale)
{
ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, sc);
ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, fb_scale);
}
}
}

@ -7,22 +7,22 @@ namespace ImGuiNET
{
public unsafe partial struct ImFont
{
public float FontSize;
public float Scale;
public Vector2 DisplayOffset;
public ImVector Glyphs;
public ImVector IndexAdvanceX;
public float FallbackAdvanceX;
public float FontSize;
public ImVector IndexLookup;
public ImVector Glyphs;
public ImFontGlyph* FallbackGlyph;
public float FallbackAdvanceX;
public ushort FallbackChar;
public short ConfigDataCount;
public ImFontConfig* ConfigData;
public Vector2 DisplayOffset;
public ImFontAtlas* ContainerAtlas;
public ImFontConfig* ConfigData;
public short ConfigDataCount;
public ushort FallbackChar;
public float Scale;
public float Ascent;
public float Descent;
public byte DirtyLookupTables;
public int MetricsTotalSurface;
public byte DirtyLookupTables;
}
public unsafe partial struct ImFontPtr
{
@ -32,22 +32,22 @@ namespace ImGuiNET
public static implicit operator ImFontPtr(ImFont* nativePtr) => new ImFontPtr(nativePtr);
public static implicit operator ImFont* (ImFontPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImFontPtr(IntPtr nativePtr) => new ImFontPtr(nativePtr);
public ref float FontSize => ref Unsafe.AsRef<float>(&NativePtr->FontSize);
public ref float Scale => ref Unsafe.AsRef<float>(&NativePtr->Scale);
public ref Vector2 DisplayOffset => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayOffset);
public ImPtrVector<ImFontGlyphPtr> Glyphs => new ImPtrVector<ImFontGlyphPtr>(NativePtr->Glyphs, Unsafe.SizeOf<ImFontGlyph>());
public ImVector<float> IndexAdvanceX => new ImVector<float>(NativePtr->IndexAdvanceX);
public ref float FallbackAdvanceX => ref Unsafe.AsRef<float>(&NativePtr->FallbackAdvanceX);
public ref float FontSize => ref Unsafe.AsRef<float>(&NativePtr->FontSize);
public ImVector<ushort> IndexLookup => new ImVector<ushort>(NativePtr->IndexLookup);
public ImPtrVector<ImFontGlyphPtr> Glyphs => new ImPtrVector<ImFontGlyphPtr>(NativePtr->Glyphs, Unsafe.SizeOf<ImFontGlyph>());
public ImFontGlyphPtr FallbackGlyph => new ImFontGlyphPtr(NativePtr->FallbackGlyph);
public ref float FallbackAdvanceX => ref Unsafe.AsRef<float>(&NativePtr->FallbackAdvanceX);
public ref ushort FallbackChar => ref Unsafe.AsRef<ushort>(&NativePtr->FallbackChar);
public ref short ConfigDataCount => ref Unsafe.AsRef<short>(&NativePtr->ConfigDataCount);
public ImFontConfigPtr ConfigData => new ImFontConfigPtr(NativePtr->ConfigData);
public ref Vector2 DisplayOffset => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayOffset);
public ImFontAtlasPtr ContainerAtlas => new ImFontAtlasPtr(NativePtr->ContainerAtlas);
public ImFontConfigPtr ConfigData => new ImFontConfigPtr(NativePtr->ConfigData);
public ref short ConfigDataCount => ref Unsafe.AsRef<short>(&NativePtr->ConfigDataCount);
public ref ushort FallbackChar => ref Unsafe.AsRef<ushort>(&NativePtr->FallbackChar);
public ref float Scale => ref Unsafe.AsRef<float>(&NativePtr->Scale);
public ref float Ascent => ref Unsafe.AsRef<float>(&NativePtr->Ascent);
public ref float Descent => ref Unsafe.AsRef<float>(&NativePtr->Descent);
public ref bool DirtyLookupTables => ref Unsafe.AsRef<bool>(&NativePtr->DirtyLookupTables);
public ref int MetricsTotalSurface => ref Unsafe.AsRef<int>(&NativePtr->MetricsTotalSurface);
public ref bool DirtyLookupTables => ref Unsafe.AsRef<bool>(&NativePtr->DirtyLookupTables);
public void AddGlyph(ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x)
{
ImGuiNative.ImFont_AddGlyph(NativePtr, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x);

@ -7727,6 +7727,11 @@ namespace ImGuiNET
byte ret = ImGuiNative.igIsAnyMouseDown();
return ret != 0;
}
public static bool IsItemActivated()
{
byte ret = ImGuiNative.igIsItemActivated();
return ret != 0;
}
public static bool IsItemActive()
{
byte ret = ImGuiNative.igIsItemActive();

@ -26,8 +26,6 @@ namespace ImGuiNET
public byte FontAllowUserScaling;
public ImFont* FontDefault;
public Vector2 DisplayFramebufferScale;
public Vector2 DisplayVisibleMin;
public Vector2 DisplayVisibleMax;
public byte MouseDrawCursor;
public byte ConfigMacOSXBehaviors;
public byte ConfigInputTextCursorBlink;
@ -120,8 +118,6 @@ namespace ImGuiNET
public ref bool FontAllowUserScaling => ref Unsafe.AsRef<bool>(&NativePtr->FontAllowUserScaling);
public ImFontPtr FontDefault => new ImFontPtr(NativePtr->FontDefault);
public ref Vector2 DisplayFramebufferScale => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayFramebufferScale);
public ref Vector2 DisplayVisibleMin => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayVisibleMin);
public ref Vector2 DisplayVisibleMax => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayVisibleMax);
public ref bool MouseDrawCursor => ref Unsafe.AsRef<bool>(&NativePtr->MouseDrawCursor);
public ref bool ConfigMacOSXBehaviors => ref Unsafe.AsRef<bool>(&NativePtr->ConfigMacOSXBehaviors);
public ref bool ConfigInputTextCursorBlink => ref Unsafe.AsRef<bool>(&NativePtr->ConfigInputTextCursorBlink);

@ -331,6 +331,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsAnyMouseDown();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsItemActivated();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsItemActive();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsItemClicked(int mouse_button);
@ -687,7 +689,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawData_ImDrawData();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawData_ScaleClipRects(ImDrawData* self, Vector2 sc);
public static extern void ImDrawData_ScaleClipRects(ImDrawData* self, Vector2 fb_scale);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddBezierCurve(ImDrawList* self, Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -967,6 +969,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self, float scale_factor);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiTextBuffer_append(ImGuiTextBuffer* self, byte* str, byte* str_end);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiTextBuffer_appendf(ImGuiTextBuffer* self, byte* fmt);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte* ImGuiTextBuffer_begin(ImGuiTextBuffer* self);

@ -32,6 +32,7 @@ namespace ImGuiNET
public float TabRounding;
public float TabBorderSize;
public Vector2 ButtonTextAlign;
public Vector2 SelectableTextAlign;
public Vector2 DisplayWindowPadding;
public Vector2 DisplaySafeAreaPadding;
public float MouseCursorScale;
@ -120,6 +121,7 @@ namespace ImGuiNET
public ref float TabRounding => ref Unsafe.AsRef<float>(&NativePtr->TabRounding);
public ref float TabBorderSize => ref Unsafe.AsRef<float>(&NativePtr->TabBorderSize);
public ref Vector2 ButtonTextAlign => ref Unsafe.AsRef<Vector2>(&NativePtr->ButtonTextAlign);
public ref Vector2 SelectableTextAlign => ref Unsafe.AsRef<Vector2>(&NativePtr->SelectableTextAlign);
public ref Vector2 DisplayWindowPadding => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayWindowPadding);
public ref Vector2 DisplaySafeAreaPadding => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplaySafeAreaPadding);
public ref float MouseCursorScale => ref Unsafe.AsRef<float>(&NativePtr->MouseCursorScale);

@ -24,6 +24,7 @@ namespace ImGuiNET
GrabRounding = 19,
TabRounding = 20,
ButtonTextAlign = 21,
COUNT = 22,
SelectableTextAlign = 22,
COUNT = 23,
}
}

@ -6,8 +6,8 @@ namespace ImGuiNET
None = 0,
Reorderable = 1 << 0,
AutoSelectNewTabs = 1 << 1,
NoCloseWithMiddleMouseButton = 1 << 2,
NoTabListPopupButton = 1 << 3,
TabListPopupButton = 1 << 2,
NoCloseWithMiddleMouseButton = 1 << 3,
NoTabListScrollingButtons = 1 << 4,
NoTooltip = 1 << 5,
FittingPolicyResizeDown = 1 << 6,

@ -18,6 +18,33 @@ namespace ImGuiNET
public static implicit operator ImGuiTextBuffer* (ImGuiTextBufferPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImGuiTextBufferPtr(IntPtr nativePtr) => new ImGuiTextBufferPtr(nativePtr);
public ImVector<byte> Buf => new ImVector<byte>(NativePtr->Buf);
public void append(string str)
{
byte* native_str;
int str_byteCount = 0;
if (str != null)
{
str_byteCount = Encoding.UTF8.GetByteCount(str);
if (str_byteCount > Util.StackAllocationSizeLimit)
{
native_str = Util.Allocate(str_byteCount + 1);
}
else
{
byte* native_str_stackBytes = stackalloc byte[str_byteCount + 1];
native_str = native_str_stackBytes;
}
int native_str_offset = Util.GetUtf8(str, native_str, str_byteCount);
native_str[native_str_offset] = 0;
}
else { native_str = null; }
byte* native_str_end = null;
ImGuiNative.ImGuiTextBuffer_append(NativePtr, native_str, native_str_end);
if (str_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_str);
}
}
public void appendf(string fmt)
{
byte* native_fmt;

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>A .NET wrapper for the Dear ImGui library.</Description>
<AssemblyVersion>1.67.0</AssemblyVersion>
<AssemblyVersion>1.68.0</AssemblyVersion>
<Authors>Eric Mellino</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

Loading…
Cancel
Save