Update to v1.69.

internals
Eric Mellino 6 years ago
parent 580d552d10
commit 34a0848556
  1. 2
      README.md
  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. 173
      src/CodeGenerator/definitions.json
  7. 86
      src/CodeGenerator/structs_and_enums.json
  8. 5
      src/ImGui.NET/Generated/ImFontAtlas.gen.cs
  9. 342
      src/ImGui.NET/Generated/ImGui.gen.cs
  10. 13
      src/ImGui.NET/Generated/ImGuiColorEditFlags.gen.cs
  11. 18
      src/ImGui.NET/Generated/ImGuiDataType.gen.cs
  12. 12
      src/ImGui.NET/Generated/ImGuiIO.gen.cs
  13. 18
      src/ImGui.NET/Generated/ImGuiNative.gen.cs
  14. 11
      src/ImGui.NET/Generated/ImGuiNavInput.gen.cs
  15. 2
      src/ImGui.NET/ImGui.NET.csproj

@ -29,5 +29,5 @@ https://github.com/ocornut/imgui
See the [official screenshot thread](https://github.com/ocornut/imgui/issues/123) for examples of many different kinds of interfaces created with Dear ImGui.
https://github.com/Extrawurst/cimgui
https://github.com/cimgui/cimgui
> This is a thin c-api wrapper for the excellent C++ intermediate gui imgui. This library is intended as a intermediate layer to be able to use imgui from other languages that can interface with C .

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -635,7 +635,7 @@
],
"ImDrawList_AddConvexPolyFilled": [
{
"args": "(ImDrawList* self,const ImVec2* points,const int num_points,ImU32 col)",
"args": "(ImDrawList* self,const ImVec2* points,int num_points,ImU32 col)",
"argsT": [
{
"name": "self",
@ -647,21 +647,21 @@
},
{
"name": "num_points",
"type": "const int"
"type": "int"
},
{
"name": "col",
"type": "ImU32"
}
],
"argsoriginal": "(const ImVec2* points,const int num_points,ImU32 col)",
"argsoriginal": "(const ImVec2* points,int num_points,ImU32 col)",
"call_args": "(points,num_points,col)",
"cimguiname": "ImDrawList_AddConvexPolyFilled",
"defaults": [],
"funcname": "AddConvexPolyFilled",
"ov_cimguiname": "ImDrawList_AddConvexPolyFilled",
"ret": "void",
"signature": "(const ImVec2*,const int,ImU32)",
"signature": "(const ImVec2*,int,ImU32)",
"stname": "ImDrawList"
}
],
@ -893,7 +893,7 @@
],
"ImDrawList_AddPolyline": [
{
"args": "(ImDrawList* self,const ImVec2* points,const int num_points,ImU32 col,bool closed,float thickness)",
"args": "(ImDrawList* self,const ImVec2* points,int num_points,ImU32 col,bool closed,float thickness)",
"argsT": [
{
"name": "self",
@ -905,7 +905,7 @@
},
{
"name": "num_points",
"type": "const int"
"type": "int"
},
{
"name": "col",
@ -920,14 +920,14 @@
"type": "float"
}
],
"argsoriginal": "(const ImVec2* points,const int num_points,ImU32 col,bool closed,float thickness)",
"argsoriginal": "(const ImVec2* points,int num_points,ImU32 col,bool closed,float thickness)",
"call_args": "(points,num_points,col,closed,thickness)",
"cimguiname": "ImDrawList_AddPolyline",
"defaults": [],
"funcname": "AddPolyline",
"ov_cimguiname": "ImDrawList_AddPolyline",
"ret": "void",
"signature": "(const ImVec2*,const int,ImU32,bool,float)",
"signature": "(const ImVec2*,int,ImU32,bool,float)",
"stname": "ImDrawList"
}
],
@ -2886,6 +2886,26 @@
"stname": "ImFontAtlas"
}
],
"ImFontAtlas_GetGlyphRangesVietnamese": [
{
"args": "(ImFontAtlas* self)",
"argsT": [
{
"name": "self",
"type": "ImFontAtlas*"
}
],
"argsoriginal": "()",
"call_args": "()",
"cimguiname": "ImFontAtlas_GetGlyphRangesVietnamese",
"defaults": [],
"funcname": "GetGlyphRangesVietnamese",
"ov_cimguiname": "ImFontAtlas_GetGlyphRangesVietnamese",
"ret": "const ImWchar*",
"signature": "()",
"stname": "ImFontAtlas"
}
],
"ImFontAtlas_GetMouseCursorTexData": [
{
"args": "(ImFontAtlas* self,ImGuiMouseCursor cursor,ImVec2* out_offset,ImVec2* out_size,ImVec2 out_uv_border[2],ImVec2 out_uv_fill[2])",
@ -19442,6 +19462,22 @@
"stname": ""
}
],
"igGetBackgroundDrawList": [
{
"args": "()",
"argsT": [],
"argsoriginal": "()",
"call_args": "()",
"cimguiname": "igGetBackgroundDrawList",
"defaults": [],
"funcname": "GetBackgroundDrawList",
"namespace": "ImGui",
"ov_cimguiname": "igGetBackgroundDrawList",
"ret": "ImDrawList*",
"signature": "()",
"stname": ""
}
],
"igGetClipboardText": [
{
"args": "()",
@ -20057,6 +20093,22 @@
"stname": ""
}
],
"igGetForegroundDrawList": [
{
"args": "()",
"argsT": [],
"argsoriginal": "()",
"call_args": "()",
"cimguiname": "igGetForegroundDrawList",
"defaults": [],
"funcname": "GetForegroundDrawList",
"namespace": "ImGui",
"ov_cimguiname": "igGetForegroundDrawList",
"ret": "ImDrawList*",
"signature": "()",
"stname": ""
}
],
"igGetFrameCount": [
{
"args": "()",
@ -20598,22 +20650,6 @@
"stname": ""
}
],
"igGetOverlayDrawList": [
{
"args": "()",
"argsT": [],
"argsoriginal": "()",
"call_args": "()",
"cimguiname": "igGetOverlayDrawList",
"defaults": [],
"funcname": "GetOverlayDrawList",
"namespace": "ImGui",
"ov_cimguiname": "igGetOverlayDrawList",
"ret": "ImDrawList*",
"signature": "()",
"stname": ""
}
],
"igGetScrollMaxX": [
{
"args": "()",
@ -21759,6 +21795,55 @@
"stname": ""
}
],
"igInputTextWithHint": [
{
"args": "(const char* label,const char* hint,char* buf,size_t buf_size,ImGuiInputTextFlags flags,ImGuiInputTextCallback callback,void* user_data)",
"argsT": [
{
"name": "label",
"type": "const char*"
},
{
"name": "hint",
"type": "const char*"
},
{
"name": "buf",
"type": "char*"
},
{
"name": "buf_size",
"type": "size_t"
},
{
"name": "flags",
"type": "ImGuiInputTextFlags"
},
{
"name": "callback",
"type": "ImGuiInputTextCallback"
},
{
"name": "user_data",
"type": "void*"
}
],
"argsoriginal": "(const char* label,const char* hint,char* buf,size_t buf_size,ImGuiInputTextFlags flags=0,ImGuiInputTextCallback callback=((void*)0),void* user_data=((void*)0))",
"call_args": "(label,hint,buf,buf_size,flags,callback,user_data)",
"cimguiname": "igInputTextWithHint",
"defaults": {
"callback": "((void*)0)",
"flags": "0",
"user_data": "((void*)0)"
},
"funcname": "InputTextWithHint",
"namespace": "ImGui",
"ov_cimguiname": "igInputTextWithHint",
"ret": "bool",
"signature": "(const char*,const char*,char*,size_t,ImGuiInputTextFlags,ImGuiInputTextCallback,void*)",
"stname": ""
}
],
"igInvisibleButton": [
{
"args": "(const char* str_id,const ImVec2 size)",
@ -22712,18 +22797,18 @@
],
"igLogToClipboard": [
{
"args": "(int max_depth)",
"args": "(int auto_open_depth)",
"argsT": [
{
"name": "max_depth",
"name": "auto_open_depth",
"type": "int"
}
],
"argsoriginal": "(int max_depth=-1)",
"call_args": "(max_depth)",
"argsoriginal": "(int auto_open_depth=-1)",
"call_args": "(auto_open_depth)",
"cimguiname": "igLogToClipboard",
"defaults": {
"max_depth": "-1"
"auto_open_depth": "-1"
},
"funcname": "LogToClipboard",
"namespace": "ImGui",
@ -22735,10 +22820,10 @@
],
"igLogToFile": [
{
"args": "(int max_depth,const char* filename)",
"args": "(int auto_open_depth,const char* filename)",
"argsT": [
{
"name": "max_depth",
"name": "auto_open_depth",
"type": "int"
},
{
@ -22746,12 +22831,12 @@
"type": "const char*"
}
],
"argsoriginal": "(int max_depth=-1,const char* filename=((void*)0))",
"call_args": "(max_depth,filename)",
"argsoriginal": "(int auto_open_depth=-1,const char* filename=((void*)0))",
"call_args": "(auto_open_depth,filename)",
"cimguiname": "igLogToFile",
"defaults": {
"filename": "((void*)0)",
"max_depth": "-1"
"auto_open_depth": "-1",
"filename": "((void*)0)"
},
"funcname": "LogToFile",
"namespace": "ImGui",
@ -22763,18 +22848,18 @@
],
"igLogToTTY": [
{
"args": "(int max_depth)",
"args": "(int auto_open_depth)",
"argsT": [
{
"name": "max_depth",
"name": "auto_open_depth",
"type": "int"
}
],
"argsoriginal": "(int max_depth=-1)",
"call_args": "(max_depth)",
"argsoriginal": "(int auto_open_depth=-1)",
"call_args": "(auto_open_depth)",
"cimguiname": "igLogToTTY",
"defaults": {
"max_depth": "-1"
"auto_open_depth": "-1"
},
"funcname": "LogToTTY",
"namespace": "ImGui",
@ -24219,7 +24304,7 @@
],
"igSetDragDropPayload": [
{
"args": "(const char* type,const void* data,size_t size,ImGuiCond cond)",
"args": "(const char* type,const void* data,size_t sz,ImGuiCond cond)",
"argsT": [
{
"name": "type",
@ -24230,7 +24315,7 @@
"type": "const void*"
},
{
"name": "size",
"name": "sz",
"type": "size_t"
},
{
@ -24238,8 +24323,8 @@
"type": "ImGuiCond"
}
],
"argsoriginal": "(const char* type,const void* data,size_t size,ImGuiCond cond=0)",
"call_args": "(type,data,size,cond)",
"argsoriginal": "(const char* type,const void* data,size_t sz,ImGuiCond cond=0)",
"call_args": "(type,data,sz,cond)",
"cimguiname": "igSetDragDropPayload",
"defaults": {
"cond": "0"

@ -423,17 +423,17 @@
},
{
"calc_value": 1048576,
"name": "ImGuiColorEditFlags_RGB",
"name": "ImGuiColorEditFlags_DisplayRGB",
"value": "1 << 20"
},
{
"calc_value": 2097152,
"name": "ImGuiColorEditFlags_HSV",
"name": "ImGuiColorEditFlags_DisplayHSV",
"value": "1 << 21"
},
{
"calc_value": 4194304,
"name": "ImGuiColorEditFlags_HEX",
"name": "ImGuiColorEditFlags_DisplayHex",
"value": "1 << 22"
},
{
@ -456,10 +456,25 @@
"name": "ImGuiColorEditFlags_PickerHueWheel",
"value": "1 << 26"
},
{
"calc_value": 134217728,
"name": "ImGuiColorEditFlags_InputRGB",
"value": "1 << 27"
},
{
"calc_value": 268435456,
"name": "ImGuiColorEditFlags_InputHSV",
"value": "1 << 28"
},
{
"calc_value": 177209344,
"name": "ImGuiColorEditFlags__OptionsDefault",
"value": "ImGuiColorEditFlags_Uint8|ImGuiColorEditFlags_DisplayRGB|ImGuiColorEditFlags_InputRGB|ImGuiColorEditFlags_PickerHueBar"
},
{
"calc_value": 7340032,
"name": "ImGuiColorEditFlags__InputsMask",
"value": "ImGuiColorEditFlags_RGB|ImGuiColorEditFlags_HSV|ImGuiColorEditFlags_HEX"
"name": "ImGuiColorEditFlags__DisplayMask",
"value": "ImGuiColorEditFlags_DisplayRGB|ImGuiColorEditFlags_DisplayHSV|ImGuiColorEditFlags_DisplayHex"
},
{
"calc_value": 25165824,
@ -472,9 +487,9 @@
"value": "ImGuiColorEditFlags_PickerHueWheel|ImGuiColorEditFlags_PickerHueBar"
},
{
"calc_value": 42991616,
"name": "ImGuiColorEditFlags__OptionsDefault",
"value": "ImGuiColorEditFlags_Uint8|ImGuiColorEditFlags_RGB|ImGuiColorEditFlags_PickerHueBar"
"calc_value": 402653184,
"name": "ImGuiColorEditFlags__InputMask",
"value": "ImGuiColorEditFlags_InputRGB|ImGuiColorEditFlags_InputHSV"
}
],
"ImGuiComboFlags_": [
@ -596,38 +611,58 @@
"ImGuiDataType_": [
{
"calc_value": 0,
"name": "ImGuiDataType_S32",
"name": "ImGuiDataType_S8",
"value": 0
},
{
"calc_value": 1,
"name": "ImGuiDataType_U32",
"name": "ImGuiDataType_U8",
"value": 1
},
{
"calc_value": 2,
"name": "ImGuiDataType_S64",
"name": "ImGuiDataType_S16",
"value": 2
},
{
"calc_value": 3,
"name": "ImGuiDataType_U64",
"name": "ImGuiDataType_U16",
"value": 3
},
{
"calc_value": 4,
"name": "ImGuiDataType_Float",
"name": "ImGuiDataType_S32",
"value": 4
},
{
"calc_value": 5,
"name": "ImGuiDataType_Double",
"name": "ImGuiDataType_U32",
"value": 5
},
{
"calc_value": 6,
"name": "ImGuiDataType_COUNT",
"name": "ImGuiDataType_S64",
"value": 6
},
{
"calc_value": 7,
"name": "ImGuiDataType_U64",
"value": 7
},
{
"calc_value": 8,
"name": "ImGuiDataType_Float",
"value": 8
},
{
"calc_value": 9,
"name": "ImGuiDataType_Double",
"value": 9
},
{
"calc_value": 10,
"name": "ImGuiDataType_COUNT",
"value": 10
}
],
"ImGuiDir_": [
@ -1157,29 +1192,34 @@
},
{
"calc_value": 17,
"name": "ImGuiNavInput_KeyLeft_",
"name": "ImGuiNavInput_KeyTab_",
"value": 17
},
{
"calc_value": 18,
"name": "ImGuiNavInput_KeyRight_",
"name": "ImGuiNavInput_KeyLeft_",
"value": 18
},
{
"calc_value": 19,
"name": "ImGuiNavInput_KeyUp_",
"name": "ImGuiNavInput_KeyRight_",
"value": 19
},
{
"calc_value": 20,
"name": "ImGuiNavInput_KeyDown_",
"name": "ImGuiNavInput_KeyUp_",
"value": 20
},
{
"calc_value": 21,
"name": "ImGuiNavInput_COUNT",
"name": "ImGuiNavInput_KeyDown_",
"value": 21
},
{
"calc_value": 22,
"name": "ImGuiNavInput_COUNT",
"value": 22
},
{
"calc_value": 16,
"name": "ImGuiNavInput_InternalStart_",
@ -2277,7 +2317,7 @@
},
{
"name": "NavInputs[ImGuiNavInput_COUNT]",
"size": 21,
"size": 22,
"type": "float"
},
{
@ -2402,12 +2442,12 @@
},
{
"name": "NavInputsDownDuration[ImGuiNavInput_COUNT]",
"size": 21,
"size": 22,
"type": "float"
},
{
"name": "NavInputsDownDurationPrev[ImGuiNavInput_COUNT]",
"size": 21,
"size": 22,
"type": "float"
},
{

@ -382,6 +382,11 @@ namespace ImGuiNET
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesThai(NativePtr);
return (IntPtr)ret;
}
public IntPtr GetGlyphRangesVietnamese()
{
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesVietnamese(NativePtr);
return (IntPtr)ret;
}
public bool GetMouseCursorTexData(ImGuiMouseCursor cursor, out Vector2 out_offset, out Vector2 out_size, out Vector2 out_uv_border, out Vector2 out_uv_fill)
{
fixed (Vector2* native_out_offset = &out_offset)

@ -5559,6 +5559,11 @@ namespace ImGuiNET
{
ImGuiNative.igEndTooltip();
}
public static ImDrawListPtr GetBackgroundDrawList()
{
ImDrawList* ret = ImGuiNative.igGetBackgroundDrawList();
return new ImDrawListPtr(ret);
}
public static string GetClipboardText()
{
byte* ret = ImGuiNative.igGetClipboardText();
@ -5692,6 +5697,11 @@ namespace ImGuiNET
Vector2 ret = ImGuiNative.igGetFontTexUvWhitePixel();
return ret;
}
public static ImDrawListPtr GetForegroundDrawList()
{
ImDrawList* ret = ImGuiNative.igGetForegroundDrawList();
return new ImDrawListPtr(ret);
}
public static int GetFrameCount()
{
int ret = ImGuiNative.igGetFrameCount();
@ -5803,11 +5813,6 @@ namespace ImGuiNET
Vector2 ret = ImGuiNative.igGetMousePosOnOpeningCurrentPopup();
return ret;
}
public static ImDrawListPtr GetOverlayDrawList()
{
ImDrawList* ret = ImGuiNative.igGetOverlayDrawList();
return new ImDrawListPtr(ret);
}
public static float GetScrollMaxX()
{
float ret = ImGuiNative.igGetScrollMaxX();
@ -7680,6 +7685,297 @@ namespace ImGuiNET
}
return ret != 0;
}
public static bool InputTextWithHint(string label, string hint, string buf, uint buf_size)
{
byte* native_label;
int label_byteCount = 0;
if (label != null)
{
label_byteCount = Encoding.UTF8.GetByteCount(label);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
native_label = Util.Allocate(label_byteCount + 1);
}
else
{
byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1];
native_label = native_label_stackBytes;
}
int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount);
native_label[native_label_offset] = 0;
}
else { native_label = null; }
byte* native_hint;
int hint_byteCount = 0;
if (hint != null)
{
hint_byteCount = Encoding.UTF8.GetByteCount(hint);
if (hint_byteCount > Util.StackAllocationSizeLimit)
{
native_hint = Util.Allocate(hint_byteCount + 1);
}
else
{
byte* native_hint_stackBytes = stackalloc byte[hint_byteCount + 1];
native_hint = native_hint_stackBytes;
}
int native_hint_offset = Util.GetUtf8(hint, native_hint, hint_byteCount);
native_hint[native_hint_offset] = 0;
}
else { native_hint = null; }
byte* native_buf;
int buf_byteCount = 0;
if (buf != null)
{
buf_byteCount = Encoding.UTF8.GetByteCount(buf);
if (buf_byteCount > Util.StackAllocationSizeLimit)
{
native_buf = Util.Allocate(buf_byteCount + 1);
}
else
{
byte* native_buf_stackBytes = stackalloc byte[buf_byteCount + 1];
native_buf = native_buf_stackBytes;
}
int native_buf_offset = Util.GetUtf8(buf, native_buf, buf_byteCount);
native_buf[native_buf_offset] = 0;
}
else { native_buf = null; }
ImGuiInputTextFlags flags = 0;
ImGuiInputTextCallback callback = null;
void* user_data = null;
byte ret = ImGuiNative.igInputTextWithHint(native_label, native_hint, native_buf, buf_size, flags, callback, user_data);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_label);
}
if (hint_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_hint);
}
if (buf_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_buf);
}
return ret != 0;
}
public static bool InputTextWithHint(string label, string hint, string buf, uint buf_size, ImGuiInputTextFlags flags)
{
byte* native_label;
int label_byteCount = 0;
if (label != null)
{
label_byteCount = Encoding.UTF8.GetByteCount(label);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
native_label = Util.Allocate(label_byteCount + 1);
}
else
{
byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1];
native_label = native_label_stackBytes;
}
int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount);
native_label[native_label_offset] = 0;
}
else { native_label = null; }
byte* native_hint;
int hint_byteCount = 0;
if (hint != null)
{
hint_byteCount = Encoding.UTF8.GetByteCount(hint);
if (hint_byteCount > Util.StackAllocationSizeLimit)
{
native_hint = Util.Allocate(hint_byteCount + 1);
}
else
{
byte* native_hint_stackBytes = stackalloc byte[hint_byteCount + 1];
native_hint = native_hint_stackBytes;
}
int native_hint_offset = Util.GetUtf8(hint, native_hint, hint_byteCount);
native_hint[native_hint_offset] = 0;
}
else { native_hint = null; }
byte* native_buf;
int buf_byteCount = 0;
if (buf != null)
{
buf_byteCount = Encoding.UTF8.GetByteCount(buf);
if (buf_byteCount > Util.StackAllocationSizeLimit)
{
native_buf = Util.Allocate(buf_byteCount + 1);
}
else
{
byte* native_buf_stackBytes = stackalloc byte[buf_byteCount + 1];
native_buf = native_buf_stackBytes;
}
int native_buf_offset = Util.GetUtf8(buf, native_buf, buf_byteCount);
native_buf[native_buf_offset] = 0;
}
else { native_buf = null; }
ImGuiInputTextCallback callback = null;
void* user_data = null;
byte ret = ImGuiNative.igInputTextWithHint(native_label, native_hint, native_buf, buf_size, flags, callback, user_data);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_label);
}
if (hint_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_hint);
}
if (buf_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_buf);
}
return ret != 0;
}
public static bool InputTextWithHint(string label, string hint, string buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback)
{
byte* native_label;
int label_byteCount = 0;
if (label != null)
{
label_byteCount = Encoding.UTF8.GetByteCount(label);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
native_label = Util.Allocate(label_byteCount + 1);
}
else
{
byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1];
native_label = native_label_stackBytes;
}
int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount);
native_label[native_label_offset] = 0;
}
else { native_label = null; }
byte* native_hint;
int hint_byteCount = 0;
if (hint != null)
{
hint_byteCount = Encoding.UTF8.GetByteCount(hint);
if (hint_byteCount > Util.StackAllocationSizeLimit)
{
native_hint = Util.Allocate(hint_byteCount + 1);
}
else
{
byte* native_hint_stackBytes = stackalloc byte[hint_byteCount + 1];
native_hint = native_hint_stackBytes;
}
int native_hint_offset = Util.GetUtf8(hint, native_hint, hint_byteCount);
native_hint[native_hint_offset] = 0;
}
else { native_hint = null; }
byte* native_buf;
int buf_byteCount = 0;
if (buf != null)
{
buf_byteCount = Encoding.UTF8.GetByteCount(buf);
if (buf_byteCount > Util.StackAllocationSizeLimit)
{
native_buf = Util.Allocate(buf_byteCount + 1);
}
else
{
byte* native_buf_stackBytes = stackalloc byte[buf_byteCount + 1];
native_buf = native_buf_stackBytes;
}
int native_buf_offset = Util.GetUtf8(buf, native_buf, buf_byteCount);
native_buf[native_buf_offset] = 0;
}
else { native_buf = null; }
void* user_data = null;
byte ret = ImGuiNative.igInputTextWithHint(native_label, native_hint, native_buf, buf_size, flags, callback, user_data);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_label);
}
if (hint_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_hint);
}
if (buf_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_buf);
}
return ret != 0;
}
public static bool InputTextWithHint(string label, string hint, string buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, IntPtr user_data)
{
byte* native_label;
int label_byteCount = 0;
if (label != null)
{
label_byteCount = Encoding.UTF8.GetByteCount(label);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
native_label = Util.Allocate(label_byteCount + 1);
}
else
{
byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1];
native_label = native_label_stackBytes;
}
int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount);
native_label[native_label_offset] = 0;
}
else { native_label = null; }
byte* native_hint;
int hint_byteCount = 0;
if (hint != null)
{
hint_byteCount = Encoding.UTF8.GetByteCount(hint);
if (hint_byteCount > Util.StackAllocationSizeLimit)
{
native_hint = Util.Allocate(hint_byteCount + 1);
}
else
{
byte* native_hint_stackBytes = stackalloc byte[hint_byteCount + 1];
native_hint = native_hint_stackBytes;
}
int native_hint_offset = Util.GetUtf8(hint, native_hint, hint_byteCount);
native_hint[native_hint_offset] = 0;
}
else { native_hint = null; }
byte* native_buf;
int buf_byteCount = 0;
if (buf != null)
{
buf_byteCount = Encoding.UTF8.GetByteCount(buf);
if (buf_byteCount > Util.StackAllocationSizeLimit)
{
native_buf = Util.Allocate(buf_byteCount + 1);
}
else
{
byte* native_buf_stackBytes = stackalloc byte[buf_byteCount + 1];
native_buf = native_buf_stackBytes;
}
int native_buf_offset = Util.GetUtf8(buf, native_buf, buf_byteCount);
native_buf[native_buf_offset] = 0;
}
else { native_buf = null; }
void* native_user_data = (void*)user_data.ToPointer();
byte ret = ImGuiNative.igInputTextWithHint(native_label, native_hint, native_buf, buf_size, flags, callback, native_user_data);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_label);
}
if (hint_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_hint);
}
if (buf_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_buf);
}
return ret != 0;
}
public static bool InvisibleButton(string str_id, Vector2 size)
{
byte* native_str_id;
@ -8338,25 +8634,25 @@ namespace ImGuiNET
}
public static void LogToClipboard()
{
int max_depth = -1;
ImGuiNative.igLogToClipboard(max_depth);
int auto_open_depth = -1;
ImGuiNative.igLogToClipboard(auto_open_depth);
}
public static void LogToClipboard(int max_depth)
public static void LogToClipboard(int auto_open_depth)
{
ImGuiNative.igLogToClipboard(max_depth);
ImGuiNative.igLogToClipboard(auto_open_depth);
}
public static void LogToFile()
{
int max_depth = -1;
int auto_open_depth = -1;
byte* native_filename = null;
ImGuiNative.igLogToFile(max_depth, native_filename);
ImGuiNative.igLogToFile(auto_open_depth, native_filename);
}
public static void LogToFile(int max_depth)
public static void LogToFile(int auto_open_depth)
{
byte* native_filename = null;
ImGuiNative.igLogToFile(max_depth, native_filename);
ImGuiNative.igLogToFile(auto_open_depth, native_filename);
}
public static void LogToFile(int max_depth, string filename)
public static void LogToFile(int auto_open_depth, string filename)
{
byte* native_filename;
int filename_byteCount = 0;
@ -8376,7 +8672,7 @@ namespace ImGuiNET
native_filename[native_filename_offset] = 0;
}
else { native_filename = null; }
ImGuiNative.igLogToFile(max_depth, native_filename);
ImGuiNative.igLogToFile(auto_open_depth, native_filename);
if (filename_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_filename);
@ -8384,12 +8680,12 @@ namespace ImGuiNET
}
public static void LogToTTY()
{
int max_depth = -1;
ImGuiNative.igLogToTTY(max_depth);
int auto_open_depth = -1;
ImGuiNative.igLogToTTY(auto_open_depth);
}
public static void LogToTTY(int max_depth)
public static void LogToTTY(int auto_open_depth)
{
ImGuiNative.igLogToTTY(max_depth);
ImGuiNative.igLogToTTY(auto_open_depth);
}
public static IntPtr MemAlloc(uint size)
{
@ -10023,7 +10319,7 @@ namespace ImGuiNET
{
ImGuiNative.igSetCursorScreenPos(pos);
}
public static bool SetDragDropPayload(string type, IntPtr data, uint size)
public static bool SetDragDropPayload(string type, IntPtr data, uint sz)
{
byte* native_type;
int type_byteCount = 0;
@ -10045,14 +10341,14 @@ namespace ImGuiNET
else { native_type = null; }
void* native_data = (void*)data.ToPointer();
ImGuiCond cond = 0;
byte ret = ImGuiNative.igSetDragDropPayload(native_type, native_data, size, cond);
byte ret = ImGuiNative.igSetDragDropPayload(native_type, native_data, sz, cond);
if (type_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_type);
}
return ret != 0;
}
public static bool SetDragDropPayload(string type, IntPtr data, uint size, ImGuiCond cond)
public static bool SetDragDropPayload(string type, IntPtr data, uint sz, ImGuiCond cond)
{
byte* native_type;
int type_byteCount = 0;
@ -10073,7 +10369,7 @@ namespace ImGuiNET
}
else { native_type = null; }
void* native_data = (void*)data.ToPointer();
byte ret = ImGuiNative.igSetDragDropPayload(native_type, native_data, size, cond);
byte ret = ImGuiNative.igSetDragDropPayload(native_type, native_data, sz, cond);
if (type_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_type);

