Bump to 1.72b (NuGet version 1.72.0).

internals
Eric Mellino 5 years ago
parent 5e9d6be61d
commit 35aabdc9b8
  1. 3
      .gitignore
  2. BIN
      deps/cimgui/linux-x64/cimgui.so
  3. BIN
      deps/cimgui/osx-x64/cimgui.dylib
  4. BIN
      deps/cimgui/win-x64/cimgui.dll
  5. BIN
      deps/cimgui/win-x86/cimgui.dll
  6. 2
      src/CodeGenerator/CodeGenerator.csproj
  7. 4
      src/CodeGenerator/Program.cs
  8. 5552
      src/CodeGenerator/definitions.json
  9. 150
      src/CodeGenerator/structs_and_enums.json
  10. 8
      src/ImGui.NET.SampleProgram.XNA/ImGui.NET.SampleProgram.XNA.csproj
  11. 2
      src/ImGui.NET.SampleProgram/ImGuiController.cs
  12. 1
      src/ImGui.NET/Generated/ImDrawCornerFlags.gen.cs
  13. 44
      src/ImGui.NET/Generated/ImDrawList.gen.cs
  14. 14
      src/ImGui.NET/Generated/ImFontAtlas.gen.cs
  15. 20
      src/ImGui.NET/Generated/ImFontAtlasCustomRect.gen.cs
  16. 22
      src/ImGui.NET/Generated/ImGui.gen.cs
  17. 4
      src/ImGui.NET/Generated/ImGuiIO.gen.cs
  18. 15
      src/ImGui.NET/Generated/ImGuiKey.gen.cs
  19. 70
      src/ImGui.NET/Generated/ImGuiNative.gen.cs
  20. 2
      src/ImGui.NET/Generated/ImGuiStorage.gen.cs
  21. 2
      src/ImGui.NET/Generated/ImGuiStyle.gen.cs
  22. 2
      src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs
  23. 40
      src/ImGui.NET/Generated/ImGuiTextRange.gen.cs
  24. 50
      src/ImGui.NET/Generated/TextRange.gen.cs
  25. 2
      src/ImGui.NET/ImGui.NET.csproj
  26. 12
      src/ImGui.NET/Pair.cs

3
.gitignore vendored

@ -260,3 +260,6 @@ Session.vim
# download dir
deps/
# VS Launch
launchSettings.json

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>

@ -56,7 +56,7 @@ namespace CodeGenerator
"ImVector",
"ImVec2",
"ImVec4",
"Pair",
"ImGuiStoragePair",
};
private static readonly Dictionary<string, string> s_wellKnownDefaultValues = new Dictionary<string, string>()
@ -70,7 +70,7 @@ namespace CodeGenerator
{ "ImVec2(0,1)", "new Vector2(0, 1)" },
{ "ImVec4(0,0,0,0)", "new Vector4()" },
{ "ImVec4(1,1,1,1)", "new Vector4(1, 1, 1, 1)" },
{ "ImDrawCornerFlags_All", "(int)ImDrawCornerFlags.All" },
{ "ImDrawCornerFlags_All", "ImDrawCornerFlags.All" },
{ "FLT_MAX", "float.MaxValue" },
{ "(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0))", "0xFFFFFFFF" }
};

File diff suppressed because it is too large Load Diff

