Generated PInvokes for "_destroy" functions .

internals
Eric Mellino 6 years ago
parent 1743198544
commit 4588142ef9
  1. 13
      src/CodeGenerator/Program.cs
  2. 4
      src/ImGui.NET/Generated/CustomRect.gen.cs
  3. 4
      src/ImGui.NET/Generated/ImColor.gen.cs
  4. 4
      src/ImGui.NET/Generated/ImDrawCmd.gen.cs
  5. 4
      src/ImGui.NET/Generated/ImDrawData.gen.cs
  6. 4
      src/ImGui.NET/Generated/ImDrawList.gen.cs
  7. 4
      src/ImGui.NET/Generated/ImFont.gen.cs
  8. 4
      src/ImGui.NET/Generated/ImFontAtlas.gen.cs
  9. 4
      src/ImGui.NET/Generated/ImFontConfig.gen.cs
  10. 4
      src/ImGui.NET/Generated/ImFontGlyphRangesBuilder.gen.cs
  11. 4
      src/ImGui.NET/Generated/ImGuiIO.gen.cs
  12. 4
      src/ImGui.NET/Generated/ImGuiInputTextCallbackData.gen.cs
  13. 4
      src/ImGui.NET/Generated/ImGuiListClipper.gen.cs
  14. 42
      src/ImGui.NET/Generated/ImGuiNative.gen.cs
  15. 4
      src/ImGui.NET/Generated/ImGuiOnceUponAFrame.gen.cs
  16. 4
      src/ImGui.NET/Generated/ImGuiPayload.gen.cs
  17. 4
      src/ImGui.NET/Generated/ImGuiStyle.gen.cs
  18. 4
      src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs
  19. 4
      src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs
  20. 4
      src/ImGui.NET/Generated/TextRange.gen.cs

@ -168,6 +168,10 @@ namespace CodeGenerator
string ov_cimguiname = val["ov_cimguiname"]?.ToString(); string ov_cimguiname = val["ov_cimguiname"]?.ToString();
string cimguiname = val["cimguiname"].ToString(); string cimguiname = val["cimguiname"].ToString();
string friendlyName = val["funcname"]?.ToString(); string friendlyName = val["funcname"]?.ToString();
if (cimguiname.EndsWith("_destroy"))
{
friendlyName = "Destroy";
}
if (friendlyName == null) { return null; } if (friendlyName == null) { return null; }
string exportedName = ov_cimguiname; string exportedName = ov_cimguiname;
@ -208,6 +212,7 @@ namespace CodeGenerator
string structName = val["stname"].ToString(); string structName = val["stname"].ToString();
bool isConstructor = val.Value<bool>("constructor"); bool isConstructor = val.Value<bool>("constructor");
bool isDestructor = val.Value<bool>("destructor");
if (isConstructor) if (isConstructor)
{ {
returnType = structName + "*"; returnType = structName + "*";
@ -221,7 +226,8 @@ namespace CodeGenerator
returnType, returnType,
structName, structName,
comment, comment,
isConstructor); isConstructor,
isDestructor);
}).Where(od => od != null).ToArray(); }).Where(od => od != null).ToArray();
return new FunctionDefinition(name, overloads); return new FunctionDefinition(name, overloads);
@ -1134,6 +1140,7 @@ namespace CodeGenerator
public bool IsMemberFunction { get; } public bool IsMemberFunction { get; }
public string Comment { get; } public string Comment { get; }
public bool IsConstructor { get; } public bool IsConstructor { get; }
public bool IsDestructor { get; }
public OverloadDefinition( public OverloadDefinition(
string exportedName, string exportedName,
@ -1143,7 +1150,8 @@ namespace CodeGenerator
string returnType, string returnType,
string structName, string structName,
string comment, string comment,
bool isConstructor) bool isConstructor,
bool isDestructor)
{ {
ExportedName = exportedName; ExportedName = exportedName;
FriendlyName = friendlyName; FriendlyName = friendlyName;
@ -1154,6 +1162,7 @@ namespace CodeGenerator
IsMemberFunction = structName != "ImGui"; IsMemberFunction = structName != "ImGui";
Comment = comment; Comment = comment;
IsConstructor = isConstructor; IsConstructor = isConstructor;
IsDestructor = isDestructor;
} }
} }