@ -17,16 +17,19 @@ namespace ImGuiNET
AlphaPreview = 1 << 17,
AlphaPreviewHalf = 1 << 18,
HDR = 1 << 19,
RGB = 1 << 20,
HSV = 1 << 21,
HEX = 1 << 22,
DisplayRGB = 1 << 20,
DisplayHSV = 1 << 21,
DisplayHex = 1 << 22,
Uint8 = 1 << 23,
Float = 1 << 24,
PickerHueBar = 1 << 25,
PickerHueWheel = 1 << 26,
_InputsMask = RGB|HSV|HEX,
InputRGB = 1 << 27,
InputHSV = 1 << 28,
_OptionsDefault = Uint8|DisplayRGB|InputRGB|PickerHueBar,
_DisplayMask = DisplayRGB|DisplayHSV|DisplayHex,
_DataTypeMask = Uint8|Float,
_PickerMask = PickerHueWheel|PickerHueBar,
_OptionsDefault = Uint8|RGB|PickerHueBar,
_InputMask = InputRGB|InputHSV,
}
}

@ -2,12 +2,16 @@ namespace ImGuiNET
{
public enum ImGuiDataType
{
S32 = 0,
U32 = 1,
S64 = 2,
U64 = 3,
Float = 4,
Double = 5,
COUNT = 6,
S8 = 0,
U8 = 1,
S16 = 2,
U16 = 3,
S32 = 4,
U32 = 5,
S64 = 6,
U64 = 7,
Float = 8,
Double = 9,
COUNT = 10,
}
}

