Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CodeGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace CodeGenerator
{
class Program
internal static class Program
{
private static readonly Dictionary<string, string> s_wellKnownTypes = new Dictionary<string, string>()
{
Expand Down
71 changes: 40 additions & 31 deletions src/CodeGenerator/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -718,11 +718,11 @@
"type": "ImU32"
}
],
"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)",
"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)))",
"call_args": "(user_texture_id,a,b,uv_a,uv_b,col)",
"cimguiname": "ImDrawList_AddImage",
"defaults": {
"col": "0xFFFFFFFF",
"col": "(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0))",
"uv_a": "ImVec2(0,0)",
"uv_b": "ImVec2(1,1)"
},
Expand Down Expand Up @@ -782,11 +782,11 @@
"type": "ImU32"
}
],
"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)",
"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)))",
"call_args": "(user_texture_id,a,b,c,d,uv_a,uv_b,uv_c,uv_d,col)",
"cimguiname": "ImDrawList_AddImageQuad",
"defaults": {
"col": "0xFFFFFFFF",
"col": "(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0))",
"uv_a": "ImVec2(0,0)",
"uv_b": "ImVec2(1,0)",
"uv_c": "ImVec2(1,1)",
Expand Down Expand Up @@ -18524,7 +18524,7 @@
],
"igDebugCheckVersionAndDataLayout": [
{
"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)",
"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)",
"argsT": [
{
"name": "version_str",
Expand All @@ -18549,17 +18549,21 @@
{
"name": "sz_drawvert",
"type": "size_t"
},
{
"name": "sz_drawidx",
"type": "size_t"
}
],
"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)",
"call_args": "(version_str,sz_io,sz_style,sz_vec2,sz_vec4,sz_drawvert)",
"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)",
"call_args": "(version_str,sz_io,sz_style,sz_vec2,sz_vec4,sz_drawvert,sz_drawidx)",
"cimguiname": "igDebugCheckVersionAndDataLayout",
"defaults": [],
"funcname": "DebugCheckVersionAndDataLayout",
"namespace": "ImGui",
"ov_cimguiname": "igDebugCheckVersionAndDataLayout",
"ret": "bool",
"signature": "(const char*,size_t,size_t,size_t,size_t,size_t)",
"signature": "(const char*,size_t,size_t,size_t,size_t,size_t,size_t)",
"stname": ""
}
],
Expand Down Expand Up @@ -19689,22 +19693,6 @@
"stname": ""
}
],
"igGetContentRegionAvailWidth": [
{
"args": "()",
"argsT": [],
"argsoriginal": "()",
"call_args": "()",
"cimguiname": "igGetContentRegionAvailWidth",
"defaults": [],
"funcname": "GetContentRegionAvailWidth",
"namespace": "ImGui",
"ov_cimguiname": "igGetContentRegionAvailWidth",
"ret": "float",
"signature": "()",
"stname": ""
}
],
"igGetContentRegionMax": [
{
"args": "()",
Expand Down Expand Up @@ -23913,23 +23901,23 @@
],
"igSameLine": [
{
"args": "(float local_pos_x,float spacing_w)",
"args": "(float offset_from_start_x,float spacing)",
"argsT": [
{
"name": "local_pos_x",
"name": "offset_from_start_x",
"type": "float"
},
{
"name": "spacing_w",
"name": "spacing",
"type": "float"
}
],
"argsoriginal": "(float local_pos_x=0.0f,float spacing_w=-1.0f)",
"call_args": "(local_pos_x,spacing_w)",
"argsoriginal": "(float offset_from_start_x=0.0f,float spacing=-1.0f)",
"call_args": "(offset_from_start_x,spacing)",
"cimguiname": "igSameLine",
"defaults": {
"local_pos_x": "0.0f",
"spacing_w": "-1.0f"
"offset_from_start_x": "0.0f",
"spacing": "-1.0f"
},
"funcname": "SameLine",
"namespace": "ImGui",
Expand Down Expand Up @@ -24413,6 +24401,27 @@
"stname": ""
}
],
"igSetNextItemWidth": [
{
"args": "(float item_width)",
"argsT": [
{
"name": "item_width",
"type": "float"
}
],
"argsoriginal": "(float item_width)",
"call_args": "(item_width)",
"cimguiname": "igSetNextItemWidth",
"defaults": [],
"funcname": "SetNextItemWidth",
"namespace": "ImGui",
"ov_cimguiname": "igSetNextItemWidth",
"ret": "void",
"signature": "(float)",
"stname": ""
}
],
"igSetNextTreeNodeOpen": [
{
"args": "(bool is_open,ImGuiCond cond)",
Expand Down
5 changes: 5 additions & 0 deletions src/CodeGenerator/structs_and_enums.json
Original file line number Diff line number Diff line change
Expand Up @@ -2410,6 +2410,11 @@
"size": 5,
"type": "bool"
},
{
"name": "MouseDownWasDoubleClick[5]",
"size": 5,
"type": "bool"
},
{
"name": "MouseDownDuration[5]",
"size": 5,
Expand Down
29 changes: 14 additions & 15 deletions src/ImGui.NET/Generated/ImGui.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2052,7 +2052,7 @@ public static IntPtr CreateContext(ImFontAtlasPtr shared_font_atlas)
IntPtr ret = ImGuiNative.igCreateContext(native_shared_font_atlas);
return ret;
}
public static bool DebugCheckVersionAndDataLayout(string version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert)
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)
{
byte* native_version_str;
int version_str_byteCount = 0;
Expand All @@ -2072,7 +2072,7 @@ public static bool DebugCheckVersionAndDataLayout(string version_str, uint sz_io
native_version_str[native_version_str_offset] = 0;
}
else { native_version_str = null; }
byte ret = ImGuiNative.igDebugCheckVersionAndDataLayout(native_version_str, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert);
byte ret = ImGuiNative.igDebugCheckVersionAndDataLayout(native_version_str, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert, sz_drawidx);
if (version_str_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_version_str);
Expand Down Expand Up @@ -5627,11 +5627,6 @@ public static Vector2 GetContentRegionAvail()
Vector2 ret = ImGuiNative.igGetContentRegionAvail();
return ret;
}
public static float GetContentRegionAvailWidth()
{
float ret = ImGuiNative.igGetContentRegionAvailWidth();
return ret;
}
public static Vector2 GetContentRegionMax()
{
Vector2 ret = ImGuiNative.igGetContentRegionMax();
Expand Down Expand Up @@ -9994,18 +9989,18 @@ public static void ResetMouseDragDelta(int button)
}
public static void SameLine()
{
float local_pos_x = 0.0f;
float spacing_w = -1.0f;
ImGuiNative.igSameLine(local_pos_x, spacing_w);
float offset_from_start_x = 0.0f;
float spacing = -1.0f;
ImGuiNative.igSameLine(offset_from_start_x, spacing);
}
public static void SameLine(float local_pos_x)
public static void SameLine(float offset_from_start_x)
{
float spacing_w = -1.0f;
ImGuiNative.igSameLine(local_pos_x, spacing_w);
float spacing = -1.0f;
ImGuiNative.igSameLine(offset_from_start_x, spacing);
}
public static void SameLine(float local_pos_x, float spacing_w)
public static void SameLine(float offset_from_start_x, float spacing)
{
ImGuiNative.igSameLine(local_pos_x, spacing_w);
ImGuiNative.igSameLine(offset_from_start_x, spacing);
}
public static void SaveIniSettingsToDisk(string ini_filename)
{
Expand Down Expand Up @@ -10397,6 +10392,10 @@ public static void SetMouseCursor(ImGuiMouseCursor type)
{
ImGuiNative.igSetMouseCursor(type);
}
public static void SetNextItemWidth(float item_width)
{
ImGuiNative.igSetNextItemWidth(item_width);
}
public static void SetNextTreeNodeOpen(bool is_open)
{
byte native_is_open = is_open ? (byte)1 : (byte)0;
Expand Down
2 changes: 2 additions & 0 deletions src/ImGui.NET/Generated/ImGuiIO.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public unsafe partial struct ImGuiIO
public fixed byte MouseDoubleClicked[5];
public fixed byte MouseReleased[5];
public fixed byte MouseDownOwned[5];
public fixed byte MouseDownWasDoubleClick[5];
public fixed float MouseDownDuration[5];
public fixed float MouseDownDurationPrev[5];
public Vector2 MouseDragMaxDistanceAbs_0;
Expand Down Expand Up @@ -165,6 +166,7 @@ public unsafe partial struct ImGuiIOPtr
public RangeAccessor<bool> MouseDoubleClicked => new RangeAccessor<bool>(NativePtr->MouseDoubleClicked, 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<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
8 changes: 4 additions & 4 deletions src/ImGui.NET/Generated/ImGuiNative.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr igCreateContext(ImFontAtlas* shared_font_atlas);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDebugCheckVersionAndDataLayout(byte* version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert);
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);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igDestroyContext(IntPtr ctx);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
Expand Down Expand Up @@ -188,8 +188,6 @@ public static unsafe partial class ImGuiNative
public static extern float igGetColumnWidth(int column_index);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionAvail_nonUDT2")]
public static extern Vector2 igGetContentRegionAvail();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetContentRegionAvailWidth();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionMax_nonUDT2")]
public static extern Vector2 igGetContentRegionMax();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
Expand Down Expand Up @@ -493,7 +491,7 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igResetMouseDragDelta(int button);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSameLine(float local_pos_x, float spacing_w);
public static extern void igSameLine(float offset_from_start_x, float spacing);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSaveIniSettingsToDisk(byte* ini_filename);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
Expand Down Expand Up @@ -533,6 +531,8 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetMouseCursor(ImGuiMouseCursor type);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextItemWidth(float item_width);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextTreeNodeOpen(byte is_open, ImGuiCond cond);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowBgAlpha(float alpha);
Expand Down
2 changes: 1 addition & 1 deletion src/ImGui.NET/ImGui.NET.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>A .NET wrapper for the Dear ImGui library.</Description>
<AssemblyVersion>1.69.0</AssemblyVersion>
<AssemblyVersion>1.70.0</AssemblyVersion>
<Authors>Eric Mellino</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down