@ -32,6 +32,10 @@ namespace ImGuiNET
public ref float GlyphAdvanceX => ref Unsafe.AsRef<float>(&NativePtr->GlyphAdvanceX); public ref float GlyphAdvanceX => ref Unsafe.AsRef<float>(&NativePtr->GlyphAdvanceX);
public ref Vector2 GlyphOffset => ref Unsafe.AsRef<Vector2>(&NativePtr->GlyphOffset); public ref Vector2 GlyphOffset => ref Unsafe.AsRef<Vector2>(&NativePtr->GlyphOffset);
public ImFontPtr Font => new ImFontPtr(NativePtr->Font); public ImFontPtr Font => new ImFontPtr(NativePtr->Font);
public void Destroy()
{
ImGuiNative.CustomRect_destroy(NativePtr);
}
public bool IsPacked() public bool IsPacked()
{ {
byte ret = ImGuiNative.CustomRect_IsPacked(NativePtr); byte ret = ImGuiNative.CustomRect_IsPacked(NativePtr);

@ -18,6 +18,10 @@ namespace ImGuiNET
public static implicit operator ImColor* (ImColorPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImColor* (ImColorPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImColorPtr(IntPtr nativePtr) => new ImColorPtr(nativePtr); public static implicit operator ImColorPtr(IntPtr nativePtr) => new ImColorPtr(nativePtr);
public ref Vector4 Value => ref Unsafe.AsRef<Vector4>(&NativePtr->Value); public ref Vector4 Value => ref Unsafe.AsRef<Vector4>(&NativePtr->Value);
public void Destroy()
{
ImGuiNative.ImColor_destroy(NativePtr);
}
public ImColor HSV(float h, float s, float v) public ImColor HSV(float h, float s, float v)
{ {
float a = 1.0f; float a = 1.0f;

@ -26,5 +26,9 @@ namespace ImGuiNET
public ref IntPtr TextureId => ref Unsafe.AsRef<IntPtr>(&NativePtr->TextureId); public ref IntPtr TextureId => ref Unsafe.AsRef<IntPtr>(&NativePtr->TextureId);
public ref IntPtr UserCallback => ref Unsafe.AsRef<IntPtr>(&NativePtr->UserCallback); public ref IntPtr UserCallback => ref Unsafe.AsRef<IntPtr>(&NativePtr->UserCallback);
public IntPtr UserCallbackData { get => (IntPtr)NativePtr->UserCallbackData; set => NativePtr->UserCallbackData = (void*)value; } public IntPtr UserCallbackData { get => (IntPtr)NativePtr->UserCallbackData; set => NativePtr->UserCallbackData = (void*)value; }
public void Destroy()
{
ImGuiNative.ImDrawCmd_destroy(NativePtr);
}
} }
} }

@ -38,6 +38,10 @@ namespace ImGuiNET
{ {
ImGuiNative.ImDrawData_DeIndexAllBuffers(NativePtr); ImGuiNative.ImDrawData_DeIndexAllBuffers(NativePtr);
} }
public void Destroy()
{
ImGuiNative.ImDrawData_destroy(NativePtr);
}
public void ScaleClipRects(Vector2 sc) public void ScaleClipRects(Vector2 sc)
{ {
ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, sc); ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, sc);

@ -274,6 +274,10 @@ namespace ImGuiNET
ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput(NativePtr); ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput(NativePtr);
return new ImDrawListPtr(ret); return new ImDrawListPtr(ret);
} }
public void Destroy()
{
ImGuiNative.ImDrawList_destroy(NativePtr);
}
public Vector2 GetClipRectMax() public Vector2 GetClipRectMax()
{ {
Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMax(NativePtr); Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMax(NativePtr);

@ -70,6 +70,10 @@ namespace ImGuiNET
{ {
ImGuiNative.ImFont_ClearOutputData(NativePtr); ImGuiNative.ImFont_ClearOutputData(NativePtr);
} }
public void Destroy()
{
ImGuiNative.ImFont_destroy(NativePtr);
}
public ImFontGlyphPtr FindGlyph(ushort c) public ImFontGlyphPtr FindGlyph(ushort c)
{ {
ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph(NativePtr, c); ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph(NativePtr, c);

@ -338,6 +338,10 @@ namespace ImGuiNET
{ {
ImGuiNative.ImFontAtlas_ClearTexData(NativePtr); ImGuiNative.ImFontAtlas_ClearTexData(NativePtr);
} }
public void Destroy()
{
ImGuiNative.ImFontAtlas_destroy(NativePtr);
}
public CustomRect* GetCustomRectByIndex(int index) public CustomRect* GetCustomRectByIndex(int index)
{ {
CustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex(NativePtr, index); CustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex(NativePtr, index);

@ -52,5 +52,9 @@ namespace ImGuiNET
public ref float RasterizerMultiply => ref Unsafe.AsRef<float>(&NativePtr->RasterizerMultiply); public ref float RasterizerMultiply => ref Unsafe.AsRef<float>(&NativePtr->RasterizerMultiply);
public RangeAccessor<byte> Name => new RangeAccessor<byte>(NativePtr->Name, 40); public RangeAccessor<byte> Name => new RangeAccessor<byte>(NativePtr->Name, 40);
public ImFontPtr DstFont => new ImFontPtr(NativePtr->DstFont); public ImFontPtr DstFont => new ImFontPtr(NativePtr->DstFont);
public void Destroy()
{
ImGuiNative.ImFontConfig_destroy(NativePtr);
}
} }
} }

@ -61,6 +61,10 @@ namespace ImGuiNET
ImGuiNative.ImFontGlyphRangesBuilder_BuildRanges(NativePtr, native_out_ranges); ImGuiNative.ImFontGlyphRangesBuilder_BuildRanges(NativePtr, native_out_ranges);
} }
} }
public void Destroy()
{
ImGuiNative.ImFontGlyphRangesBuilder_destroy(NativePtr);
}
public bool GetBit(int n) public bool GetBit(int n)
{ {
byte ret = ImGuiNative.ImFontGlyphRangesBuilder_GetBit(NativePtr, n); byte ret = ImGuiNative.ImFontGlyphRangesBuilder_GetBit(NativePtr, n);

@ -212,5 +212,9 @@ namespace ImGuiNET
{ {
ImGuiNative.ImGuiIO_ClearInputCharacters(NativePtr); ImGuiNative.ImGuiIO_ClearInputCharacters(NativePtr);
} }
public void Destroy()
{
ImGuiNative.ImGuiIO_destroy(NativePtr);
}
} }
} }