@ -51,7 +51,7 @@ namespace ImGuiNET
public byte KeyAlt;
public byte KeySuper;
public fixed byte KeysDown[512];
public fixed float NavInputs[21];
public fixed float NavInputs[22];
public byte WantCaptureMouse;
public byte WantCaptureKeyboard;
public byte WantTextInput;
@ -87,8 +87,8 @@ namespace ImGuiNET
public fixed float MouseDragMaxDistanceSqr[5];
public fixed float KeysDownDuration[512];
public fixed float KeysDownDurationPrev[512];
public fixed float NavInputsDownDuration[21];
public fixed float NavInputsDownDurationPrev[21];
public fixed float NavInputsDownDuration[22];
public fixed float NavInputsDownDurationPrev[22];
public ImVector InputQueueCharacters;
}
public unsafe partial struct ImGuiIOPtr
@ -143,7 +143,7 @@ namespace ImGuiNET
public ref bool KeyAlt => ref Unsafe.AsRef<bool>(&NativePtr->KeyAlt);
public ref bool KeySuper => ref Unsafe.AsRef<bool>(&NativePtr->KeySuper);
public RangeAccessor<bool> KeysDown => new RangeAccessor<bool>(NativePtr->KeysDown, 512);
public RangeAccessor<float> NavInputs => new RangeAccessor<float>(NativePtr->NavInputs, 21);
public RangeAccessor<float> NavInputs => new RangeAccessor<float>(NativePtr->NavInputs, 22);
public ref bool WantCaptureMouse => ref Unsafe.AsRef<bool>(&NativePtr->WantCaptureMouse);
public ref bool WantCaptureKeyboard => ref Unsafe.AsRef<bool>(&NativePtr->WantCaptureKeyboard);
public ref bool WantTextInput => ref Unsafe.AsRef<bool>(&NativePtr->WantTextInput);
@ -171,8 +171,8 @@ namespace ImGuiNET
public RangeAccessor<float> MouseDragMaxDistanceSqr => new RangeAccessor<float>(NativePtr->MouseDragMaxDistanceSqr, 5);
public RangeAccessor<float> KeysDownDuration => new RangeAccessor<float>(NativePtr->KeysDownDuration, 512);
public RangeAccessor<float> KeysDownDurationPrev => new RangeAccessor<float>(NativePtr->KeysDownDurationPrev, 512);
public RangeAccessor<float> NavInputsDownDuration => new RangeAccessor<float>(NativePtr->NavInputsDownDuration, 21);
public RangeAccessor<float> NavInputsDownDurationPrev => new RangeAccessor<float>(NativePtr->NavInputsDownDurationPrev, 21);
public RangeAccessor<float> NavInputsDownDuration => new RangeAccessor<float>(NativePtr->NavInputsDownDuration, 22);
public RangeAccessor<float> NavInputsDownDurationPrev => new RangeAccessor<float>(NativePtr->NavInputsDownDurationPrev, 22);
public ImVector<ushort> InputQueueCharacters => new ImVector<ushort>(NativePtr->InputQueueCharacters);
public void AddInputCharacter(ushort c)
{

@ -169,6 +169,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igEndTooltip();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetBackgroundDrawList();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte* igGetClipboardText();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern uint igGetColorU32(ImGuiCol idx, float alpha_mul);
@ -215,6 +217,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetFontTexUvWhitePixel_nonUDT2")]
public static extern Vector2 igGetFontTexUvWhitePixel();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetForegroundDrawList();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern int igGetFrameCount();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetFrameHeight();
@ -247,8 +251,6 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetMousePosOnOpeningCurrentPopup_nonUDT2")]
public static extern Vector2 igGetMousePosOnOpeningCurrentPopup();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetOverlayDrawList();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetScrollMaxX();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetScrollMaxY();
@ -323,6 +325,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igInputTextMultiline(byte* label, byte* buf, uint buf_size, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igInputTextWithHint(byte* label, byte* hint, byte* buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igInvisibleButton(byte* str_id, Vector2 size);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsAnyItemActive();
@ -405,11 +409,11 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igLogText(byte* fmt);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igLogToClipboard(int max_depth);
public static extern void igLogToClipboard(int auto_open_depth);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igLogToFile(int max_depth, byte* filename);
public static extern void igLogToFile(int auto_open_depth, byte* filename);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igLogToTTY(int max_depth);
public static extern void igLogToTTY(int auto_open_depth);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void* igMemAlloc(uint size);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -519,7 +523,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetCursorScreenPos(Vector2 pos);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSetDragDropPayload(byte* type, void* data, uint size, ImGuiCond cond);
public static extern byte igSetDragDropPayload(byte* type, void* data, uint sz, ImGuiCond cond);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetItemAllowOverlap();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -885,6 +889,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ushort* ImFontAtlas_GetGlyphRangesThai(ImFontAtlas* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ushort* ImFontAtlas_GetGlyphRangesVietnamese(ImFontAtlas* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImFontAtlas_GetMouseCursorTexData(ImFontAtlas* self, ImGuiMouseCursor cursor, Vector2* out_offset, Vector2* out_size, Vector2* out_uv_border, Vector2* out_uv_fill);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* self, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel);

@ -19,11 +19,12 @@ namespace ImGuiNET
TweakSlow = 14,
TweakFast = 15,
KeyMenu = 16,
KeyLeft = 17,
KeyRight = 18,
KeyUp = 19,
KeyDown = 20,
COUNT = 21,
KeyTab = 17,
KeyLeft = 18,
KeyRight = 19,
KeyUp = 20,
KeyDown = 21,
COUNT = 22,
InternalStart = KeyMenu,
}
}

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

Loading…
Cancel
Save