Update to v1.70.

internals
Amer Koleci 6 years ago
parent 34a0848556
commit 489f84752e
  1. 2
      src/CodeGenerator/Program.cs
  2. 71
      src/CodeGenerator/definitions.json
  3. 5
      src/CodeGenerator/structs_and_enums.json
  4. 29
      src/ImGui.NET/Generated/ImGui.gen.cs
  5. 2
      src/ImGui.NET/Generated/ImGuiIO.gen.cs
  6. 8
      src/ImGui.NET/Generated/ImGuiNative.gen.cs
  7. 2
      src/ImGui.NET/ImGui.NET.csproj

@ -10,7 +10,7 @@ using System.Text.RegularExpressions;
namespace CodeGenerator namespace CodeGenerator
{ {
class Program internal static class Program
{ {
private static readonly Dictionary<string, string> s_wellKnownTypes = new Dictionary<string, string>() private static readonly Dictionary<string, string> s_wellKnownTypes = new Dictionary<string, string>()
{ {

@ -718,11 +718,11 @@
"type": "ImU32" "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)", "call_args": "(user_texture_id,a,b,uv_a,uv_b,col)",
"cimguiname": "ImDrawList_AddImage", "cimguiname": "ImDrawList_AddImage",
"defaults": { "defaults": {
"col": "0xFFFFFFFF", "col": "(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0))",
"uv_a": "ImVec2(0,0)", "uv_a": "ImVec2(0,0)",
"uv_b": "ImVec2(1,1)" "uv_b": "ImVec2(1,1)"
}, },
@ -782,11 +782,11 @@
"type": "ImU32" "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)", "call_args": "(user_texture_id,a,b,c,d,uv_a,uv_b,uv_c,uv_d,col)",
"cimguiname": "ImDrawList_AddImageQuad", "cimguiname": "ImDrawList_AddImageQuad",
"defaults": { "defaults": {
"col": "0xFFFFFFFF", "col": "(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0))",
"uv_a": "ImVec2(0,0)", "uv_a": "ImVec2(0,0)",
"uv_b": "ImVec2(1,0)", "uv_b": "ImVec2(1,0)",
"uv_c": "ImVec2(1,1)", "uv_c": "ImVec2(1,1)",
@ -18524,7 +18524,7 @@
], ],
"igDebugCheckVersionAndDataLayout": [ "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": [ "argsT": [
{ {
"name": "version_str", "name": "version_str",
@ -18549,17 +18549,21 @@
{ {
"name": "sz_drawvert", "name": "sz_drawvert",
"type": "size_t" "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)", "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)", "call_args": "(version_str,sz_io,sz_style,sz_vec2,sz_vec4,sz_drawvert,sz_drawidx)",
"cimguiname": "igDebugCheckVersionAndDataLayout", "cimguiname": "igDebugCheckVersionAndDataLayout",
"defaults": [], "defaults": [],
"funcname": "DebugCheckVersionAndDataLayout", "funcname": "DebugCheckVersionAndDataLayout",
"namespace": "ImGui", "namespace": "ImGui",
"ov_cimguiname": "igDebugCheckVersionAndDataLayout", "ov_cimguiname": "igDebugCheckVersionAndDataLayout",
"ret": "bool", "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": "" "stname": ""
} }
], ],
@ -19689,22 +19693,6 @@
"stname": "" "stname": ""
} }
], ],
"igGetContentRegionAvailWidth": [
{
"args": "()",
"argsT": [],
"argsoriginal": "()",
"call_args": "()",
"cimguiname": "igGetContentRegionAvailWidth",
"defaults": [],
"funcname": "GetContentRegionAvailWidth",
"namespace": "ImGui",
"ov_cimguiname": "igGetContentRegionAvailWidth",
"ret": "float",
"signature": "()",
"stname": ""
}
],
"igGetContentRegionMax": [ "igGetContentRegionMax": [
{ {
"args": "()", "args": "()",
@ -23913,23 +23901,23 @@
], ],
"igSameLine": [ "igSameLine": [
{ {
"args": "(float local_pos_x,float spacing_w)", "args": "(float offset_from_start_x,float spacing)",
"argsT": [ "argsT": [
{ {
"name": "local_pos_x", "name": "offset_from_start_x",
"type": "float" "type": "float"
}, },
{ {
"name": "spacing_w", "name": "spacing",
"type": "float" "type": "float"
} }
], ],
"argsoriginal": "(float local_pos_x=0.0f,float spacing_w=-1.0f)", "argsoriginal": "(float offset_from_start_x=0.0f,float spacing=-1.0f)",
"call_args": "(local_pos_x,spacing_w)", "call_args": "(offset_from_start_x,spacing)",
"cimguiname": "igSameLine", "cimguiname": "igSameLine",
"defaults": { "defaults": {
"local_pos_x": "0.0f", "offset_from_start_x": "0.0f",
"spacing_w": "-1.0f" "spacing": "-1.0f"
}, },
"funcname": "SameLine", "funcname": "SameLine",
"namespace": "ImGui", "namespace": "ImGui",
@ -24413,6 +24401,27 @@
"stname": "" "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": [ "igSetNextTreeNodeOpen": [
{ {
"args": "(bool is_open,ImGuiCond cond)", "args": "(bool is_open,ImGuiCond cond)",

@ -2410,6 +2410,11 @@
"size": 5, "size": 5,
"type": "bool" "type": "bool"
}, },
{
"name": "MouseDownWasDoubleClick[5]",
"size": 5,
"type": "bool"
},
{ {
"name": "MouseDownDuration[5]", "name": "MouseDownDuration[5]",
"size": 5, "size": 5,

@ -2052,7 +2052,7 @@ namespace ImGuiNET
IntPtr ret = ImGuiNative.igCreateContext(native_shared_font_atlas); IntPtr ret = ImGuiNative.igCreateContext(native_shared_font_atlas);
return ret; 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; byte* native_version_str;
int version_str_byteCount = 0; int version_str_byteCount = 0;
@ -2072,7 +2072,7 @@ namespace ImGuiNET
native_version_str[native_version_str_offset] = 0; native_version_str[native_version_str_offset] = 0;
} }
else { native_version_str = null; } 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) if (version_str_byteCount > Util.StackAllocationSizeLimit)
{ {
Util.Free(native_version_str); Util.Free(native_version_str);
@ -5627,11 +5627,6 @@ namespace ImGuiNET
Vector2 ret = ImGuiNative.igGetContentRegionAvail(); Vector2 ret = ImGuiNative.igGetContentRegionAvail();
return ret; return ret;
} }
public static float GetContentRegionAvailWidth()
{
float ret = ImGuiNative.igGetContentRegionAvailWidth();
return ret;
}
public static Vector2 GetContentRegionMax() public static Vector2 GetContentRegionMax()
{ {
Vector2 ret = ImGuiNative.igGetContentRegionMax(); Vector2 ret = ImGuiNative.igGetContentRegionMax();
@ -9994,18 +9989,18 @@ namespace ImGuiNET
} }
public static void SameLine() public static void SameLine()
{ {
float local_pos_x = 0.0f; float offset_from_start_x = 0.0f;
float spacing_w = -1.0f; float spacing = -1.0f;
ImGuiNative.igSameLine(local_pos_x, spacing_w); 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; float spacing = -1.0f;
ImGuiNative.igSameLine(local_pos_x, spacing_w); 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) public static void SaveIniSettingsToDisk(string ini_filename)
{ {
@ -10397,6 +10392,10 @@ namespace ImGuiNET
{ {
ImGuiNative.igSetMouseCursor(type); ImGuiNative.igSetMouseCursor(type);
} }
public static void SetNextItemWidth(float item_width)
{
ImGuiNative.igSetNextItemWidth(item_width);
}
public static void SetNextTreeNodeOpen(bool is_open) public static void SetNextTreeNodeOpen(bool is_open)
{ {
byte native_is_open = is_open ? (byte)1 : (byte)0; byte native_is_open = is_open ? (byte)1 : (byte)0;

@ -77,6 +77,7 @@ namespace ImGuiNET
public fixed byte MouseDoubleClicked[5]; public fixed byte MouseDoubleClicked[5];
public fixed byte MouseReleased[5]; public fixed byte MouseReleased[5];
public fixed byte MouseDownOwned[5]; public fixed byte MouseDownOwned[5];
public fixed byte MouseDownWasDoubleClick[5];
public fixed float MouseDownDuration[5]; public fixed float MouseDownDuration[5];
public fixed float MouseDownDurationPrev[5]; public fixed float MouseDownDurationPrev[5];
public Vector2 MouseDragMaxDistanceAbs_0; public Vector2 MouseDragMaxDistanceAbs_0;
@ -165,6 +166,7 @@ namespace ImGuiNET
public RangeAccessor<bool> MouseDoubleClicked => new RangeAccessor<bool>(NativePtr->MouseDoubleClicked, 5); public RangeAccessor<bool> MouseDoubleClicked => new RangeAccessor<bool>(NativePtr->MouseDoubleClicked, 5);
public RangeAccessor<bool> MouseReleased => new RangeAccessor<bool>(NativePtr->MouseReleased, 5); public RangeAccessor<bool> MouseReleased => new RangeAccessor<bool>(NativePtr->MouseReleased, 5);
public RangeAccessor<bool> MouseDownOwned => new RangeAccessor<bool>(NativePtr->MouseDownOwned, 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> MouseDownDuration => new RangeAccessor<float>(NativePtr->MouseDownDuration, 5);
public RangeAccessor<float> MouseDownDurationPrev => new RangeAccessor<float>(NativePtr->MouseDownDurationPrev, 5); public RangeAccessor<float> MouseDownDurationPrev => new RangeAccessor<float>(NativePtr->MouseDownDurationPrev, 5);
public RangeAccessor<Vector2> MouseDragMaxDistanceAbs => new RangeAccessor<Vector2>(&NativePtr->MouseDragMaxDistanceAbs_0, 5); public RangeAccessor<Vector2> MouseDragMaxDistanceAbs => new RangeAccessor<Vector2>(&NativePtr->MouseDragMaxDistanceAbs_0, 5);

@ -109,7 +109,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr igCreateContext(ImFontAtlas* shared_font_atlas); public static extern IntPtr igCreateContext(ImFontAtlas* shared_font_atlas);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igDestroyContext(IntPtr ctx); public static extern void igDestroyContext(IntPtr ctx);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -188,8 +188,6 @@ namespace ImGuiNET
public static extern float igGetColumnWidth(int column_index); public static extern float igGetColumnWidth(int column_index);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionAvail_nonUDT2")] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionAvail_nonUDT2")]
public static extern Vector2 igGetContentRegionAvail(); public static extern Vector2 igGetContentRegionAvail();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetContentRegionAvailWidth();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionMax_nonUDT2")] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionMax_nonUDT2")]
public static extern Vector2 igGetContentRegionMax(); public static extern Vector2 igGetContentRegionMax();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -493,7 +491,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igResetMouseDragDelta(int button); public static extern void igResetMouseDragDelta(int button);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSaveIniSettingsToDisk(byte* ini_filename); public static extern void igSaveIniSettingsToDisk(byte* ini_filename);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -533,6 +531,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetMouseCursor(ImGuiMouseCursor type); public static extern void igSetMouseCursor(ImGuiMouseCursor type);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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); public static extern void igSetNextTreeNodeOpen(byte is_open, ImGuiCond cond);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowBgAlpha(float alpha); public static extern void igSetNextWindowBgAlpha(float alpha);

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

Loading…
Cancel
Save