@ -44,6 +44,10 @@ namespace ImGuiNET
{ {
ImGuiNative.ImGuiInputTextCallbackData_DeleteChars(NativePtr, pos, bytes_count); ImGuiNative.ImGuiInputTextCallbackData_DeleteChars(NativePtr, pos, bytes_count);
} }
public void Destroy()
{
ImGuiNative.ImGuiInputTextCallbackData_destroy(NativePtr);
}
public bool HasSelection() public bool HasSelection()
{ {
byte ret = ImGuiNative.ImGuiInputTextCallbackData_HasSelection(NativePtr); byte ret = ImGuiNative.ImGuiInputTextCallbackData_HasSelection(NativePtr);

@ -37,6 +37,10 @@ namespace ImGuiNET
{ {
ImGuiNative.ImGuiListClipper_Begin(NativePtr, items_count, items_height); ImGuiNative.ImGuiListClipper_Begin(NativePtr, items_count, items_height);
} }
public void Destroy()
{
ImGuiNative.ImGuiListClipper_destroy(NativePtr);
}
public void End() public void End()
{ {
ImGuiNative.ImGuiListClipper_End(NativePtr); ImGuiNative.ImGuiListClipper_End(NativePtr);

@ -9,6 +9,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern CustomRect* CustomRect_CustomRect(); public static extern CustomRect* CustomRect_CustomRect();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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); public static extern byte CustomRect_IsPacked(CustomRect* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiPayload* igAcceptDragDropPayload(byte* type, ImGuiDragDropFlags flags); public static extern ImGuiPayload* igAcceptDragDropPayload(byte* type, ImGuiDragDropFlags flags);
@ -664,6 +666,8 @@ namespace ImGuiNET
public static extern byte igVSliderInt(byte* label, Vector2 size, int* v, int v_min, int v_max, byte* format); public static extern byte igVSliderInt(byte* label, Vector2 size, int* v, int v_min, int v_max, byte* format);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igVSliderScalar(byte* label, Vector2 size, ImGuiDataType data_type, void* v, void* v_min, void* v_max, byte* format, float power); public static extern byte igVSliderScalar(byte* label, Vector2 size, ImGuiDataType data_type, void* v, void* v_min, void* v_max, byte* format, float power);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImColor_destroy(ImColor* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImColor_HSV_nonUDT2")] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImColor_HSV_nonUDT2")]
public static extern ImColor ImColor_HSV(ImColor* self, float h, float s, float v, float a); public static extern ImColor ImColor_HSV(ImColor* self, float h, float s, float v, float a);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -679,12 +683,16 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImColor_SetHSV(ImColor* self, float h, float s, float v, float a); public static extern void ImColor_SetHSV(ImColor* self, float h, float s, float v, float a);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawCmd_destroy(ImDrawCmd* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawCmd* ImDrawCmd_ImDrawCmd(); public static extern ImDrawCmd* ImDrawCmd_ImDrawCmd();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawData_Clear(ImDrawData* self); public static extern void ImDrawData_Clear(ImDrawData* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawData_DeIndexAllBuffers(ImDrawData* self); public static extern void ImDrawData_DeIndexAllBuffers(ImDrawData* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawData_destroy(ImDrawData* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawData* ImDrawData_ImDrawData(); public static extern ImDrawData* ImDrawData_ImDrawData();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawData_ScaleClipRects(ImDrawData* self, Vector2 sc); public static extern void ImDrawData_ScaleClipRects(ImDrawData* self, Vector2 sc);
@ -740,6 +748,8 @@ namespace ImGuiNET
public static extern void ImDrawList_ClearFreeMemory(ImDrawList* self); public static extern void ImDrawList_ClearFreeMemory(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* ImDrawList_CloneOutput(ImDrawList* self); public static extern ImDrawList* ImDrawList_CloneOutput(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_destroy(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImDrawList_GetClipRectMax_nonUDT2")] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImDrawList_GetClipRectMax_nonUDT2")]
public static extern Vector2 ImDrawList_GetClipRectMax(ImDrawList* self); public static extern Vector2 ImDrawList_GetClipRectMax(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImDrawList_GetClipRectMin_nonUDT2")] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImDrawList_GetClipRectMin_nonUDT2")]
@ -805,6 +815,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFont_ClearOutputData(ImFont* self); public static extern void ImFont_ClearOutputData(ImFont* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFont_destroy(ImFont* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImFontGlyph* ImFont_FindGlyph(ImFont* self, ushort c); public static extern ImFontGlyph* ImFont_FindGlyph(ImFont* self, ushort c);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImFontGlyph* ImFont_FindGlyphNoFallback(ImFont* self, ushort c); public static extern ImFontGlyph* ImFont_FindGlyphNoFallback(ImFont* self, ushort c);
@ -853,6 +865,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontAtlas_ClearTexData(ImFontAtlas* self); public static extern void ImFontAtlas_ClearTexData(ImFontAtlas* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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 CustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self, int index);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ushort* ImFontAtlas_GetGlyphRangesChineseFull(ImFontAtlas* self); public static extern ushort* ImFontAtlas_GetGlyphRangesChineseFull(ImFontAtlas* self);
@ -881,6 +895,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontAtlas_SetTexID(ImFontAtlas* self, IntPtr id); public static extern void ImFontAtlas_SetTexID(ImFontAtlas* self, IntPtr id);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontConfig_destroy(ImFontConfig* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImFontConfig* ImFontConfig_ImFontConfig(); public static extern ImFontConfig* ImFontConfig_ImFontConfig();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontGlyphRangesBuilder_AddChar(ImFontGlyphRangesBuilder* self, ushort c); public static extern void ImFontGlyphRangesBuilder_AddChar(ImFontGlyphRangesBuilder* self, ushort c);
@ -891,6 +907,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontGlyphRangesBuilder_BuildRanges(ImFontGlyphRangesBuilder* self, ImVector* out_ranges); public static extern void ImFontGlyphRangesBuilder_BuildRanges(ImFontGlyphRangesBuilder* self, ImVector* out_ranges);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontGlyphRangesBuilder_destroy(ImFontGlyphRangesBuilder* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImFontGlyphRangesBuilder_GetBit(ImFontGlyphRangesBuilder* self, int n); public static extern byte ImFontGlyphRangesBuilder_GetBit(ImFontGlyphRangesBuilder* self, int n);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImFontGlyphRangesBuilder* ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder(); public static extern ImFontGlyphRangesBuilder* ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder();
@ -899,6 +917,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self, int pos, int bytes_count); public static extern void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self, int pos, int bytes_count);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiInputTextCallbackData_destroy(ImGuiInputTextCallbackData* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self); public static extern byte ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(); public static extern ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData();
@ -911,20 +931,28 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiIO_ClearInputCharacters(ImGuiIO* self); public static extern void ImGuiIO_ClearInputCharacters(ImGuiIO* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiIO_destroy(ImGuiIO* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiIO* ImGuiIO_ImGuiIO(); public static extern ImGuiIO* ImGuiIO_ImGuiIO();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiListClipper_Begin(ImGuiListClipper* self, int items_count, float items_height); public static extern void ImGuiListClipper_Begin(ImGuiListClipper* self, int items_count, float items_height);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiListClipper_destroy(ImGuiListClipper* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiListClipper_End(ImGuiListClipper* self); public static extern void ImGuiListClipper_End(ImGuiListClipper* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(int items_count, float items_height); public static extern ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(int items_count, float items_height);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiListClipper_Step(ImGuiListClipper* self); public static extern byte ImGuiListClipper_Step(ImGuiListClipper* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiOnceUponAFrame_destroy(ImGuiOnceUponAFrame* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(); public static extern ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiPayload_Clear(ImGuiPayload* self); public static extern void ImGuiPayload_Clear(ImGuiPayload* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiPayload_destroy(ImGuiPayload* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiPayload* ImGuiPayload_ImGuiPayload(); public static extern ImGuiPayload* ImGuiPayload_ImGuiPayload();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiPayload_IsDataType(ImGuiPayload* self, byte* type); public static extern byte ImGuiPayload_IsDataType(ImGuiPayload* self, byte* type);
@ -963,6 +991,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiStorage_SetVoidPtr(ImGuiStorage* self, uint key, void* val); public static extern void ImGuiStorage_SetVoidPtr(ImGuiStorage* self, uint key, void* val);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiStyle_destroy(ImGuiStyle* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiStyle* ImGuiStyle_ImGuiStyle(); public static extern ImGuiStyle* ImGuiStyle_ImGuiStyle();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self, float scale_factor); public static extern void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self, float scale_factor);
@ -975,6 +1005,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiTextBuffer_clear(ImGuiTextBuffer* self); public static extern void ImGuiTextBuffer_clear(ImGuiTextBuffer* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiTextBuffer_destroy(ImGuiTextBuffer* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiTextBuffer_empty(ImGuiTextBuffer* self); public static extern byte ImGuiTextBuffer_empty(ImGuiTextBuffer* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte* ImGuiTextBuffer_end(ImGuiTextBuffer* self); public static extern byte* ImGuiTextBuffer_end(ImGuiTextBuffer* self);
@ -989,6 +1021,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiTextFilter_Clear(ImGuiTextFilter* self); public static extern void ImGuiTextFilter_Clear(ImGuiTextFilter* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiTextFilter_destroy(ImGuiTextFilter* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiTextFilter_Draw(ImGuiTextFilter* self, byte* label, float width); public static extern byte ImGuiTextFilter_Draw(ImGuiTextFilter* self, byte* label, float width);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiTextFilter* ImGuiTextFilter_ImGuiTextFilter(byte* default_filter); public static extern ImGuiTextFilter* ImGuiTextFilter_ImGuiTextFilter(byte* default_filter);
@ -997,14 +1031,20 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiTextFilter_PassFilter(ImGuiTextFilter* self, byte* text, byte* text_end); public static extern byte ImGuiTextFilter_PassFilter(ImGuiTextFilter* self, byte* text, byte* text_end);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImVec2_destroy(Vector2* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2* ImVec2_ImVec2(); public static extern Vector2* ImVec2_ImVec2();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2* ImVec2_ImVec2Float(float _x, float _y); public static extern Vector2* ImVec2_ImVec2Float(float _x, float _y);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImVec4_destroy(Vector4* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Vector4* ImVec4_ImVec4(); public static extern Vector4* ImVec4_ImVec4();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Vector4* ImVec4_ImVec4Float(float _x, float _y, float _z, float _w); public static extern Vector4* ImVec4_ImVec4Float(float _x, float _y, float _z, float _w);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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); public static extern Pair* Pair_PairInt(uint _key, int _val_i);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Pair* Pair_PairFloat(uint _key, float _val_f); public static extern Pair* Pair_PairFloat(uint _key, float _val_f);
@ -1013,6 +1053,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte* TextRange_begin(TextRange* self); public static extern byte* TextRange_begin(TextRange* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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); public static extern byte TextRange_empty(TextRange* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte* TextRange_end(TextRange* self); public static extern byte* TextRange_end(TextRange* self);

@ -18,5 +18,9 @@ namespace ImGuiNET
public static implicit operator ImGuiOnceUponAFrame* (ImGuiOnceUponAFramePtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiOnceUponAFrame* (ImGuiOnceUponAFramePtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImGuiOnceUponAFramePtr(IntPtr nativePtr) => new ImGuiOnceUponAFramePtr(nativePtr); public static implicit operator ImGuiOnceUponAFramePtr(IntPtr nativePtr) => new ImGuiOnceUponAFramePtr(nativePtr);
public ref int RefFrame => ref Unsafe.AsRef<int>(&NativePtr->RefFrame); public ref int RefFrame => ref Unsafe.AsRef<int>(&NativePtr->RefFrame);
public void Destroy()
{
ImGuiNative.ImGuiOnceUponAFrame_destroy(NativePtr);
}
} }
} }

@ -36,6 +36,10 @@ namespace ImGuiNET
{ {
ImGuiNative.ImGuiPayload_Clear(NativePtr); ImGuiNative.ImGuiPayload_Clear(NativePtr);
} }
public void Destroy()
{
ImGuiNative.ImGuiPayload_destroy(NativePtr);
}
public bool IsDataType(string type) public bool IsDataType(string type)
{ {
byte* native_type; byte* native_type;

@ -127,6 +127,10 @@ namespace ImGuiNET
public ref bool AntiAliasedFill => ref Unsafe.AsRef<bool>(&NativePtr->AntiAliasedFill); public ref bool AntiAliasedFill => ref Unsafe.AsRef<bool>(&NativePtr->AntiAliasedFill);
public ref float CurveTessellationTol => ref Unsafe.AsRef<float>(&NativePtr->CurveTessellationTol); public ref float CurveTessellationTol => ref Unsafe.AsRef<float>(&NativePtr->CurveTessellationTol);
public RangeAccessor<Vector4> Colors => new RangeAccessor<Vector4>(&NativePtr->Colors_0, 48); public RangeAccessor<Vector4> Colors => new RangeAccessor<Vector4>(&NativePtr->Colors_0, 48);
public void Destroy()
{
ImGuiNative.ImGuiStyle_destroy(NativePtr);
}
public void ScaleAllSizes(float scale_factor) public void ScaleAllSizes(float scale_factor)
{ {
ImGuiNative.ImGuiStyle_ScaleAllSizes(NativePtr, scale_factor); ImGuiNative.ImGuiStyle_ScaleAllSizes(NativePtr, scale_factor);

@ -58,6 +58,10 @@ namespace ImGuiNET
{ {
ImGuiNative.ImGuiTextBuffer_clear(NativePtr); ImGuiNative.ImGuiTextBuffer_clear(NativePtr);
} }
public void Destroy()
{
ImGuiNative.ImGuiTextBuffer_destroy(NativePtr);
}
public bool empty() public bool empty()
{ {
byte ret = ImGuiNative.ImGuiTextBuffer_empty(NativePtr); byte ret = ImGuiNative.ImGuiTextBuffer_empty(NativePtr);

@ -30,6 +30,10 @@ namespace ImGuiNET
{ {
ImGuiNative.ImGuiTextFilter_Clear(NativePtr); ImGuiNative.ImGuiTextFilter_Clear(NativePtr);
} }
public void Destroy()
{
ImGuiNative.ImGuiTextFilter_destroy(NativePtr);
}
public bool Draw() public bool Draw()
{ {
byte* native_label; byte* native_label;

@ -25,6 +25,10 @@ namespace ImGuiNET
byte* ret = ImGuiNative.TextRange_begin(NativePtr); byte* ret = ImGuiNative.TextRange_begin(NativePtr);
return Util.StringFromPtr(ret); return Util.StringFromPtr(ret);
} }
public void Destroy()
{
ImGuiNative.TextRange_destroy(NativePtr);
}
public bool empty() public bool empty()
{ {
byte ret = ImGuiNative.TextRange_empty(NativePtr); byte ret = ImGuiNative.TextRange_empty(NativePtr);

Loading…
Cancel
Save