Skip to content

Commit 489f847

Browse files
committed
Update to v1.70.
1 parent 34a0848 commit 489f847

File tree

7 files changed

+67
-52
lines changed

7 files changed

+67
-52
lines changed

src/CodeGenerator/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace CodeGenerator
1212
{
13-
class Program
13+
internal static class Program
1414
{
1515
private static readonly Dictionary<string, string> s_wellKnownTypes = new Dictionary<string, string>()
1616
{

src/CodeGenerator/definitions.json

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -718,11 +718,11 @@
718718
"type": "ImU32"
719719
}
720720
],
721-
"argsoriginal": "(ImTextureID user_texture_id,const ImVec2& a,const ImVec2& b,const ImVec2& uv_a=ImVec2(0,0),const ImVec2& uv_b=ImVec2(1,1),ImU32 col=0xFFFFFFFF)",
721+
"argsoriginal": "(ImTextureID user_texture_id,const ImVec2& a,const ImVec2& b,const ImVec2& uv_a=ImVec2(0,0),const ImVec2& uv_b=ImVec2(1,1),ImU32 col=(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0)))",
722722
"call_args": "(user_texture_id,a,b,uv_a,uv_b,col)",
723723
"cimguiname": "ImDrawList_AddImage",
724724
"defaults": {
725-
"col": "0xFFFFFFFF",
725+
"col": "(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0))",
726726
"uv_a": "ImVec2(0,0)",
727727
"uv_b": "ImVec2(1,1)"
728728
},
@@ -782,11 +782,11 @@
782782
"type": "ImU32"
783783
}
784784
],
785-
"argsoriginal": "(ImTextureID user_texture_id,const ImVec2& a,const ImVec2& b,const ImVec2& c,const ImVec2& d,const ImVec2& uv_a=ImVec2(0,0),const ImVec2& uv_b=ImVec2(1,0),const ImVec2& uv_c=ImVec2(1,1),const ImVec2& uv_d=ImVec2(0,1),ImU32 col=0xFFFFFFFF)",
785+
"argsoriginal": "(ImTextureID user_texture_id,const ImVec2& a,const ImVec2& b,const ImVec2& c,const ImVec2& d,const ImVec2& uv_a=ImVec2(0,0),const ImVec2& uv_b=ImVec2(1,0),const ImVec2& uv_c=ImVec2(1,1),const ImVec2& uv_d=ImVec2(0,1),ImU32 col=(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0)))",
786786
"call_args": "(user_texture_id,a,b,c,d,uv_a,uv_b,uv_c,uv_d,col)",
787787
"cimguiname": "ImDrawList_AddImageQuad",
788788
"defaults": {
789-
"col": "0xFFFFFFFF",
789+
"col": "(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0))",
790790
"uv_a": "ImVec2(0,0)",
791791
"uv_b": "ImVec2(1,0)",
792792
"uv_c": "ImVec2(1,1)",
@@ -18524,7 +18524,7 @@
1852418524
],
1852518525
"igDebugCheckVersionAndDataLayout": [
1852618526
{
18527-
"args": "(const char* version_str,size_t sz_io,size_t sz_style,size_t sz_vec2,size_t sz_vec4,size_t sz_drawvert)",
18527+
"args": "(const char* version_str,size_t sz_io,size_t sz_style,size_t sz_vec2,size_t sz_vec4,size_t sz_drawvert,size_t sz_drawidx)",
1852818528
"argsT": [
1852918529
{
1853018530
"name": "version_str",
@@ -18549,17 +18549,21 @@
1854918549
{
1855018550
"name": "sz_drawvert",
1855118551
"type": "size_t"
18552+
},
18553+
{
18554+
"name": "sz_drawidx",
18555+
"type": "size_t"
1855218556
}
1855318557
],
18554-
"argsoriginal": "(const char* version_str,size_t sz_io,size_t sz_style,size_t sz_vec2,size_t sz_vec4,size_t sz_drawvert)",
18555-
"call_args": "(version_str,sz_io,sz_style,sz_vec2,sz_vec4,sz_drawvert)",
18558+
"argsoriginal": "(const char* version_str,size_t sz_io,size_t sz_style,size_t sz_vec2,size_t sz_vec4,size_t sz_drawvert,size_t sz_drawidx)",
18559+
"call_args": "(version_str,sz_io,sz_style,sz_vec2,sz_vec4,sz_drawvert,sz_drawidx)",
1855618560
"cimguiname": "igDebugCheckVersionAndDataLayout",
1855718561
"defaults": [],
1855818562
"funcname": "DebugCheckVersionAndDataLayout",
1855918563
"namespace": "ImGui",
1856018564
"ov_cimguiname": "igDebugCheckVersionAndDataLayout",
1856118565
"ret": "bool",
18562-
"signature": "(const char*,size_t,size_t,size_t,size_t,size_t)",
18566+
"signature": "(const char*,size_t,size_t,size_t,size_t,size_t,size_t)",
1856318567
"stname": ""
1856418568
}
1856518569
],
@@ -19689,22 +19693,6 @@
1968919693
"stname": ""
1969019694
}
1969119695
],
19692-
"igGetContentRegionAvailWidth": [
19693-
{
19694-
"args": "()",
19695-
"argsT": [],
19696-
"argsoriginal": "()",
19697-
"call_args": "()",
19698-
"cimguiname": "igGetContentRegionAvailWidth",
19699-
"defaults": [],
19700-
"funcname": "GetContentRegionAvailWidth",
19701-
"namespace": "ImGui",
19702-
"ov_cimguiname": "igGetContentRegionAvailWidth",
19703-
"ret": "float",
19704-
"signature": "()",
19705-
"stname": ""
19706-
}
19707-
],
1970819696
"igGetContentRegionMax": [
1970919697
{
1971019698
"args": "()",
@@ -23913,23 +23901,23 @@
2391323901
],
2391423902
"igSameLine": [
2391523903
{
23916-
"args": "(float local_pos_x,float spacing_w)",
23904+
"args": "(float offset_from_start_x,float spacing)",
2391723905
"argsT": [
2391823906
{
23919-
"name": "local_pos_x",
23907+
"name": "offset_from_start_x",
2392023908
"type": "float"
2392123909
},
2392223910
{
23923-
"name": "spacing_w",
23911+
"name": "spacing",
2392423912
"type": "float"
2392523913
}
2392623914
],
23927-
"argsoriginal": "(float local_pos_x=0.0f,float spacing_w=-1.0f)",
23928-
"call_args": "(local_pos_x,spacing_w)",
23915+
"argsoriginal": "(float offset_from_start_x=0.0f,float spacing=-1.0f)",
23916+
"call_args": "(offset_from_start_x,spacing)",
2392923917
"cimguiname": "igSameLine",
2393023918
"defaults": {
23931-
"local_pos_x": "0.0f",
23932-
"spacing_w": "-1.0f"
23919+
"offset_from_start_x": "0.0f",
23920+
"spacing": "-1.0f"
2393323921
},
2393423922
"funcname": "SameLine",
2393523923
"namespace": "ImGui",
@@ -24413,6 +24401,27 @@
2441324401
"stname": ""
2441424402
}
2441524403
],
24404+
"igSetNextItemWidth": [
24405+
{
24406+
"args": "(float item_width)",
24407+
"argsT": [
24408+
{
24409+
"name": "item_width",
24410+
"type": "float"
24411+
}
24412+
],
24413+
"argsoriginal": "(float item_width)",
24414+
"call_args": "(item_width)",
24415+
"cimguiname": "igSetNextItemWidth",
24416+
"defaults": [],
24417+
"funcname": "SetNextItemWidth",
24418+
"namespace": "ImGui",
24419+
"ov_cimguiname": "igSetNextItemWidth",
24420+
"ret": "void",
24421+
"signature": "(float)",
24422+
"stname": ""
24423+
}
24424+
],
2441624425
"igSetNextTreeNodeOpen": [
2441724426
{
2441824427
"args": "(bool is_open,ImGuiCond cond)",

src/CodeGenerator/structs_and_enums.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2410,6 +2410,11 @@
24102410
"size": 5,
24112411
"type": "bool"
24122412
},
2413+
{
2414+
"name": "MouseDownWasDoubleClick[5]",
2415+
"size": 5,
2416+
"type": "bool"
2417+
},
24132418
{
24142419
"name": "MouseDownDuration[5]",
24152420
"size": 5,

src/ImGui.NET/Generated/ImGui.gen.cs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,7 +2052,7 @@ public static IntPtr CreateContext(ImFontAtlasPtr shared_font_atlas)
20522052
IntPtr ret = ImGuiNative.igCreateContext(native_shared_font_atlas);
20532053
return ret;
20542054
}
2055-
public static bool DebugCheckVersionAndDataLayout(string version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert)
2055+
public static bool DebugCheckVersionAndDataLayout(string version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert, uint sz_drawidx)
20562056
{
20572057
byte* native_version_str;
20582058
int version_str_byteCount = 0;
@@ -2072,7 +2072,7 @@ public static bool DebugCheckVersionAndDataLayout(string version_str, uint sz_io
20722072
native_version_str[native_version_str_offset] = 0;
20732073
}
20742074
else { native_version_str = null; }
2075-
byte ret = ImGuiNative.igDebugCheckVersionAndDataLayout(native_version_str, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert);
2075+
byte ret = ImGuiNative.igDebugCheckVersionAndDataLayout(native_version_str, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert, sz_drawidx);
20762076
if (version_str_byteCount > Util.StackAllocationSizeLimit)
20772077
{
20782078
Util.Free(native_version_str);
@@ -5627,11 +5627,6 @@ public static Vector2 GetContentRegionAvail()
56275627
Vector2 ret = ImGuiNative.igGetContentRegionAvail();
56285628
return ret;
56295629
}
5630-
public static float GetContentRegionAvailWidth()
5631-
{
5632-
float ret = ImGuiNative.igGetContentRegionAvailWidth();
5633-
return ret;
5634-
}
56355630
public static Vector2 GetContentRegionMax()
56365631
{
56375632
Vector2 ret = ImGuiNative.igGetContentRegionMax();
@@ -9994,18 +9989,18 @@ public static void ResetMouseDragDelta(int button)
99949989
}
99959990
public static void SameLine()
99969991
{
9997-
float local_pos_x = 0.0f;
9998-
float spacing_w = -1.0f;
9999-
ImGuiNative.igSameLine(local_pos_x, spacing_w);
9992+
float offset_from_start_x = 0.0f;
9993+
float spacing = -1.0f;
9994+
ImGuiNative.igSameLine(offset_from_start_x, spacing);
100009995
}
10001-
public static void SameLine(float local_pos_x)
9996+
public static void SameLine(float offset_from_start_x)
100029997
{
10003-
float spacing_w = -1.0f;
10004-
ImGuiNative.igSameLine(local_pos_x, spacing_w);
9998+
float spacing = -1.0f;
9999+
ImGuiNative.igSameLine(offset_from_start_x, spacing);
1000510000
}
10006-
public static void SameLine(float local_pos_x, float spacing_w)
10001+
public static void SameLine(float offset_from_start_x, float spacing)
1000710002
{
10008-
ImGuiNative.igSameLine(local_pos_x, spacing_w);
10003+
ImGuiNative.igSameLine(offset_from_start_x, spacing);
1000910004
}
1001010005
public static void SaveIniSettingsToDisk(string ini_filename)
1001110006
{
@@ -10397,6 +10392,10 @@ public static void SetMouseCursor(ImGuiMouseCursor type)
1039710392
{
1039810393
ImGuiNative.igSetMouseCursor(type);
1039910394
}
10395+
public static void SetNextItemWidth(float item_width)
10396+
{
10397+
ImGuiNative.igSetNextItemWidth(item_width);
10398+
}
1040010399
public static void SetNextTreeNodeOpen(bool is_open)
1040110400
{
1040210401
byte native_is_open = is_open ? (byte)1 : (byte)0;

src/ImGui.NET/Generated/ImGuiIO.gen.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public unsafe partial struct ImGuiIO
7777
public fixed byte MouseDoubleClicked[5];
7878
public fixed byte MouseReleased[5];
7979
public fixed byte MouseDownOwned[5];
80+
public fixed byte MouseDownWasDoubleClick[5];
8081
public fixed float MouseDownDuration[5];
8182
public fixed float MouseDownDurationPrev[5];
8283
public Vector2 MouseDragMaxDistanceAbs_0;
@@ -165,6 +166,7 @@ public unsafe partial struct ImGuiIOPtr
165166
public RangeAccessor<bool> MouseDoubleClicked => new RangeAccessor<bool>(NativePtr->MouseDoubleClicked, 5);
166167
public RangeAccessor<bool> MouseReleased => new RangeAccessor<bool>(NativePtr->MouseReleased, 5);
167168
public RangeAccessor<bool> MouseDownOwned => new RangeAccessor<bool>(NativePtr->MouseDownOwned, 5);
169+
public RangeAccessor<bool> MouseDownWasDoubleClick => new RangeAccessor<bool>(NativePtr->MouseDownWasDoubleClick, 5);
168170
public RangeAccessor<float> MouseDownDuration => new RangeAccessor<float>(NativePtr->MouseDownDuration, 5);
169171
public RangeAccessor<float> MouseDownDurationPrev => new RangeAccessor<float>(NativePtr->MouseDownDurationPrev, 5);
170172
public RangeAccessor<Vector2> MouseDragMaxDistanceAbs => new RangeAccessor<Vector2>(&NativePtr->MouseDragMaxDistanceAbs_0, 5);

src/ImGui.NET/Generated/ImGuiNative.gen.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static unsafe partial class ImGuiNative
109109
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
110110
public static extern IntPtr igCreateContext(ImFontAtlas* shared_font_atlas);
111111
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
112-
public static extern byte igDebugCheckVersionAndDataLayout(byte* version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert);
112+
public static extern byte igDebugCheckVersionAndDataLayout(byte* version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert, uint sz_drawidx);
113113
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
114114
public static extern void igDestroyContext(IntPtr ctx);
115115
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@@ -188,8 +188,6 @@ public static unsafe partial class ImGuiNative
188188
public static extern float igGetColumnWidth(int column_index);
189189
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionAvail_nonUDT2")]
190190
public static extern Vector2 igGetContentRegionAvail();
191-
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
192-
public static extern float igGetContentRegionAvailWidth();
193191
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionMax_nonUDT2")]
194192
public static extern Vector2 igGetContentRegionMax();
195193
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@@ -493,7 +491,7 @@ public static unsafe partial class ImGuiNative
493491
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
494492
public static extern void igResetMouseDragDelta(int button);
495493
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
496-
public static extern void igSameLine(float local_pos_x, float spacing_w);
494+
public static extern void igSameLine(float offset_from_start_x, float spacing);
497495
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
498496
public static extern void igSaveIniSettingsToDisk(byte* ini_filename);
499497
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@@ -533,6 +531,8 @@ public static unsafe partial class ImGuiNative
533531
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
534532
public static extern void igSetMouseCursor(ImGuiMouseCursor type);
535533
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
534+
public static extern void igSetNextItemWidth(float item_width);
535+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
536536
public static extern void igSetNextTreeNodeOpen(byte is_open, ImGuiCond cond);
537537
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
538538
public static extern void igSetNextWindowBgAlpha(float alpha);

src/ImGui.NET/ImGui.NET.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>A .NET wrapper for the Dear ImGui library.</Description>
4-
<AssemblyVersion>1.69.0</AssemblyVersion>
4+
<AssemblyVersion>1.70.0</AssemblyVersion>
55
<Authors>Eric Mellino</Authors>
66
<TargetFramework>netstandard2.0</TargetFramework>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

0 commit comments

Comments
 (0)