diff --git a/src/CodeGenerator/Program.cs b/src/CodeGenerator/Program.cs index 9126df9..321b25f 100644 --- a/src/CodeGenerator/Program.cs +++ b/src/CodeGenerator/Program.cs @@ -168,6 +168,10 @@ namespace CodeGenerator string ov_cimguiname = val["ov_cimguiname"]?.ToString(); string cimguiname = val["cimguiname"].ToString(); string friendlyName = val["funcname"]?.ToString(); + if (cimguiname.EndsWith("_destroy")) + { + friendlyName = "Destroy"; + } if (friendlyName == null) { return null; } string exportedName = ov_cimguiname; @@ -208,6 +212,7 @@ namespace CodeGenerator string structName = val["stname"].ToString(); bool isConstructor = val.Value("constructor"); + bool isDestructor = val.Value("destructor"); if (isConstructor) { returnType = structName + "*"; @@ -221,7 +226,8 @@ namespace CodeGenerator returnType, structName, comment, - isConstructor); + isConstructor, + isDestructor); }).Where(od => od != null).ToArray(); return new FunctionDefinition(name, overloads); @@ -1134,6 +1140,7 @@ namespace CodeGenerator public bool IsMemberFunction { get; } public string Comment { get; } public bool IsConstructor { get; } + public bool IsDestructor { get; } public OverloadDefinition( string exportedName, @@ -1143,7 +1150,8 @@ namespace CodeGenerator string returnType, string structName, string comment, - bool isConstructor) + bool isConstructor, + bool isDestructor) { ExportedName = exportedName; FriendlyName = friendlyName; @@ -1154,6 +1162,7 @@ namespace CodeGenerator IsMemberFunction = structName != "ImGui"; Comment = comment; IsConstructor = isConstructor; + IsDestructor = isDestructor; } } diff --git a/src/ImGui.NET/Generated/CustomRect.gen.cs b/src/ImGui.NET/Generated/CustomRect.gen.cs index c12a727..71f94b5 100644 --- a/src/ImGui.NET/Generated/CustomRect.gen.cs +++ b/src/ImGui.NET/Generated/CustomRect.gen.cs @@ -32,6 +32,10 @@ namespace ImGuiNET public ref float GlyphAdvanceX => ref Unsafe.AsRef(&NativePtr->GlyphAdvanceX); public ref Vector2 GlyphOffset => ref Unsafe.AsRef(&NativePtr->GlyphOffset); public ImFontPtr Font => new ImFontPtr(NativePtr->Font); + public void Destroy() + { + ImGuiNative.CustomRect_destroy(NativePtr); + } public bool IsPacked() { byte ret = ImGuiNative.CustomRect_IsPacked(NativePtr); diff --git a/src/ImGui.NET/Generated/ImColor.gen.cs b/src/ImGui.NET/Generated/ImColor.gen.cs index 2f10795..148ebb9 100644 --- a/src/ImGui.NET/Generated/ImColor.gen.cs +++ b/src/ImGui.NET/Generated/ImColor.gen.cs @@ -18,6 +18,10 @@ namespace ImGuiNET public static implicit operator ImColor* (ImColorPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImColorPtr(IntPtr nativePtr) => new ImColorPtr(nativePtr); public ref Vector4 Value => ref Unsafe.AsRef(&NativePtr->Value); + public void Destroy() + { + ImGuiNative.ImColor_destroy(NativePtr); + } public ImColor HSV(float h, float s, float v) { float a = 1.0f; diff --git a/src/ImGui.NET/Generated/ImDrawCmd.gen.cs b/src/ImGui.NET/Generated/ImDrawCmd.gen.cs index 9f0dd14..247b698 100644 --- a/src/ImGui.NET/Generated/ImDrawCmd.gen.cs +++ b/src/ImGui.NET/Generated/ImDrawCmd.gen.cs @@ -26,5 +26,9 @@ namespace ImGuiNET public ref IntPtr TextureId => ref Unsafe.AsRef(&NativePtr->TextureId); public ref IntPtr UserCallback => ref Unsafe.AsRef(&NativePtr->UserCallback); public IntPtr UserCallbackData { get => (IntPtr)NativePtr->UserCallbackData; set => NativePtr->UserCallbackData = (void*)value; } + public void Destroy() + { + ImGuiNative.ImDrawCmd_destroy(NativePtr); + } } } diff --git a/src/ImGui.NET/Generated/ImDrawData.gen.cs b/src/ImGui.NET/Generated/ImDrawData.gen.cs index 2275daf..b143544 100644 --- a/src/ImGui.NET/Generated/ImDrawData.gen.cs +++ b/src/ImGui.NET/Generated/ImDrawData.gen.cs @@ -38,6 +38,10 @@ namespace ImGuiNET { ImGuiNative.ImDrawData_DeIndexAllBuffers(NativePtr); } + public void Destroy() + { + ImGuiNative.ImDrawData_destroy(NativePtr); + } public void ScaleClipRects(Vector2 sc) { ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, sc); diff --git a/src/ImGui.NET/Generated/ImDrawList.gen.cs b/src/ImGui.NET/Generated/ImDrawList.gen.cs index 7909fc8..5754902 100644 --- a/src/ImGui.NET/Generated/ImDrawList.gen.cs +++ b/src/ImGui.NET/Generated/ImDrawList.gen.cs @@ -274,6 +274,10 @@ namespace ImGuiNET ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput(NativePtr); return new ImDrawListPtr(ret); } + public void Destroy() + { + ImGuiNative.ImDrawList_destroy(NativePtr); + } public Vector2 GetClipRectMax() { Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMax(NativePtr); diff --git a/src/ImGui.NET/Generated/ImFont.gen.cs b/src/ImGui.NET/Generated/ImFont.gen.cs index 2e6a6c2..6a8215c 100644 --- a/src/ImGui.NET/Generated/ImFont.gen.cs +++ b/src/ImGui.NET/Generated/ImFont.gen.cs @@ -70,6 +70,10 @@ namespace ImGuiNET { ImGuiNative.ImFont_ClearOutputData(NativePtr); } + public void Destroy() + { + ImGuiNative.ImFont_destroy(NativePtr); + } public ImFontGlyphPtr FindGlyph(ushort c) { ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph(NativePtr, c); diff --git a/src/ImGui.NET/Generated/ImFontAtlas.gen.cs b/src/ImGui.NET/Generated/ImFontAtlas.gen.cs index ead9719..0d63eb3 100644 --- a/src/ImGui.NET/Generated/ImFontAtlas.gen.cs +++ b/src/ImGui.NET/Generated/ImFontAtlas.gen.cs @@ -338,6 +338,10 @@ namespace ImGuiNET { ImGuiNative.ImFontAtlas_ClearTexData(NativePtr); } + public void Destroy() + { + ImGuiNative.ImFontAtlas_destroy(NativePtr); + } public CustomRect* GetCustomRectByIndex(int index) { CustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex(NativePtr, index); diff --git a/src/ImGui.NET/Generated/ImFontConfig.gen.cs b/src/ImGui.NET/Generated/ImFontConfig.gen.cs index 9a55b82..8525015 100644 --- a/src/ImGui.NET/Generated/ImFontConfig.gen.cs +++ b/src/ImGui.NET/Generated/ImFontConfig.gen.cs @@ -52,5 +52,9 @@ namespace ImGuiNET public ref float RasterizerMultiply => ref Unsafe.AsRef(&NativePtr->RasterizerMultiply); public RangeAccessor Name => new RangeAccessor(NativePtr->Name, 40); public ImFontPtr DstFont => new ImFontPtr(NativePtr->DstFont); + public void Destroy() + { + ImGuiNative.ImFontConfig_destroy(NativePtr); + } } } diff --git a/src/ImGui.NET/Generated/ImFontGlyphRangesBuilder.gen.cs b/src/ImGui.NET/Generated/ImFontGlyphRangesBuilder.gen.cs index a839d52..61c85bd 100644 --- a/src/ImGui.NET/Generated/ImFontGlyphRangesBuilder.gen.cs +++ b/src/ImGui.NET/Generated/ImFontGlyphRangesBuilder.gen.cs @@ -61,6 +61,10 @@ namespace ImGuiNET ImGuiNative.ImFontGlyphRangesBuilder_BuildRanges(NativePtr, native_out_ranges); } } + public void Destroy() + { + ImGuiNative.ImFontGlyphRangesBuilder_destroy(NativePtr); + } public bool GetBit(int n) { byte ret = ImGuiNative.ImFontGlyphRangesBuilder_GetBit(NativePtr, n); diff --git a/src/ImGui.NET/Generated/ImGuiIO.gen.cs b/src/ImGui.NET/Generated/ImGuiIO.gen.cs index 409b34b..5fc8c64 100644 --- a/src/ImGui.NET/Generated/ImGuiIO.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiIO.gen.cs @@ -212,5 +212,9 @@ namespace ImGuiNET { ImGuiNative.ImGuiIO_ClearInputCharacters(NativePtr); } + public void Destroy() + { + ImGuiNative.ImGuiIO_destroy(NativePtr); + } } } diff --git a/src/ImGui.NET/Generated/ImGuiInputTextCallbackData.gen.cs b/src/ImGui.NET/Generated/ImGuiInputTextCallbackData.gen.cs index 5775c6a..45b7805 100644 --- a/src/ImGui.NET/Generated/ImGuiInputTextCallbackData.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiInputTextCallbackData.gen.cs @@ -44,6 +44,10 @@ namespace ImGuiNET { ImGuiNative.ImGuiInputTextCallbackData_DeleteChars(NativePtr, pos, bytes_count); } + public void Destroy() + { + ImGuiNative.ImGuiInputTextCallbackData_destroy(NativePtr); + } public bool HasSelection() { byte ret = ImGuiNative.ImGuiInputTextCallbackData_HasSelection(NativePtr); diff --git a/src/ImGui.NET/Generated/ImGuiListClipper.gen.cs b/src/ImGui.NET/Generated/ImGuiListClipper.gen.cs index c9bf353..2d4bdba 100644 --- a/src/ImGui.NET/Generated/ImGuiListClipper.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiListClipper.gen.cs @@ -37,6 +37,10 @@ namespace ImGuiNET { ImGuiNative.ImGuiListClipper_Begin(NativePtr, items_count, items_height); } + public void Destroy() + { + ImGuiNative.ImGuiListClipper_destroy(NativePtr); + } public void End() { ImGuiNative.ImGuiListClipper_End(NativePtr); diff --git a/src/ImGui.NET/Generated/ImGuiNative.gen.cs b/src/ImGui.NET/Generated/ImGuiNative.gen.cs index 8ec53e7..9a98d0c 100644 --- a/src/ImGui.NET/Generated/ImGuiNative.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiNative.gen.cs @@ -9,6 +9,8 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern CustomRect* CustomRect_CustomRect(); [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); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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); [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); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImColor_destroy(ImColor* self); [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); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -679,12 +683,16 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImColor_SetHSV(ImColor* self, float h, float s, float v, float a); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawCmd_destroy(ImDrawCmd* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImDrawCmd* ImDrawCmd_ImDrawCmd(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawData_Clear(ImDrawData* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawData_DeIndexAllBuffers(ImDrawData* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawData_destroy(ImDrawData* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImDrawData* ImDrawData_ImDrawData(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawData_ScaleClipRects(ImDrawData* self, Vector2 sc); @@ -740,6 +748,8 @@ namespace ImGuiNET public static extern void ImDrawList_ClearFreeMemory(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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")] public static extern Vector2 ImDrawList_GetClipRectMax(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImDrawList_GetClipRectMin_nonUDT2")] @@ -805,6 +815,8 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImFont_ClearOutputData(ImFont* self); [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); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImFontGlyph* ImFont_FindGlyphNoFallback(ImFont* self, ushort c); @@ -853,6 +865,8 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImFontAtlas_ClearTexData(ImFontAtlas* self); [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); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ushort* ImFontAtlas_GetGlyphRangesChineseFull(ImFontAtlas* self); @@ -881,6 +895,8 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImFontAtlas_SetTexID(ImFontAtlas* self, IntPtr id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontConfig_destroy(ImFontConfig* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImFontConfig* ImFontConfig_ImFontConfig(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImFontGlyphRangesBuilder_AddChar(ImFontGlyphRangesBuilder* self, ushort c); @@ -891,6 +907,8 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImFontGlyphRangesBuilder_BuildRanges(ImFontGlyphRangesBuilder* self, ImVector* out_ranges); [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); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImFontGlyphRangesBuilder* ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder(); @@ -899,6 +917,8 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self, int pos, int bytes_count); [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); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(); @@ -911,20 +931,28 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiIO_ClearInputCharacters(ImGuiIO* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_destroy(ImGuiIO* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImGuiIO* ImGuiIO_ImGuiIO(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiListClipper_Begin(ImGuiListClipper* self, int items_count, float items_height); [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); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(int items_count, float items_height); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte ImGuiListClipper_Step(ImGuiListClipper* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiOnceUponAFrame_destroy(ImGuiOnceUponAFrame* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiPayload_Clear(ImGuiPayload* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiPayload_destroy(ImGuiPayload* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImGuiPayload* ImGuiPayload_ImGuiPayload(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte ImGuiPayload_IsDataType(ImGuiPayload* self, byte* type); @@ -963,6 +991,8 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiStorage_SetVoidPtr(ImGuiStorage* self, uint key, void* val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiStyle_destroy(ImGuiStyle* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImGuiStyle* ImGuiStyle_ImGuiStyle(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self, float scale_factor); @@ -975,6 +1005,8 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiTextBuffer_clear(ImGuiTextBuffer* self); [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); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte* ImGuiTextBuffer_end(ImGuiTextBuffer* self); @@ -989,6 +1021,8 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiTextFilter_Clear(ImGuiTextFilter* self); [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); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImGuiTextFilter* ImGuiTextFilter_ImGuiTextFilter(byte* default_filter); @@ -997,14 +1031,20 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte ImGuiTextFilter_PassFilter(ImGuiTextFilter* self, byte* text, byte* text_end); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImVec2_destroy(Vector2* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern Vector2* ImVec2_ImVec2(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern Vector2* ImVec2_ImVec2Float(float _x, float _y); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImVec4_destroy(Vector4* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern Vector4* ImVec4_ImVec4(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern Vector4* ImVec4_ImVec4Float(float _x, float _y, float _z, float _w); [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); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern Pair* Pair_PairFloat(uint _key, float _val_f); @@ -1013,6 +1053,8 @@ namespace ImGuiNET [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte* TextRange_begin(TextRange* self); [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); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte* TextRange_end(TextRange* self); diff --git a/src/ImGui.NET/Generated/ImGuiOnceUponAFrame.gen.cs b/src/ImGui.NET/Generated/ImGuiOnceUponAFrame.gen.cs index e3c648c..aa076d9 100644 --- a/src/ImGui.NET/Generated/ImGuiOnceUponAFrame.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiOnceUponAFrame.gen.cs @@ -18,5 +18,9 @@ namespace ImGuiNET public static implicit operator ImGuiOnceUponAFrame* (ImGuiOnceUponAFramePtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiOnceUponAFramePtr(IntPtr nativePtr) => new ImGuiOnceUponAFramePtr(nativePtr); public ref int RefFrame => ref Unsafe.AsRef(&NativePtr->RefFrame); + public void Destroy() + { + ImGuiNative.ImGuiOnceUponAFrame_destroy(NativePtr); + } } } diff --git a/src/ImGui.NET/Generated/ImGuiPayload.gen.cs b/src/ImGui.NET/Generated/ImGuiPayload.gen.cs index f0a9e31..29937b2 100644 --- a/src/ImGui.NET/Generated/ImGuiPayload.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiPayload.gen.cs @@ -36,6 +36,10 @@ namespace ImGuiNET { ImGuiNative.ImGuiPayload_Clear(NativePtr); } + public void Destroy() + { + ImGuiNative.ImGuiPayload_destroy(NativePtr); + } public bool IsDataType(string type) { byte* native_type; diff --git a/src/ImGui.NET/Generated/ImGuiStyle.gen.cs b/src/ImGui.NET/Generated/ImGuiStyle.gen.cs index 69950d2..905baa7 100644 --- a/src/ImGui.NET/Generated/ImGuiStyle.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiStyle.gen.cs @@ -127,6 +127,10 @@ namespace ImGuiNET public ref bool AntiAliasedFill => ref Unsafe.AsRef(&NativePtr->AntiAliasedFill); public ref float CurveTessellationTol => ref Unsafe.AsRef(&NativePtr->CurveTessellationTol); public RangeAccessor Colors => new RangeAccessor(&NativePtr->Colors_0, 48); + public void Destroy() + { + ImGuiNative.ImGuiStyle_destroy(NativePtr); + } public void ScaleAllSizes(float scale_factor) { ImGuiNative.ImGuiStyle_ScaleAllSizes(NativePtr, scale_factor); diff --git a/src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs b/src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs index 9215d98..637f809 100644 --- a/src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs @@ -58,6 +58,10 @@ namespace ImGuiNET { ImGuiNative.ImGuiTextBuffer_clear(NativePtr); } + public void Destroy() + { + ImGuiNative.ImGuiTextBuffer_destroy(NativePtr); + } public bool empty() { byte ret = ImGuiNative.ImGuiTextBuffer_empty(NativePtr); diff --git a/src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs b/src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs index 8b00332..ac08408 100644 --- a/src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs @@ -30,6 +30,10 @@ namespace ImGuiNET { ImGuiNative.ImGuiTextFilter_Clear(NativePtr); } + public void Destroy() + { + ImGuiNative.ImGuiTextFilter_destroy(NativePtr); + } public bool Draw() { byte* native_label; diff --git a/src/ImGui.NET/Generated/TextRange.gen.cs b/src/ImGui.NET/Generated/TextRange.gen.cs index 7532233..dfa68ee 100644 --- a/src/ImGui.NET/Generated/TextRange.gen.cs +++ b/src/ImGui.NET/Generated/TextRange.gen.cs @@ -25,6 +25,10 @@ namespace ImGuiNET byte* ret = ImGuiNative.TextRange_begin(NativePtr); return Util.StringFromPtr(ret); } + public void Destroy() + { + ImGuiNative.TextRange_destroy(NativePtr); + } public bool empty() { byte ret = ImGuiNative.TextRange_empty(NativePtr);