@ -1,6 +1,11 @@
{
"enums": {
"ImDrawCornerFlags_": [
{
"calc_value": 0,
"name": "ImDrawCornerFlags_None",
"value": "0"
},
{
"calc_value": 1,
"name": "ImDrawCornerFlags_TopLeft",
@ -1033,38 +1038,43 @@
},
{
"calc_value": 15,
"name": "ImGuiKey_A",
"name": "ImGuiKey_KeyPadEnter",
"value": 15
},
{
"calc_value": 16,
"name": "ImGuiKey_C",
"name": "ImGuiKey_A",
"value": 16
},
{
"calc_value": 17,
"name": "ImGuiKey_V",
"name": "ImGuiKey_C",
"value": 17
},
{
"calc_value": 18,
"name": "ImGuiKey_X",
"name": "ImGuiKey_V",
"value": 18
},
{
"calc_value": 19,
"name": "ImGuiKey_Y",
"name": "ImGuiKey_X",
"value": 19
},
{
"calc_value": 20,
"name": "ImGuiKey_Z",
"name": "ImGuiKey_Y",
"value": 20
},
{
"calc_value": 21,
"name": "ImGuiKey_COUNT",
"name": "ImGuiKey_Z",
"value": 21
},
{
"calc_value": 22,
"name": "ImGuiKey_COUNT",
"value": 22
}
],
"ImGuiMouseCursor_": [
@ -1700,40 +1710,6 @@
]
},
"structs": {
"CustomRect": [
{
"name": "ID",
"type": "unsigned int"
},
{
"name": "Width",
"type": "unsigned short"
},
{
"name": "Height",
"type": "unsigned short"
},
{
"name": "X",
"type": "unsigned short"
},
{
"name": "Y",
"type": "unsigned short"
},
{
"name": "GlyphAdvanceX",
"type": "float"
},
{
"name": "GlyphOffset",
"type": "ImVec2"
},
{
"name": "Font",
"type": "ImFont*"
}
],
"ImColor": [
{
"name": "Value",
@ -2030,8 +2006,8 @@
},
{
"name": "CustomRects",
"template_type": "CustomRect",
"type": "ImVector_CustomRect"
"template_type": "ImFontAtlasCustomRect",
"type": "ImVector_ImFontAtlasCustomRect"
},
{
"name": "ConfigData",
@ -2044,6 +2020,40 @@
"type": "int"
}
],
"ImFontAtlasCustomRect": [
{
"name": "ID",
"type": "unsigned int"
},
{
"name": "Width",
"type": "unsigned short"
},
{
"name": "Height",
"type": "unsigned short"
},
{
"name": "X",
"type": "unsigned short"
},
{
"name": "Y",
"type": "unsigned short"
},
{
"name": "GlyphAdvanceX",
"type": "float"
},
{
"name": "GlyphOffset",
"type": "ImVec2"
},
{
"name": "Font",
"type": "ImFont*"
}
],
"ImFontConfig": [
{
"name": "FontData",
@ -2211,7 +2221,7 @@
},
{
"name": "KeyMap[ImGuiKey_COUNT]",
"size": 21,
"size": 22,
"type": "int"
},
{
@ -2632,8 +2642,18 @@
"ImGuiStorage": [
{
"name": "Data",
"template_type": "Pair",
"type": "ImVector_Pair"
"template_type": "ImGuiStoragePair",
"type": "ImVector_ImGuiStoragePair"
}
],
"ImGuiStoragePair": [
{
"name": "key",
"type": "ImGuiID"
},
{
"name": "",
"type": "union { int val_i; float val_f; void* val_p;}"
}
],
"ImGuiStyle": [
@ -2737,6 +2757,10 @@
"name": "TabBorderSize",
"type": "float"
},
{
"name": "ColorButtonPosition",
"type": "ImGuiDir"
},
{
"name": "ButtonTextAlign",
"type": "ImVec2"
@ -2790,14 +2814,24 @@
},
{
"name": "Filters",
"template_type": "TextRange",
"type": "ImVector_TextRange"
"template_type": "ImGuiTextRange",
"type": "ImVector_ImGuiTextRange"
},
{
"name": "CountGrep",
"type": "int"
}
],
"ImGuiTextRange": [
{
"name": "b",
"type": "const char*"
},
{
"name": "e",
"type": "const char*"
}
],
"ImVec2": [
{
"name": "x",
@ -2825,26 +2859,6 @@
"name": "w",
"type": "float"
}
],
"Pair": [
{
"name": "key",
"type": "ImGuiID"
},
{
"name": "",
"type": "union { int val_i; float val_f; void* val_p;}"
}
],
"TextRange": [
{
"name": "b",
"type": "const char*"
},
{
"name": "e",
"type": "const char*"
}
]
}
}

@ -5,7 +5,7 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AssemblyName>ImGuiNET.SampleProgram.XNA</AssemblyName>
<RootNamespace>ImGuiNET.SampleProgram.XNA</RootNamespace>
<TargetFramework>net462</TargetFramework>
<TargetFramework>net472</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
@ -15,10 +15,8 @@
<ItemGroup>
<Content Include="$(RepositoryRootDirectory)/deps/cimgui/win-x64/cimgui.dll" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(RepositoryRootDirectory)/deps/cimgui/osx-x64/cimgui.dylib" CopyToOutputDirectory="PreserveNewest"
Link="lib%(Filename)%(Extension)" />
<Content Include="$(RepositoryRootDirectory)/deps/cimgui/linux-x64/cimgui.so" CopyToOutputDirectory="PreserveNewest"
Link="lib%(Filename)%(Extension)" />
<Content Include="$(RepositoryRootDirectory)/deps/cimgui/osx-x64/cimgui.dylib" CopyToOutputDirectory="PreserveNewest" Link="lib%(Filename)%(Extension)" />
<Content Include="$(RepositoryRootDirectory)/deps/cimgui/linux-x64/cimgui.so" CopyToOutputDirectory="PreserveNewest" Link="lib%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>

@ -61,7 +61,7 @@ namespace ImGuiNET
IntPtr context = ImGui.CreateContext();
ImGui.SetCurrentContext(context);
var fonts = ImGui.GetIO().Fonts;
ImGui.GetIO().Fonts.AddFontDefault();
CreateDeviceResources(gd, outputDescription);

@ -3,6 +3,7 @@ namespace ImGuiNET
[System.Flags]
public enum ImDrawCornerFlags
{
None = 0,
TopLeft = 1 << 0,
TopRight = 1 << 1,
BotLeft = 1 << 2,

@ -156,10 +156,10 @@ namespace ImGuiNET
}
public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding)
{
int rounding_corners = (int)ImDrawCornerFlags.All;
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners);
}
public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, int rounding_corners)
public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, ImDrawCornerFlags rounding_corners)
{
ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners);
}
@ -196,39 +196,39 @@ namespace ImGuiNET
public void AddRect(Vector2 a, Vector2 b, uint col)
{
float rounding = 0.0f;
int rounding_corners_flags = (int)ImDrawCornerFlags.All;
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners_flags, thickness);
ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners, thickness);
}
public void AddRect(Vector2 a, Vector2 b, uint col, float rounding)
{
int rounding_corners_flags = (int)ImDrawCornerFlags.All;
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners_flags, thickness);
ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners, thickness);
}
public void AddRect(Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags)
public void AddRect(Vector2 a, Vector2 b, uint col, float rounding, ImDrawCornerFlags rounding_corners)
{
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners_flags, thickness);
ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners, thickness);
}
public void AddRect(Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags, float thickness)
public void AddRect(Vector2 a, Vector2 b, uint col, float rounding, ImDrawCornerFlags rounding_corners, float thickness)
{
ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners_flags, thickness);
ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners, thickness);
}
public void AddRectFilled(Vector2 a, Vector2 b, uint col)
{
float rounding = 0.0f;
int rounding_corners_flags = (int)ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags);
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners);
}
public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding)
{
int rounding_corners_flags = (int)ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags);
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners);
}
public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags)
public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding, ImDrawCornerFlags rounding_corners)
{
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags);
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners);
}
public void AddRectFilledMultiColor(Vector2 a, Vector2 b, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left)
{
@ -327,17 +327,17 @@ namespace ImGuiNET
public void PathRect(Vector2 rect_min, Vector2 rect_max)
{
float rounding = 0.0f;
int rounding_corners_flags = (int)ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags);
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners);
}
public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding)
{
int rounding_corners_flags = (int)ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags);
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners);
}
public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding, int rounding_corners_flags)
public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding, ImDrawCornerFlags rounding_corners)
{
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags);
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners);
}
public void PathStroke(uint col, bool closed)
{

@ -43,7 +43,7 @@ namespace ImGuiNET
public ref Vector2 TexUvScale => ref Unsafe.AsRef<Vector2>(&NativePtr->TexUvScale);
public ref Vector2 TexUvWhitePixel => ref Unsafe.AsRef<Vector2>(&NativePtr->TexUvWhitePixel);
public ImVector<ImFontPtr> Fonts => new ImVector<ImFontPtr>(NativePtr->Fonts);
public ImVector<CustomRect> CustomRects => new ImVector<CustomRect>(NativePtr->CustomRects);
public ImPtrVector<ImFontAtlasCustomRectPtr> CustomRects => new ImPtrVector<ImFontAtlasCustomRectPtr>(NativePtr->CustomRects, Unsafe.SizeOf<ImFontAtlasCustomRect>());
public ImPtrVector<ImFontConfigPtr> ConfigData => new ImPtrVector<ImFontConfigPtr>(NativePtr->ConfigData, Unsafe.SizeOf<ImFontConfig>());
public RangeAccessor<int> CustomRectIds => new RangeAccessor<int>(NativePtr->CustomRectIds, 1);
public int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x)
@ -309,10 +309,9 @@ namespace ImGuiNET
byte ret = ImGuiNative.ImFontAtlas_Build(NativePtr);
return ret != 0;
}
public void CalcCustomRectUV(ref CustomRect rect, out Vector2 out_uv_min, out Vector2 out_uv_max)
{
fixed (CustomRect* native_rect = &rect)
public void CalcCustomRectUV(ImFontAtlasCustomRectPtr rect, out Vector2 out_uv_min, out Vector2 out_uv_max)
{
ImFontAtlasCustomRect* native_rect = rect.NativePtr;
fixed (Vector2* native_out_uv_min = &out_uv_min)
{
fixed (Vector2* native_out_uv_max = &out_uv_max)
@ -321,7 +320,6 @@ namespace ImGuiNET
}
}
}
}
public void Clear()
{
ImGuiNative.ImFontAtlas_Clear(NativePtr);
@ -342,10 +340,10 @@ namespace ImGuiNET
{
ImGuiNative.ImFontAtlas_destroy(NativePtr);
}
public CustomRect* GetCustomRectByIndex(int index)
public ImFontAtlasCustomRectPtr GetCustomRectByIndex(int index)
{
CustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex(NativePtr, index);
return ret;
ImFontAtlasCustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex(NativePtr, index);
return new ImFontAtlasCustomRectPtr(ret);
}
public IntPtr GetGlyphRangesChineseFull()
{

@ -5,7 +5,7 @@ using System.Text;
namespace ImGuiNET
{
public unsafe partial struct CustomRect
public unsafe partial struct ImFontAtlasCustomRect
{
public uint ID;
public ushort Width;
@ -16,14 +16,14 @@ namespace ImGuiNET
public Vector2 GlyphOffset;
public ImFont* Font;
}
public unsafe partial struct CustomRectPtr
public unsafe partial struct ImFontAtlasCustomRectPtr
{
public CustomRect* NativePtr { get; }
public CustomRectPtr(CustomRect* nativePtr) => NativePtr = nativePtr;
public CustomRectPtr(IntPtr nativePtr) => NativePtr = (CustomRect*)nativePtr;
public static implicit operator CustomRectPtr(CustomRect* nativePtr) => new CustomRectPtr(nativePtr);
public static implicit operator CustomRect* (CustomRectPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator CustomRectPtr(IntPtr nativePtr) => new CustomRectPtr(nativePtr);
public ImFontAtlasCustomRect* NativePtr { get; }
public ImFontAtlasCustomRectPtr(ImFontAtlasCustomRect* nativePtr) => NativePtr = nativePtr;
public ImFontAtlasCustomRectPtr(IntPtr nativePtr) => NativePtr = (ImFontAtlasCustomRect*)nativePtr;
public static implicit operator ImFontAtlasCustomRectPtr(ImFontAtlasCustomRect* nativePtr) => new ImFontAtlasCustomRectPtr(nativePtr);
public static implicit operator ImFontAtlasCustomRect* (ImFontAtlasCustomRectPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImFontAtlasCustomRectPtr(IntPtr nativePtr) => new ImFontAtlasCustomRectPtr(nativePtr);
public ref uint ID => ref Unsafe.AsRef<uint>(&NativePtr->ID);
public ref ushort Width => ref Unsafe.AsRef<ushort>(&NativePtr->Width);
public ref ushort Height => ref Unsafe.AsRef<ushort>(&NativePtr->Height);
@ -34,11 +34,11 @@ namespace ImGuiNET
public ImFontPtr Font => new ImFontPtr(NativePtr->Font);
public void Destroy()
{
ImGuiNative.CustomRect_destroy(NativePtr);
ImGuiNative.ImFontAtlasCustomRect_destroy(NativePtr);
}
public bool IsPacked()
{
byte ret = ImGuiNative.CustomRect_IsPacked(NativePtr);
byte ret = ImGuiNative.ImFontAtlasCustomRect_IsPacked(NativePtr);
return ret != 0;
}
}

@ -10470,6 +10470,15 @@ namespace ImGuiNET
void* native_custom_callback_data = (void*)custom_callback_data.ToPointer();
ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, native_custom_callback_data);
}
public static void SetScrollFromPosX(float local_x)
{
float center_x_ratio = 0.5f;
ImGuiNative.igSetScrollFromPosX(local_x, center_x_ratio);
}
public static void SetScrollFromPosX(float local_x, float center_x_ratio)
{
ImGuiNative.igSetScrollFromPosX(local_x, center_x_ratio);
}
public static void SetScrollFromPosY(float local_y)
{
float center_y_ratio = 0.5f;
@ -10479,6 +10488,15 @@ namespace ImGuiNET
{
ImGuiNative.igSetScrollFromPosY(local_y, center_y_ratio);
}
public static void SetScrollHereX()
{
float center_x_ratio = 0.5f;
ImGuiNative.igSetScrollHereX(center_x_ratio);
}
public static void SetScrollHereX(float center_x_ratio)
{
ImGuiNative.igSetScrollHereX(center_x_ratio);
}
public static void SetScrollHereY()
{
float center_y_ratio = 0.5f;
@ -12561,10 +12579,6 @@ namespace ImGuiNET
Util.Free(native_fmt);
}
}
public static void TreeAdvanceToLabelPos()
{
ImGuiNative.igTreeAdvanceToLabelPos();
}
public static bool TreeNode(string label)
{
byte* native_label;

@ -17,7 +17,7 @@ namespace ImGuiNET
public float MouseDoubleClickTime;
public float MouseDoubleClickMaxDist;
public float MouseDragThreshold;
public fixed int KeyMap[21];
public fixed int KeyMap[22];
public float KeyRepeatDelay;
public float KeyRepeatRate;
public void* UserData;
@ -110,7 +110,7 @@ namespace ImGuiNET
public ref float MouseDoubleClickTime => ref Unsafe.AsRef<float>(&NativePtr->MouseDoubleClickTime);
public ref float MouseDoubleClickMaxDist => ref Unsafe.AsRef<float>(&NativePtr->MouseDoubleClickMaxDist);
public ref float MouseDragThreshold => ref Unsafe.AsRef<float>(&NativePtr->MouseDragThreshold);
public RangeAccessor<int> KeyMap => new RangeAccessor<int>(NativePtr->KeyMap, 21);
public RangeAccessor<int> KeyMap => new RangeAccessor<int>(NativePtr->KeyMap, 22);
public ref float KeyRepeatDelay => ref Unsafe.AsRef<float>(&NativePtr->KeyRepeatDelay);
public ref float KeyRepeatRate => ref Unsafe.AsRef<float>(&NativePtr->KeyRepeatRate);
public IntPtr UserData { get => (IntPtr)NativePtr->UserData; set => NativePtr->UserData = (void*)value; }

@ -17,12 +17,13 @@ namespace ImGuiNET
Space = 12,
Enter = 13,
Escape = 14,
A = 15,
C = 16,
V = 17,
X = 18,
Y = 19,
Z = 20,
COUNT = 21,
KeyPadEnter = 15,
A = 16,
C = 17,
V = 18,
X = 19,
Y = 20,
Z = 21,
COUNT = 22,
}
}

@ -6,12 +6,6 @@ namespace ImGuiNET
{
public static unsafe partial class ImGuiNative
{
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern CustomRect* CustomRect_CustomRect();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void CustomRect_destroy(CustomRect* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte CustomRect_IsPacked(CustomRect* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiPayload* igAcceptDragDropPayload(byte* type, ImGuiDragDropFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -549,8 +543,12 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback, void* custom_callback_data);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollFromPosX(float local_x, float center_x_ratio);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollFromPosY(float local_y, float center_y_ratio);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollHereX(float center_x_ratio);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollHereY(float center_y_ratio);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollX(float scroll_x);
@ -637,8 +635,6 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igTextWrapped(byte* fmt);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igTreeAdvanceToLabelPos();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igTreeNodeStr(byte* label);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igTreeNodeStrStr(byte* str_id, byte* fmt);
@ -719,7 +715,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddImageQuad(ImDrawList* self, IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddImageRounded(ImDrawList* self, IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, int rounding_corners);
public static extern void ImDrawList_AddImageRounded(ImDrawList* self, IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, ImDrawCornerFlags rounding_corners);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddLine(ImDrawList* self, Vector2 a, Vector2 b, uint col, float thickness);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -729,9 +725,9 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddQuadFilled(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddRect(ImDrawList* self, Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags, float thickness);
public static extern void ImDrawList_AddRect(ImDrawList* self, Vector2 a, Vector2 b, uint col, float rounding, ImDrawCornerFlags rounding_corners, float thickness);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddRectFilled(ImDrawList* self, Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags);
public static extern void ImDrawList_AddRectFilled(ImDrawList* self, Vector2 a, Vector2 b, uint col, float rounding, ImDrawCornerFlags rounding_corners);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddRectFilledMultiColor(ImDrawList* self, Vector2 a, Vector2 b, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -777,7 +773,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_PathLineToMergeDuplicate(ImDrawList* self, Vector2 pos);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_PathRect(ImDrawList* self, Vector2 rect_min, Vector2 rect_max, float rounding, int rounding_corners_flags);
public static extern void ImDrawList_PathRect(ImDrawList* self, Vector2 rect_min, Vector2 rect_max, float rounding, ImDrawCornerFlags rounding_corners);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_PathStroke(ImDrawList* self, uint col, byte closed, float thickness);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -875,7 +871,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImFontAtlas_Build(ImFontAtlas* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontAtlas_CalcCustomRectUV(ImFontAtlas* self, CustomRect* rect, Vector2* out_uv_min, Vector2* out_uv_max);
public static extern void ImFontAtlas_CalcCustomRectUV(ImFontAtlas* self, ImFontAtlasCustomRect* rect, Vector2* out_uv_min, Vector2* out_uv_max);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontAtlas_Clear(ImFontAtlas* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -887,7 +883,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontAtlas_destroy(ImFontAtlas* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern CustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self, int index);
public static extern ImFontAtlasCustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self, int index);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ushort* ImFontAtlas_GetGlyphRangesChineseFull(ImFontAtlas* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -921,6 +917,12 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontAtlas_SetTexID(ImFontAtlas* self, IntPtr id);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontAtlasCustomRect_destroy(ImFontAtlasCustomRect* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImFontAtlasCustomRect* ImFontAtlasCustomRect_ImFontAtlasCustomRect();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImFontAtlasCustomRect_IsPacked(ImFontAtlasCustomRect* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontConfig_destroy(ImFontConfig* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImFontConfig* ImFontConfig_ImFontConfig();
@ -1019,6 +1021,14 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiStorage_SetVoidPtr(ImGuiStorage* self, uint key, void* val);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiStoragePair_destroy(ImGuiStoragePair* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePairInt(uint _key, int _val_i);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePairFloat(uint _key, float _val_f);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePairPtr(uint _key, void* _val_p);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiStyle_destroy(ImGuiStyle* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiStyle* ImGuiStyle_ImGuiStyle();
@ -1061,6 +1071,16 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiTextFilter_PassFilter(ImGuiTextFilter* self, byte* text, byte* text_end);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiTextRange_destroy(ImGuiTextRange* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiTextRange_empty(ImGuiTextRange* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRange();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRangeStr(byte* _b, byte* _e);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiTextRange_split(ImGuiTextRange* self, byte separator, ImVector* @out);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImVec2_destroy(Vector2* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2* ImVec2_ImVec2();
@ -1072,27 +1092,5 @@ namespace ImGuiNET
public static extern Vector4* ImVec4_ImVec4();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Vector4* ImVec4_ImVec4Float(float _x, float _y, float _z, float _w);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void Pair_destroy(Pair* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Pair* Pair_PairInt(uint _key, int _val_i);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Pair* Pair_PairFloat(uint _key, float _val_f);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Pair* Pair_PairPtr(uint _key, void* _val_p);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte* TextRange_begin(TextRange* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void TextRange_destroy(TextRange* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte TextRange_empty(TextRange* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte* TextRange_end(TextRange* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void TextRange_split(TextRange* self, byte separator, ImVector* @out);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern TextRange* TextRange_TextRange();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern TextRange* TextRange_TextRangeStr(byte* _b, byte* _e);
}
}

@ -17,7 +17,7 @@ namespace ImGuiNET
public static implicit operator ImGuiStoragePtr(ImGuiStorage* nativePtr) => new ImGuiStoragePtr(nativePtr);
public static implicit operator ImGuiStorage* (ImGuiStoragePtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImGuiStoragePtr(IntPtr nativePtr) => new ImGuiStoragePtr(nativePtr);
public ImVector<Pair> Data => new ImVector<Pair>(NativePtr->Data);
public ImPtrVector<ImGuiStoragePairPtr> Data => new ImPtrVector<ImGuiStoragePairPtr>(NativePtr->Data, Unsafe.SizeOf<ImGuiStoragePair>());
public void BuildSortByKey()
{
ImGuiNative.ImGuiStorage_BuildSortByKey(NativePtr);

@ -32,6 +32,7 @@ namespace ImGuiNET
public float GrabRounding;
public float TabRounding;
public float TabBorderSize;
public ImGuiDir ColorButtonPosition;
public Vector2 ButtonTextAlign;
public Vector2 SelectableTextAlign;
public Vector2 DisplayWindowPadding;
@ -122,6 +123,7 @@ namespace ImGuiNET
public ref float GrabRounding => ref Unsafe.AsRef<float>(&NativePtr->GrabRounding);
public ref float TabRounding => ref Unsafe.AsRef<float>(&NativePtr->TabRounding);
public ref float TabBorderSize => ref Unsafe.AsRef<float>(&NativePtr->TabBorderSize);
public ref ImGuiDir ColorButtonPosition => ref Unsafe.AsRef<ImGuiDir>(&NativePtr->ColorButtonPosition);
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);

@ -20,7 +20,7 @@ namespace ImGuiNET
public static implicit operator ImGuiTextFilter* (ImGuiTextFilterPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImGuiTextFilterPtr(IntPtr nativePtr) => new ImGuiTextFilterPtr(nativePtr);
public RangeAccessor<byte> InputBuf => new RangeAccessor<byte>(NativePtr->InputBuf, 256);
public ImVector<TextRange> Filters => new ImVector<TextRange>(NativePtr->Filters);
public ImPtrVector<ImGuiTextRangePtr> Filters => new ImPtrVector<ImGuiTextRangePtr>(NativePtr->Filters, Unsafe.SizeOf<ImGuiTextRange>());
public ref int CountGrep => ref Unsafe.AsRef<int>(&NativePtr->CountGrep);
public void Build()
{

@ -0,0 +1,40 @@
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Text;
namespace ImGuiNET
{
public unsafe partial struct ImGuiTextRange
{
public byte* b;
public byte* e;
}
public unsafe partial struct ImGuiTextRangePtr
{
public ImGuiTextRange* NativePtr { get; }
public ImGuiTextRangePtr(ImGuiTextRange* nativePtr) => NativePtr = nativePtr;
public ImGuiTextRangePtr(IntPtr nativePtr) => NativePtr = (ImGuiTextRange*)nativePtr;
public static implicit operator ImGuiTextRangePtr(ImGuiTextRange* nativePtr) => new ImGuiTextRangePtr(nativePtr);
public static implicit operator ImGuiTextRange* (ImGuiTextRangePtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImGuiTextRangePtr(IntPtr nativePtr) => new ImGuiTextRangePtr(nativePtr);
public IntPtr b { get => (IntPtr)NativePtr->b; set => NativePtr->b = (byte*)value; }
public IntPtr e { get => (IntPtr)NativePtr->e; set => NativePtr->e = (byte*)value; }
public void Destroy()
{
ImGuiNative.ImGuiTextRange_destroy(NativePtr);
}
public bool empty()
{
byte ret = ImGuiNative.ImGuiTextRange_empty(NativePtr);
return ret != 0;
}
public void split(byte separator, out ImVector @out)
{
fixed (ImVector* native_out = &@out)
{
ImGuiNative.ImGuiTextRange_split(NativePtr, separator, native_out);
}
}
}
}

@ -1,50 +0,0 @@
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Text;
namespace ImGuiNET
{
public unsafe partial struct TextRange
{
public byte* b;
public byte* e;
}
public unsafe partial struct TextRangePtr
{
public TextRange* NativePtr { get; }
public TextRangePtr(TextRange* nativePtr) => NativePtr = nativePtr;
public TextRangePtr(IntPtr nativePtr) => NativePtr = (TextRange*)nativePtr;
public static implicit operator TextRangePtr(TextRange* nativePtr) => new TextRangePtr(nativePtr);
public static implicit operator TextRange* (TextRangePtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator TextRangePtr(IntPtr nativePtr) => new TextRangePtr(nativePtr);
public IntPtr b { get => (IntPtr)NativePtr->b; set => NativePtr->b = (byte*)value; }
public IntPtr e { get => (IntPtr)NativePtr->e; set => NativePtr->e = (byte*)value; }
public string begin()
{
byte* ret = ImGuiNative.TextRange_begin(NativePtr);
return Util.StringFromPtr(ret);
}
public void Destroy()
{
ImGuiNative.TextRange_destroy(NativePtr);
}
public bool empty()
{
byte ret = ImGuiNative.TextRange_empty(NativePtr);
return ret != 0;
}
public string end()
{
byte* ret = ImGuiNative.TextRange_end(NativePtr);
return Util.StringFromPtr(ret);
}
public void split(byte separator, out ImVector @out)
{
fixed (ImVector* native_out = &@out)
{
ImGuiNative.TextRange_split(NativePtr, separator, native_out);
}
}
}
}

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

@ -3,12 +3,22 @@ using System.Runtime.InteropServices;
namespace ImGuiNET
{
public struct Pair
public struct ImGuiStoragePair
{
public uint Key;
public UnionValue Value;
}
public unsafe struct ImGuiStoragePairPtr
{
public ImGuiStoragePair* NativePtr { get; }
public ImGuiStoragePairPtr(ImGuiStoragePair* nativePtr) => NativePtr = nativePtr;
public ImGuiStoragePairPtr(IntPtr nativePtr) => NativePtr = (ImGuiStoragePair*)nativePtr;
public static implicit operator ImGuiStoragePairPtr(ImGuiStoragePair* nativePtr) => new ImGuiStoragePairPtr(nativePtr);
public static implicit operator ImGuiStoragePair*(ImGuiStoragePairPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImGuiStoragePairPtr(IntPtr nativePtr) => new ImGuiStoragePairPtr(nativePtr);
}
[StructLayout(LayoutKind.Explicit)]
public struct UnionValue
{

Loading…
Cancel
Save