diff --git a/ImGuiColorTextEdit/cimcte_callbacks.go b/ImGuiColorTextEdit/cimcte_callbacks.go new file mode 100644 index 00000000..dc58fee7 --- /dev/null +++ b/ImGuiColorTextEdit/cimcte_callbacks.go @@ -0,0 +1,11 @@ +// Code generated by cmd/codegen from https://github.com/AllenDang/cimgui-go. +// DO NOT EDIT. + +package ImGuiColorTextEdit + +// #include +// #include +// #include "../imgui/extra_types.h" +// #include "cimcte_wrapper.h" +// #include "cimcte_typedefs.h" +import "C" diff --git a/imgui/cimgui_callbacks.go b/imgui/cimgui_callbacks.go new file mode 100644 index 00000000..98c014b5 --- /dev/null +++ b/imgui/cimgui_callbacks.go @@ -0,0 +1,1538 @@ +// Code generated by cmd/codegen from https://github.com/AllenDang/cimgui-go. +// DO NOT EDIT. + +package imgui + +// #include +// #include +// #include "../imgui/extra_types.h" +// #include "cimgui_wrapper.h" +// #include "cimgui_typedefs.h" +// extern void callbackDrawCallback0(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback1(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback2(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback3(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback4(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback5(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback6(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback7(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback8(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback9(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback10(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback11(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback12(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback13(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback14(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback15(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback16(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback17(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback18(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback19(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback20(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback21(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback22(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback23(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback24(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback25(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback26(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback27(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback28(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback29(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback30(ImDrawList*, ImDrawCmd*); +// extern void callbackDrawCallback31(ImDrawList*, ImDrawCmd*); +// extern void callbackContextHookCallback0(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback1(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback2(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback3(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback4(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback5(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback6(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback7(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback8(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback9(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback10(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback11(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback12(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback13(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback14(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback15(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback16(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback17(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback18(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback19(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback20(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback21(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback22(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback23(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback24(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback25(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback26(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback27(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback28(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback29(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback30(ImGuiContext*, ImGuiContextHook*); +// extern void callbackContextHookCallback31(ImGuiContext*, ImGuiContextHook*); +// extern void callbackErrorCallback0(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback1(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback2(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback3(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback4(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback5(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback6(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback7(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback8(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback9(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback10(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback11(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback12(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback13(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback14(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback15(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback16(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback17(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback18(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback19(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback20(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback21(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback22(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback23(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback24(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback25(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback26(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback27(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback28(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback29(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback30(ImGuiContext*, void*, char*); +// extern void callbackErrorCallback31(ImGuiContext*, void*, char*); +// extern void* callbackMemAllocFunc0(size_t, void*); +// extern void* callbackMemAllocFunc1(size_t, void*); +// extern void* callbackMemAllocFunc2(size_t, void*); +// extern void* callbackMemAllocFunc3(size_t, void*); +// extern void* callbackMemAllocFunc4(size_t, void*); +// extern void* callbackMemAllocFunc5(size_t, void*); +// extern void* callbackMemAllocFunc6(size_t, void*); +// extern void* callbackMemAllocFunc7(size_t, void*); +// extern void* callbackMemAllocFunc8(size_t, void*); +// extern void* callbackMemAllocFunc9(size_t, void*); +// extern void* callbackMemAllocFunc10(size_t, void*); +// extern void* callbackMemAllocFunc11(size_t, void*); +// extern void* callbackMemAllocFunc12(size_t, void*); +// extern void* callbackMemAllocFunc13(size_t, void*); +// extern void* callbackMemAllocFunc14(size_t, void*); +// extern void* callbackMemAllocFunc15(size_t, void*); +// extern void* callbackMemAllocFunc16(size_t, void*); +// extern void* callbackMemAllocFunc17(size_t, void*); +// extern void* callbackMemAllocFunc18(size_t, void*); +// extern void* callbackMemAllocFunc19(size_t, void*); +// extern void* callbackMemAllocFunc20(size_t, void*); +// extern void* callbackMemAllocFunc21(size_t, void*); +// extern void* callbackMemAllocFunc22(size_t, void*); +// extern void* callbackMemAllocFunc23(size_t, void*); +// extern void* callbackMemAllocFunc24(size_t, void*); +// extern void* callbackMemAllocFunc25(size_t, void*); +// extern void* callbackMemAllocFunc26(size_t, void*); +// extern void* callbackMemAllocFunc27(size_t, void*); +// extern void* callbackMemAllocFunc28(size_t, void*); +// extern void* callbackMemAllocFunc29(size_t, void*); +// extern void* callbackMemAllocFunc30(size_t, void*); +// extern void* callbackMemAllocFunc31(size_t, void*); +// extern void callbackMemFreeFunc0(void*, void*); +// extern void callbackMemFreeFunc1(void*, void*); +// extern void callbackMemFreeFunc2(void*, void*); +// extern void callbackMemFreeFunc3(void*, void*); +// extern void callbackMemFreeFunc4(void*, void*); +// extern void callbackMemFreeFunc5(void*, void*); +// extern void callbackMemFreeFunc6(void*, void*); +// extern void callbackMemFreeFunc7(void*, void*); +// extern void callbackMemFreeFunc8(void*, void*); +// extern void callbackMemFreeFunc9(void*, void*); +// extern void callbackMemFreeFunc10(void*, void*); +// extern void callbackMemFreeFunc11(void*, void*); +// extern void callbackMemFreeFunc12(void*, void*); +// extern void callbackMemFreeFunc13(void*, void*); +// extern void callbackMemFreeFunc14(void*, void*); +// extern void callbackMemFreeFunc15(void*, void*); +// extern void callbackMemFreeFunc16(void*, void*); +// extern void callbackMemFreeFunc17(void*, void*); +// extern void callbackMemFreeFunc18(void*, void*); +// extern void callbackMemFreeFunc19(void*, void*); +// extern void callbackMemFreeFunc20(void*, void*); +// extern void callbackMemFreeFunc21(void*, void*); +// extern void callbackMemFreeFunc22(void*, void*); +// extern void callbackMemFreeFunc23(void*, void*); +// extern void callbackMemFreeFunc24(void*, void*); +// extern void callbackMemFreeFunc25(void*, void*); +// extern void callbackMemFreeFunc26(void*, void*); +// extern void callbackMemFreeFunc27(void*, void*); +// extern void callbackMemFreeFunc28(void*, void*); +// extern void callbackMemFreeFunc29(void*, void*); +// extern void callbackMemFreeFunc30(void*, void*); +// extern void callbackMemFreeFunc31(void*, void*); +// extern void callbackSizeCallback0(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback1(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback2(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback3(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback4(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback5(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback6(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback7(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback8(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback9(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback10(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback11(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback12(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback13(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback14(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback15(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback16(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback17(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback18(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback19(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback20(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback21(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback22(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback23(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback24(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback25(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback26(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback27(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback28(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback29(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback30(ImGuiSizeCallbackData*); +// extern void callbackSizeCallback31(ImGuiSizeCallbackData*); +import "C" +import ( + "unsafe" + + "github.com/AllenDang/cimgui-go/internal" +) + +type ( + DrawCallback func(parent_list *DrawList, cmd *DrawCmd) + cDrawCallback func(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) +) + +func NewDrawCallbackFromC(cvalue *C.ImDrawCallback) *DrawCallback { + result := poolDrawCallback.Find(*cvalue) + return &result +} + +func (c DrawCallback) C() (C.ImDrawCallback, func()) { + return poolDrawCallback.Allocate(c), func() {} +} + +func wrapDrawCallback(cb DrawCallback, parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + cb(NewDrawListFromC(parent_list), NewDrawCmdFromC(cmd)) +} + +//export callbackDrawCallback0 +func callbackDrawCallback0(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(0), parent_list, cmd) +} + +//export callbackDrawCallback1 +func callbackDrawCallback1(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(1), parent_list, cmd) +} + +//export callbackDrawCallback2 +func callbackDrawCallback2(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(2), parent_list, cmd) +} + +//export callbackDrawCallback3 +func callbackDrawCallback3(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(3), parent_list, cmd) +} + +//export callbackDrawCallback4 +func callbackDrawCallback4(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(4), parent_list, cmd) +} + +//export callbackDrawCallback5 +func callbackDrawCallback5(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(5), parent_list, cmd) +} + +//export callbackDrawCallback6 +func callbackDrawCallback6(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(6), parent_list, cmd) +} + +//export callbackDrawCallback7 +func callbackDrawCallback7(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(7), parent_list, cmd) +} + +//export callbackDrawCallback8 +func callbackDrawCallback8(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(8), parent_list, cmd) +} + +//export callbackDrawCallback9 +func callbackDrawCallback9(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(9), parent_list, cmd) +} + +//export callbackDrawCallback10 +func callbackDrawCallback10(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(10), parent_list, cmd) +} + +//export callbackDrawCallback11 +func callbackDrawCallback11(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(11), parent_list, cmd) +} + +//export callbackDrawCallback12 +func callbackDrawCallback12(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(12), parent_list, cmd) +} + +//export callbackDrawCallback13 +func callbackDrawCallback13(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(13), parent_list, cmd) +} + +//export callbackDrawCallback14 +func callbackDrawCallback14(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(14), parent_list, cmd) +} + +//export callbackDrawCallback15 +func callbackDrawCallback15(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(15), parent_list, cmd) +} + +//export callbackDrawCallback16 +func callbackDrawCallback16(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(16), parent_list, cmd) +} + +//export callbackDrawCallback17 +func callbackDrawCallback17(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(17), parent_list, cmd) +} + +//export callbackDrawCallback18 +func callbackDrawCallback18(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(18), parent_list, cmd) +} + +//export callbackDrawCallback19 +func callbackDrawCallback19(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(19), parent_list, cmd) +} + +//export callbackDrawCallback20 +func callbackDrawCallback20(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(20), parent_list, cmd) +} + +//export callbackDrawCallback21 +func callbackDrawCallback21(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(21), parent_list, cmd) +} + +//export callbackDrawCallback22 +func callbackDrawCallback22(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(22), parent_list, cmd) +} + +//export callbackDrawCallback23 +func callbackDrawCallback23(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(23), parent_list, cmd) +} + +//export callbackDrawCallback24 +func callbackDrawCallback24(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(24), parent_list, cmd) +} + +//export callbackDrawCallback25 +func callbackDrawCallback25(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(25), parent_list, cmd) +} + +//export callbackDrawCallback26 +func callbackDrawCallback26(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(26), parent_list, cmd) +} + +//export callbackDrawCallback27 +func callbackDrawCallback27(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(27), parent_list, cmd) +} + +//export callbackDrawCallback28 +func callbackDrawCallback28(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(28), parent_list, cmd) +} + +//export callbackDrawCallback29 +func callbackDrawCallback29(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(29), parent_list, cmd) +} + +//export callbackDrawCallback30 +func callbackDrawCallback30(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(30), parent_list, cmd) +} + +//export callbackDrawCallback31 +func callbackDrawCallback31(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { + wrapDrawCallback(poolDrawCallback.Get(31), parent_list, cmd) +} + +var poolDrawCallback *internal.Pool[DrawCallback, C.ImDrawCallback] + +func init() { + poolDrawCallback = internal.NewPool[DrawCallback, C.ImDrawCallback]( + C.ImDrawCallback(C.callbackDrawCallback0), + C.ImDrawCallback(C.callbackDrawCallback1), + C.ImDrawCallback(C.callbackDrawCallback2), + C.ImDrawCallback(C.callbackDrawCallback3), + C.ImDrawCallback(C.callbackDrawCallback4), + C.ImDrawCallback(C.callbackDrawCallback5), + C.ImDrawCallback(C.callbackDrawCallback6), + C.ImDrawCallback(C.callbackDrawCallback7), + C.ImDrawCallback(C.callbackDrawCallback8), + C.ImDrawCallback(C.callbackDrawCallback9), + C.ImDrawCallback(C.callbackDrawCallback10), + C.ImDrawCallback(C.callbackDrawCallback11), + C.ImDrawCallback(C.callbackDrawCallback12), + C.ImDrawCallback(C.callbackDrawCallback13), + C.ImDrawCallback(C.callbackDrawCallback14), + C.ImDrawCallback(C.callbackDrawCallback15), + C.ImDrawCallback(C.callbackDrawCallback16), + C.ImDrawCallback(C.callbackDrawCallback17), + C.ImDrawCallback(C.callbackDrawCallback18), + C.ImDrawCallback(C.callbackDrawCallback19), + C.ImDrawCallback(C.callbackDrawCallback20), + C.ImDrawCallback(C.callbackDrawCallback21), + C.ImDrawCallback(C.callbackDrawCallback22), + C.ImDrawCallback(C.callbackDrawCallback23), + C.ImDrawCallback(C.callbackDrawCallback24), + C.ImDrawCallback(C.callbackDrawCallback25), + C.ImDrawCallback(C.callbackDrawCallback26), + C.ImDrawCallback(C.callbackDrawCallback27), + C.ImDrawCallback(C.callbackDrawCallback28), + C.ImDrawCallback(C.callbackDrawCallback29), + C.ImDrawCallback(C.callbackDrawCallback30), + C.ImDrawCallback(C.callbackDrawCallback31), + ) +} + +func ClearDrawCallbackPool() { + poolDrawCallback.Clear() +} + +type ( + ContextHookCallback func(ctx *Context, hook *ContextHook) + cContextHookCallback func(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) +) + +func NewContextHookCallbackFromC(cvalue *C.ImGuiContextHookCallback) *ContextHookCallback { + result := poolContextHookCallback.Find(*cvalue) + return &result +} + +func (c ContextHookCallback) C() (C.ImGuiContextHookCallback, func()) { + return poolContextHookCallback.Allocate(c), func() {} +} + +func wrapContextHookCallback(cb ContextHookCallback, ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + cb(NewContextFromC(ctx), NewContextHookFromC(hook)) +} + +//export callbackContextHookCallback0 +func callbackContextHookCallback0(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(0), ctx, hook) +} + +//export callbackContextHookCallback1 +func callbackContextHookCallback1(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(1), ctx, hook) +} + +//export callbackContextHookCallback2 +func callbackContextHookCallback2(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(2), ctx, hook) +} + +//export callbackContextHookCallback3 +func callbackContextHookCallback3(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(3), ctx, hook) +} + +//export callbackContextHookCallback4 +func callbackContextHookCallback4(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(4), ctx, hook) +} + +//export callbackContextHookCallback5 +func callbackContextHookCallback5(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(5), ctx, hook) +} + +//export callbackContextHookCallback6 +func callbackContextHookCallback6(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(6), ctx, hook) +} + +//export callbackContextHookCallback7 +func callbackContextHookCallback7(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(7), ctx, hook) +} + +//export callbackContextHookCallback8 +func callbackContextHookCallback8(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(8), ctx, hook) +} + +//export callbackContextHookCallback9 +func callbackContextHookCallback9(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(9), ctx, hook) +} + +//export callbackContextHookCallback10 +func callbackContextHookCallback10(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(10), ctx, hook) +} + +//export callbackContextHookCallback11 +func callbackContextHookCallback11(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(11), ctx, hook) +} + +//export callbackContextHookCallback12 +func callbackContextHookCallback12(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(12), ctx, hook) +} + +//export callbackContextHookCallback13 +func callbackContextHookCallback13(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(13), ctx, hook) +} + +//export callbackContextHookCallback14 +func callbackContextHookCallback14(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(14), ctx, hook) +} + +//export callbackContextHookCallback15 +func callbackContextHookCallback15(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(15), ctx, hook) +} + +//export callbackContextHookCallback16 +func callbackContextHookCallback16(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(16), ctx, hook) +} + +//export callbackContextHookCallback17 +func callbackContextHookCallback17(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(17), ctx, hook) +} + +//export callbackContextHookCallback18 +func callbackContextHookCallback18(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(18), ctx, hook) +} + +//export callbackContextHookCallback19 +func callbackContextHookCallback19(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(19), ctx, hook) +} + +//export callbackContextHookCallback20 +func callbackContextHookCallback20(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(20), ctx, hook) +} + +//export callbackContextHookCallback21 +func callbackContextHookCallback21(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(21), ctx, hook) +} + +//export callbackContextHookCallback22 +func callbackContextHookCallback22(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(22), ctx, hook) +} + +//export callbackContextHookCallback23 +func callbackContextHookCallback23(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(23), ctx, hook) +} + +//export callbackContextHookCallback24 +func callbackContextHookCallback24(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(24), ctx, hook) +} + +//export callbackContextHookCallback25 +func callbackContextHookCallback25(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(25), ctx, hook) +} + +//export callbackContextHookCallback26 +func callbackContextHookCallback26(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(26), ctx, hook) +} + +//export callbackContextHookCallback27 +func callbackContextHookCallback27(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(27), ctx, hook) +} + +//export callbackContextHookCallback28 +func callbackContextHookCallback28(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(28), ctx, hook) +} + +//export callbackContextHookCallback29 +func callbackContextHookCallback29(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(29), ctx, hook) +} + +//export callbackContextHookCallback30 +func callbackContextHookCallback30(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(30), ctx, hook) +} + +//export callbackContextHookCallback31 +func callbackContextHookCallback31(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { + wrapContextHookCallback(poolContextHookCallback.Get(31), ctx, hook) +} + +var poolContextHookCallback *internal.Pool[ContextHookCallback, C.ImGuiContextHookCallback] + +func init() { + poolContextHookCallback = internal.NewPool[ContextHookCallback, C.ImGuiContextHookCallback]( + C.ImGuiContextHookCallback(C.callbackContextHookCallback0), + C.ImGuiContextHookCallback(C.callbackContextHookCallback1), + C.ImGuiContextHookCallback(C.callbackContextHookCallback2), + C.ImGuiContextHookCallback(C.callbackContextHookCallback3), + C.ImGuiContextHookCallback(C.callbackContextHookCallback4), + C.ImGuiContextHookCallback(C.callbackContextHookCallback5), + C.ImGuiContextHookCallback(C.callbackContextHookCallback6), + C.ImGuiContextHookCallback(C.callbackContextHookCallback7), + C.ImGuiContextHookCallback(C.callbackContextHookCallback8), + C.ImGuiContextHookCallback(C.callbackContextHookCallback9), + C.ImGuiContextHookCallback(C.callbackContextHookCallback10), + C.ImGuiContextHookCallback(C.callbackContextHookCallback11), + C.ImGuiContextHookCallback(C.callbackContextHookCallback12), + C.ImGuiContextHookCallback(C.callbackContextHookCallback13), + C.ImGuiContextHookCallback(C.callbackContextHookCallback14), + C.ImGuiContextHookCallback(C.callbackContextHookCallback15), + C.ImGuiContextHookCallback(C.callbackContextHookCallback16), + C.ImGuiContextHookCallback(C.callbackContextHookCallback17), + C.ImGuiContextHookCallback(C.callbackContextHookCallback18), + C.ImGuiContextHookCallback(C.callbackContextHookCallback19), + C.ImGuiContextHookCallback(C.callbackContextHookCallback20), + C.ImGuiContextHookCallback(C.callbackContextHookCallback21), + C.ImGuiContextHookCallback(C.callbackContextHookCallback22), + C.ImGuiContextHookCallback(C.callbackContextHookCallback23), + C.ImGuiContextHookCallback(C.callbackContextHookCallback24), + C.ImGuiContextHookCallback(C.callbackContextHookCallback25), + C.ImGuiContextHookCallback(C.callbackContextHookCallback26), + C.ImGuiContextHookCallback(C.callbackContextHookCallback27), + C.ImGuiContextHookCallback(C.callbackContextHookCallback28), + C.ImGuiContextHookCallback(C.callbackContextHookCallback29), + C.ImGuiContextHookCallback(C.callbackContextHookCallback30), + C.ImGuiContextHookCallback(C.callbackContextHookCallback31), + ) +} + +func ClearContextHookCallbackPool() { + poolContextHookCallback.Clear() +} + +type ( + ErrorCallback func(ctx *Context, user_data unsafe.Pointer, msg string) + cErrorCallback func(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) +) + +func NewErrorCallbackFromC(cvalue *C.ImGuiErrorCallback) *ErrorCallback { + result := poolErrorCallback.Find(*cvalue) + return &result +} + +func (c ErrorCallback) C() (C.ImGuiErrorCallback, func()) { + return poolErrorCallback.Allocate(c), func() {} +} + +func wrapErrorCallback(cb ErrorCallback, ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + cb(NewContextFromC(ctx), unsafe.Pointer(user_data), C.GoString(msg)) +} + +//export callbackErrorCallback0 +func callbackErrorCallback0(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(0), ctx, user_data, msg) +} + +//export callbackErrorCallback1 +func callbackErrorCallback1(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(1), ctx, user_data, msg) +} + +//export callbackErrorCallback2 +func callbackErrorCallback2(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(2), ctx, user_data, msg) +} + +//export callbackErrorCallback3 +func callbackErrorCallback3(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(3), ctx, user_data, msg) +} + +//export callbackErrorCallback4 +func callbackErrorCallback4(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(4), ctx, user_data, msg) +} + +//export callbackErrorCallback5 +func callbackErrorCallback5(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(5), ctx, user_data, msg) +} + +//export callbackErrorCallback6 +func callbackErrorCallback6(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(6), ctx, user_data, msg) +} + +//export callbackErrorCallback7 +func callbackErrorCallback7(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(7), ctx, user_data, msg) +} + +//export callbackErrorCallback8 +func callbackErrorCallback8(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(8), ctx, user_data, msg) +} + +//export callbackErrorCallback9 +func callbackErrorCallback9(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(9), ctx, user_data, msg) +} + +//export callbackErrorCallback10 +func callbackErrorCallback10(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(10), ctx, user_data, msg) +} + +//export callbackErrorCallback11 +func callbackErrorCallback11(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(11), ctx, user_data, msg) +} + +//export callbackErrorCallback12 +func callbackErrorCallback12(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(12), ctx, user_data, msg) +} + +//export callbackErrorCallback13 +func callbackErrorCallback13(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(13), ctx, user_data, msg) +} + +//export callbackErrorCallback14 +func callbackErrorCallback14(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(14), ctx, user_data, msg) +} + +//export callbackErrorCallback15 +func callbackErrorCallback15(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(15), ctx, user_data, msg) +} + +//export callbackErrorCallback16 +func callbackErrorCallback16(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(16), ctx, user_data, msg) +} + +//export callbackErrorCallback17 +func callbackErrorCallback17(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(17), ctx, user_data, msg) +} + +//export callbackErrorCallback18 +func callbackErrorCallback18(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(18), ctx, user_data, msg) +} + +//export callbackErrorCallback19 +func callbackErrorCallback19(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(19), ctx, user_data, msg) +} + +//export callbackErrorCallback20 +func callbackErrorCallback20(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(20), ctx, user_data, msg) +} + +//export callbackErrorCallback21 +func callbackErrorCallback21(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(21), ctx, user_data, msg) +} + +//export callbackErrorCallback22 +func callbackErrorCallback22(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(22), ctx, user_data, msg) +} + +//export callbackErrorCallback23 +func callbackErrorCallback23(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(23), ctx, user_data, msg) +} + +//export callbackErrorCallback24 +func callbackErrorCallback24(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(24), ctx, user_data, msg) +} + +//export callbackErrorCallback25 +func callbackErrorCallback25(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(25), ctx, user_data, msg) +} + +//export callbackErrorCallback26 +func callbackErrorCallback26(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(26), ctx, user_data, msg) +} + +//export callbackErrorCallback27 +func callbackErrorCallback27(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(27), ctx, user_data, msg) +} + +//export callbackErrorCallback28 +func callbackErrorCallback28(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(28), ctx, user_data, msg) +} + +//export callbackErrorCallback29 +func callbackErrorCallback29(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(29), ctx, user_data, msg) +} + +//export callbackErrorCallback30 +func callbackErrorCallback30(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(30), ctx, user_data, msg) +} + +//export callbackErrorCallback31 +func callbackErrorCallback31(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { + wrapErrorCallback(poolErrorCallback.Get(31), ctx, user_data, msg) +} + +var poolErrorCallback *internal.Pool[ErrorCallback, C.ImGuiErrorCallback] + +func init() { + poolErrorCallback = internal.NewPool[ErrorCallback, C.ImGuiErrorCallback]( + C.ImGuiErrorCallback(C.callbackErrorCallback0), + C.ImGuiErrorCallback(C.callbackErrorCallback1), + C.ImGuiErrorCallback(C.callbackErrorCallback2), + C.ImGuiErrorCallback(C.callbackErrorCallback3), + C.ImGuiErrorCallback(C.callbackErrorCallback4), + C.ImGuiErrorCallback(C.callbackErrorCallback5), + C.ImGuiErrorCallback(C.callbackErrorCallback6), + C.ImGuiErrorCallback(C.callbackErrorCallback7), + C.ImGuiErrorCallback(C.callbackErrorCallback8), + C.ImGuiErrorCallback(C.callbackErrorCallback9), + C.ImGuiErrorCallback(C.callbackErrorCallback10), + C.ImGuiErrorCallback(C.callbackErrorCallback11), + C.ImGuiErrorCallback(C.callbackErrorCallback12), + C.ImGuiErrorCallback(C.callbackErrorCallback13), + C.ImGuiErrorCallback(C.callbackErrorCallback14), + C.ImGuiErrorCallback(C.callbackErrorCallback15), + C.ImGuiErrorCallback(C.callbackErrorCallback16), + C.ImGuiErrorCallback(C.callbackErrorCallback17), + C.ImGuiErrorCallback(C.callbackErrorCallback18), + C.ImGuiErrorCallback(C.callbackErrorCallback19), + C.ImGuiErrorCallback(C.callbackErrorCallback20), + C.ImGuiErrorCallback(C.callbackErrorCallback21), + C.ImGuiErrorCallback(C.callbackErrorCallback22), + C.ImGuiErrorCallback(C.callbackErrorCallback23), + C.ImGuiErrorCallback(C.callbackErrorCallback24), + C.ImGuiErrorCallback(C.callbackErrorCallback25), + C.ImGuiErrorCallback(C.callbackErrorCallback26), + C.ImGuiErrorCallback(C.callbackErrorCallback27), + C.ImGuiErrorCallback(C.callbackErrorCallback28), + C.ImGuiErrorCallback(C.callbackErrorCallback29), + C.ImGuiErrorCallback(C.callbackErrorCallback30), + C.ImGuiErrorCallback(C.callbackErrorCallback31), + ) +} + +func ClearErrorCallbackPool() { + poolErrorCallback.Clear() +} + +type ( + MemAllocFunc func(sz uint64, user_data unsafe.Pointer) unsafe.Pointer + cMemAllocFunc func(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer +) + +func NewMemAllocFuncFromC(cvalue *C.ImGuiMemAllocFunc) *MemAllocFunc { + result := poolMemAllocFunc.Find(*cvalue) + return &result +} + +func (c MemAllocFunc) C() (C.ImGuiMemAllocFunc, func()) { + return poolMemAllocFunc.Allocate(c), func() {} +} + +func wrapMemAllocFunc(cb MemAllocFunc, sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + result := cb(uint64(sz), unsafe.Pointer(user_data)) + + defer func() { + }() + return unsafe.Pointer(result) +} + +//export callbackMemAllocFunc0 +func callbackMemAllocFunc0(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(0), sz, user_data) +} + +//export callbackMemAllocFunc1 +func callbackMemAllocFunc1(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(1), sz, user_data) +} + +//export callbackMemAllocFunc2 +func callbackMemAllocFunc2(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(2), sz, user_data) +} + +//export callbackMemAllocFunc3 +func callbackMemAllocFunc3(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(3), sz, user_data) +} + +//export callbackMemAllocFunc4 +func callbackMemAllocFunc4(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(4), sz, user_data) +} + +//export callbackMemAllocFunc5 +func callbackMemAllocFunc5(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(5), sz, user_data) +} + +//export callbackMemAllocFunc6 +func callbackMemAllocFunc6(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(6), sz, user_data) +} + +//export callbackMemAllocFunc7 +func callbackMemAllocFunc7(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(7), sz, user_data) +} + +//export callbackMemAllocFunc8 +func callbackMemAllocFunc8(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(8), sz, user_data) +} + +//export callbackMemAllocFunc9 +func callbackMemAllocFunc9(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(9), sz, user_data) +} + +//export callbackMemAllocFunc10 +func callbackMemAllocFunc10(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(10), sz, user_data) +} + +//export callbackMemAllocFunc11 +func callbackMemAllocFunc11(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(11), sz, user_data) +} + +//export callbackMemAllocFunc12 +func callbackMemAllocFunc12(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(12), sz, user_data) +} + +//export callbackMemAllocFunc13 +func callbackMemAllocFunc13(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(13), sz, user_data) +} + +//export callbackMemAllocFunc14 +func callbackMemAllocFunc14(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(14), sz, user_data) +} + +//export callbackMemAllocFunc15 +func callbackMemAllocFunc15(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(15), sz, user_data) +} + +//export callbackMemAllocFunc16 +func callbackMemAllocFunc16(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(16), sz, user_data) +} + +//export callbackMemAllocFunc17 +func callbackMemAllocFunc17(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(17), sz, user_data) +} + +//export callbackMemAllocFunc18 +func callbackMemAllocFunc18(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(18), sz, user_data) +} + +//export callbackMemAllocFunc19 +func callbackMemAllocFunc19(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(19), sz, user_data) +} + +//export callbackMemAllocFunc20 +func callbackMemAllocFunc20(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(20), sz, user_data) +} + +//export callbackMemAllocFunc21 +func callbackMemAllocFunc21(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(21), sz, user_data) +} + +//export callbackMemAllocFunc22 +func callbackMemAllocFunc22(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(22), sz, user_data) +} + +//export callbackMemAllocFunc23 +func callbackMemAllocFunc23(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(23), sz, user_data) +} + +//export callbackMemAllocFunc24 +func callbackMemAllocFunc24(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(24), sz, user_data) +} + +//export callbackMemAllocFunc25 +func callbackMemAllocFunc25(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(25), sz, user_data) +} + +//export callbackMemAllocFunc26 +func callbackMemAllocFunc26(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(26), sz, user_data) +} + +//export callbackMemAllocFunc27 +func callbackMemAllocFunc27(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(27), sz, user_data) +} + +//export callbackMemAllocFunc28 +func callbackMemAllocFunc28(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(28), sz, user_data) +} + +//export callbackMemAllocFunc29 +func callbackMemAllocFunc29(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(29), sz, user_data) +} + +//export callbackMemAllocFunc30 +func callbackMemAllocFunc30(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(30), sz, user_data) +} + +//export callbackMemAllocFunc31 +func callbackMemAllocFunc31(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { + return wrapMemAllocFunc(poolMemAllocFunc.Get(31), sz, user_data) +} + +var poolMemAllocFunc *internal.Pool[MemAllocFunc, C.ImGuiMemAllocFunc] + +func init() { + poolMemAllocFunc = internal.NewPool[MemAllocFunc, C.ImGuiMemAllocFunc]( + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc0), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc1), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc2), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc3), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc4), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc5), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc6), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc7), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc8), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc9), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc10), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc11), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc12), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc13), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc14), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc15), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc16), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc17), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc18), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc19), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc20), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc21), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc22), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc23), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc24), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc25), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc26), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc27), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc28), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc29), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc30), + C.ImGuiMemAllocFunc(C.callbackMemAllocFunc31), + ) +} + +func ClearMemAllocFuncPool() { + poolMemAllocFunc.Clear() +} + +type ( + MemFreeFunc func(ptr unsafe.Pointer, user_data unsafe.Pointer) + cMemFreeFunc func(ptr unsafe.Pointer, user_data unsafe.Pointer) +) + +func NewMemFreeFuncFromC(cvalue *C.ImGuiMemFreeFunc) *MemFreeFunc { + result := poolMemFreeFunc.Find(*cvalue) + return &result +} + +func (c MemFreeFunc) C() (C.ImGuiMemFreeFunc, func()) { + return poolMemFreeFunc.Allocate(c), func() {} +} + +func wrapMemFreeFunc(cb MemFreeFunc, ptr unsafe.Pointer, user_data unsafe.Pointer) { + cb(unsafe.Pointer(ptr), unsafe.Pointer(user_data)) +} + +//export callbackMemFreeFunc0 +func callbackMemFreeFunc0(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(0), ptr, user_data) +} + +//export callbackMemFreeFunc1 +func callbackMemFreeFunc1(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(1), ptr, user_data) +} + +//export callbackMemFreeFunc2 +func callbackMemFreeFunc2(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(2), ptr, user_data) +} + +//export callbackMemFreeFunc3 +func callbackMemFreeFunc3(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(3), ptr, user_data) +} + +//export callbackMemFreeFunc4 +func callbackMemFreeFunc4(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(4), ptr, user_data) +} + +//export callbackMemFreeFunc5 +func callbackMemFreeFunc5(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(5), ptr, user_data) +} + +//export callbackMemFreeFunc6 +func callbackMemFreeFunc6(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(6), ptr, user_data) +} + +//export callbackMemFreeFunc7 +func callbackMemFreeFunc7(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(7), ptr, user_data) +} + +//export callbackMemFreeFunc8 +func callbackMemFreeFunc8(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(8), ptr, user_data) +} + +//export callbackMemFreeFunc9 +func callbackMemFreeFunc9(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(9), ptr, user_data) +} + +//export callbackMemFreeFunc10 +func callbackMemFreeFunc10(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(10), ptr, user_data) +} + +//export callbackMemFreeFunc11 +func callbackMemFreeFunc11(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(11), ptr, user_data) +} + +//export callbackMemFreeFunc12 +func callbackMemFreeFunc12(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(12), ptr, user_data) +} + +//export callbackMemFreeFunc13 +func callbackMemFreeFunc13(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(13), ptr, user_data) +} + +//export callbackMemFreeFunc14 +func callbackMemFreeFunc14(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(14), ptr, user_data) +} + +//export callbackMemFreeFunc15 +func callbackMemFreeFunc15(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(15), ptr, user_data) +} + +//export callbackMemFreeFunc16 +func callbackMemFreeFunc16(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(16), ptr, user_data) +} + +//export callbackMemFreeFunc17 +func callbackMemFreeFunc17(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(17), ptr, user_data) +} + +//export callbackMemFreeFunc18 +func callbackMemFreeFunc18(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(18), ptr, user_data) +} + +//export callbackMemFreeFunc19 +func callbackMemFreeFunc19(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(19), ptr, user_data) +} + +//export callbackMemFreeFunc20 +func callbackMemFreeFunc20(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(20), ptr, user_data) +} + +//export callbackMemFreeFunc21 +func callbackMemFreeFunc21(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(21), ptr, user_data) +} + +//export callbackMemFreeFunc22 +func callbackMemFreeFunc22(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(22), ptr, user_data) +} + +//export callbackMemFreeFunc23 +func callbackMemFreeFunc23(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(23), ptr, user_data) +} + +//export callbackMemFreeFunc24 +func callbackMemFreeFunc24(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(24), ptr, user_data) +} + +//export callbackMemFreeFunc25 +func callbackMemFreeFunc25(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(25), ptr, user_data) +} + +//export callbackMemFreeFunc26 +func callbackMemFreeFunc26(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(26), ptr, user_data) +} + +//export callbackMemFreeFunc27 +func callbackMemFreeFunc27(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(27), ptr, user_data) +} + +//export callbackMemFreeFunc28 +func callbackMemFreeFunc28(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(28), ptr, user_data) +} + +//export callbackMemFreeFunc29 +func callbackMemFreeFunc29(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(29), ptr, user_data) +} + +//export callbackMemFreeFunc30 +func callbackMemFreeFunc30(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(30), ptr, user_data) +} + +//export callbackMemFreeFunc31 +func callbackMemFreeFunc31(ptr unsafe.Pointer, user_data unsafe.Pointer) { + wrapMemFreeFunc(poolMemFreeFunc.Get(31), ptr, user_data) +} + +var poolMemFreeFunc *internal.Pool[MemFreeFunc, C.ImGuiMemFreeFunc] + +func init() { + poolMemFreeFunc = internal.NewPool[MemFreeFunc, C.ImGuiMemFreeFunc]( + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc0), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc1), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc2), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc3), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc4), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc5), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc6), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc7), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc8), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc9), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc10), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc11), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc12), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc13), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc14), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc15), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc16), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc17), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc18), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc19), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc20), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc21), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc22), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc23), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc24), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc25), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc26), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc27), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc28), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc29), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc30), + C.ImGuiMemFreeFunc(C.callbackMemFreeFunc31), + ) +} + +func ClearMemFreeFuncPool() { + poolMemFreeFunc.Clear() +} + +type ( + SizeCallback func(data *SizeCallbackData) + cSizeCallback func(data *C.ImGuiSizeCallbackData) +) + +func NewSizeCallbackFromC(cvalue *C.ImGuiSizeCallback) *SizeCallback { + result := poolSizeCallback.Find(*cvalue) + return &result +} + +func (c SizeCallback) C() (C.ImGuiSizeCallback, func()) { + return poolSizeCallback.Allocate(c), func() {} +} + +func wrapSizeCallback(cb SizeCallback, data *C.ImGuiSizeCallbackData) { + cb(NewSizeCallbackDataFromC(data)) +} + +//export callbackSizeCallback0 +func callbackSizeCallback0(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(0), data) +} + +//export callbackSizeCallback1 +func callbackSizeCallback1(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(1), data) +} + +//export callbackSizeCallback2 +func callbackSizeCallback2(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(2), data) +} + +//export callbackSizeCallback3 +func callbackSizeCallback3(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(3), data) +} + +//export callbackSizeCallback4 +func callbackSizeCallback4(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(4), data) +} + +//export callbackSizeCallback5 +func callbackSizeCallback5(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(5), data) +} + +//export callbackSizeCallback6 +func callbackSizeCallback6(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(6), data) +} + +//export callbackSizeCallback7 +func callbackSizeCallback7(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(7), data) +} + +//export callbackSizeCallback8 +func callbackSizeCallback8(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(8), data) +} + +//export callbackSizeCallback9 +func callbackSizeCallback9(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(9), data) +} + +//export callbackSizeCallback10 +func callbackSizeCallback10(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(10), data) +} + +//export callbackSizeCallback11 +func callbackSizeCallback11(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(11), data) +} + +//export callbackSizeCallback12 +func callbackSizeCallback12(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(12), data) +} + +//export callbackSizeCallback13 +func callbackSizeCallback13(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(13), data) +} + +//export callbackSizeCallback14 +func callbackSizeCallback14(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(14), data) +} + +//export callbackSizeCallback15 +func callbackSizeCallback15(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(15), data) +} + +//export callbackSizeCallback16 +func callbackSizeCallback16(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(16), data) +} + +//export callbackSizeCallback17 +func callbackSizeCallback17(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(17), data) +} + +//export callbackSizeCallback18 +func callbackSizeCallback18(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(18), data) +} + +//export callbackSizeCallback19 +func callbackSizeCallback19(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(19), data) +} + +//export callbackSizeCallback20 +func callbackSizeCallback20(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(20), data) +} + +//export callbackSizeCallback21 +func callbackSizeCallback21(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(21), data) +} + +//export callbackSizeCallback22 +func callbackSizeCallback22(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(22), data) +} + +//export callbackSizeCallback23 +func callbackSizeCallback23(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(23), data) +} + +//export callbackSizeCallback24 +func callbackSizeCallback24(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(24), data) +} + +//export callbackSizeCallback25 +func callbackSizeCallback25(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(25), data) +} + +//export callbackSizeCallback26 +func callbackSizeCallback26(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(26), data) +} + +//export callbackSizeCallback27 +func callbackSizeCallback27(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(27), data) +} + +//export callbackSizeCallback28 +func callbackSizeCallback28(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(28), data) +} + +//export callbackSizeCallback29 +func callbackSizeCallback29(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(29), data) +} + +//export callbackSizeCallback30 +func callbackSizeCallback30(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(30), data) +} + +//export callbackSizeCallback31 +func callbackSizeCallback31(data *C.ImGuiSizeCallbackData) { + wrapSizeCallback(poolSizeCallback.Get(31), data) +} + +var poolSizeCallback *internal.Pool[SizeCallback, C.ImGuiSizeCallback] + +func init() { + poolSizeCallback = internal.NewPool[SizeCallback, C.ImGuiSizeCallback]( + C.ImGuiSizeCallback(C.callbackSizeCallback0), + C.ImGuiSizeCallback(C.callbackSizeCallback1), + C.ImGuiSizeCallback(C.callbackSizeCallback2), + C.ImGuiSizeCallback(C.callbackSizeCallback3), + C.ImGuiSizeCallback(C.callbackSizeCallback4), + C.ImGuiSizeCallback(C.callbackSizeCallback5), + C.ImGuiSizeCallback(C.callbackSizeCallback6), + C.ImGuiSizeCallback(C.callbackSizeCallback7), + C.ImGuiSizeCallback(C.callbackSizeCallback8), + C.ImGuiSizeCallback(C.callbackSizeCallback9), + C.ImGuiSizeCallback(C.callbackSizeCallback10), + C.ImGuiSizeCallback(C.callbackSizeCallback11), + C.ImGuiSizeCallback(C.callbackSizeCallback12), + C.ImGuiSizeCallback(C.callbackSizeCallback13), + C.ImGuiSizeCallback(C.callbackSizeCallback14), + C.ImGuiSizeCallback(C.callbackSizeCallback15), + C.ImGuiSizeCallback(C.callbackSizeCallback16), + C.ImGuiSizeCallback(C.callbackSizeCallback17), + C.ImGuiSizeCallback(C.callbackSizeCallback18), + C.ImGuiSizeCallback(C.callbackSizeCallback19), + C.ImGuiSizeCallback(C.callbackSizeCallback20), + C.ImGuiSizeCallback(C.callbackSizeCallback21), + C.ImGuiSizeCallback(C.callbackSizeCallback22), + C.ImGuiSizeCallback(C.callbackSizeCallback23), + C.ImGuiSizeCallback(C.callbackSizeCallback24), + C.ImGuiSizeCallback(C.callbackSizeCallback25), + C.ImGuiSizeCallback(C.callbackSizeCallback26), + C.ImGuiSizeCallback(C.callbackSizeCallback27), + C.ImGuiSizeCallback(C.callbackSizeCallback28), + C.ImGuiSizeCallback(C.callbackSizeCallback29), + C.ImGuiSizeCallback(C.callbackSizeCallback30), + C.ImGuiSizeCallback(C.callbackSizeCallback31), + ) +} + +func ClearSizeCallbackPool() { + poolSizeCallback.Clear() +} diff --git a/imgui/cimgui_typedefs.go b/imgui/cimgui_typedefs.go index eb830648..c7b1ff2d 100644 --- a/imgui/cimgui_typedefs.go +++ b/imgui/cimgui_typedefs.go @@ -8,204 +8,8 @@ package imgui // #include "../imgui/extra_types.h" // #include "cimgui_wrapper.h" // #include "cimgui_typedefs.h" -// extern void callbackDrawCallback0(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback1(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback2(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback3(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback4(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback5(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback6(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback7(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback8(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback9(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback10(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback11(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback12(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback13(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback14(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback15(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback16(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback17(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback18(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback19(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback20(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback21(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback22(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback23(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback24(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback25(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback26(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback27(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback28(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback29(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback30(ImDrawList*, ImDrawCmd*); -// extern void callbackDrawCallback31(ImDrawList*, ImDrawCmd*); -// extern void callbackContextHookCallback0(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback1(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback2(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback3(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback4(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback5(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback6(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback7(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback8(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback9(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback10(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback11(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback12(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback13(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback14(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback15(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback16(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback17(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback18(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback19(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback20(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback21(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback22(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback23(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback24(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback25(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback26(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback27(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback28(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback29(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback30(ImGuiContext*, ImGuiContextHook*); -// extern void callbackContextHookCallback31(ImGuiContext*, ImGuiContextHook*); -// extern void callbackErrorCallback0(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback1(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback2(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback3(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback4(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback5(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback6(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback7(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback8(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback9(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback10(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback11(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback12(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback13(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback14(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback15(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback16(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback17(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback18(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback19(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback20(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback21(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback22(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback23(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback24(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback25(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback26(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback27(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback28(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback29(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback30(ImGuiContext*, void*, char*); -// extern void callbackErrorCallback31(ImGuiContext*, void*, char*); -// extern void* callbackMemAllocFunc0(size_t, void*); -// extern void* callbackMemAllocFunc1(size_t, void*); -// extern void* callbackMemAllocFunc2(size_t, void*); -// extern void* callbackMemAllocFunc3(size_t, void*); -// extern void* callbackMemAllocFunc4(size_t, void*); -// extern void* callbackMemAllocFunc5(size_t, void*); -// extern void* callbackMemAllocFunc6(size_t, void*); -// extern void* callbackMemAllocFunc7(size_t, void*); -// extern void* callbackMemAllocFunc8(size_t, void*); -// extern void* callbackMemAllocFunc9(size_t, void*); -// extern void* callbackMemAllocFunc10(size_t, void*); -// extern void* callbackMemAllocFunc11(size_t, void*); -// extern void* callbackMemAllocFunc12(size_t, void*); -// extern void* callbackMemAllocFunc13(size_t, void*); -// extern void* callbackMemAllocFunc14(size_t, void*); -// extern void* callbackMemAllocFunc15(size_t, void*); -// extern void* callbackMemAllocFunc16(size_t, void*); -// extern void* callbackMemAllocFunc17(size_t, void*); -// extern void* callbackMemAllocFunc18(size_t, void*); -// extern void* callbackMemAllocFunc19(size_t, void*); -// extern void* callbackMemAllocFunc20(size_t, void*); -// extern void* callbackMemAllocFunc21(size_t, void*); -// extern void* callbackMemAllocFunc22(size_t, void*); -// extern void* callbackMemAllocFunc23(size_t, void*); -// extern void* callbackMemAllocFunc24(size_t, void*); -// extern void* callbackMemAllocFunc25(size_t, void*); -// extern void* callbackMemAllocFunc26(size_t, void*); -// extern void* callbackMemAllocFunc27(size_t, void*); -// extern void* callbackMemAllocFunc28(size_t, void*); -// extern void* callbackMemAllocFunc29(size_t, void*); -// extern void* callbackMemAllocFunc30(size_t, void*); -// extern void* callbackMemAllocFunc31(size_t, void*); -// extern void callbackMemFreeFunc0(void*, void*); -// extern void callbackMemFreeFunc1(void*, void*); -// extern void callbackMemFreeFunc2(void*, void*); -// extern void callbackMemFreeFunc3(void*, void*); -// extern void callbackMemFreeFunc4(void*, void*); -// extern void callbackMemFreeFunc5(void*, void*); -// extern void callbackMemFreeFunc6(void*, void*); -// extern void callbackMemFreeFunc7(void*, void*); -// extern void callbackMemFreeFunc8(void*, void*); -// extern void callbackMemFreeFunc9(void*, void*); -// extern void callbackMemFreeFunc10(void*, void*); -// extern void callbackMemFreeFunc11(void*, void*); -// extern void callbackMemFreeFunc12(void*, void*); -// extern void callbackMemFreeFunc13(void*, void*); -// extern void callbackMemFreeFunc14(void*, void*); -// extern void callbackMemFreeFunc15(void*, void*); -// extern void callbackMemFreeFunc16(void*, void*); -// extern void callbackMemFreeFunc17(void*, void*); -// extern void callbackMemFreeFunc18(void*, void*); -// extern void callbackMemFreeFunc19(void*, void*); -// extern void callbackMemFreeFunc20(void*, void*); -// extern void callbackMemFreeFunc21(void*, void*); -// extern void callbackMemFreeFunc22(void*, void*); -// extern void callbackMemFreeFunc23(void*, void*); -// extern void callbackMemFreeFunc24(void*, void*); -// extern void callbackMemFreeFunc25(void*, void*); -// extern void callbackMemFreeFunc26(void*, void*); -// extern void callbackMemFreeFunc27(void*, void*); -// extern void callbackMemFreeFunc28(void*, void*); -// extern void callbackMemFreeFunc29(void*, void*); -// extern void callbackMemFreeFunc30(void*, void*); -// extern void callbackMemFreeFunc31(void*, void*); -// extern void callbackSizeCallback0(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback1(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback2(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback3(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback4(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback5(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback6(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback7(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback8(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback9(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback10(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback11(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback12(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback13(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback14(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback15(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback16(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback17(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback18(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback19(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback20(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback21(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback22(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback23(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback24(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback25(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback26(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback27(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback28(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback29(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback30(ImGuiSizeCallbackData*); -// extern void callbackSizeCallback31(ImGuiSizeCallbackData*); import "C" -import ( - "unsafe" - - "github.com/AllenDang/cimgui-go/internal" -) +import "github.com/AllenDang/cimgui-go/internal" type BitArrayPtr struct { Data *uint32 @@ -257,227 +61,6 @@ func NewBitVectorFromC[SRC any](cvalue SRC) *BitVector { return &BitVector{CData: internal.ReinterpretCast[*C.ImBitVector](cvalue)} } -type ( - DrawCallback func(parent_list *DrawList, cmd *DrawCmd) - cDrawCallback func(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) -) - -func NewDrawCallbackFromC(cvalue *C.ImDrawCallback) *DrawCallback { - result := poolDrawCallback.Find(*cvalue) - return &result -} - -func (c DrawCallback) C() (C.ImDrawCallback, func()) { - return poolDrawCallback.Allocate(c), func() {} -} - -func wrapDrawCallback(cb DrawCallback, parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - cb(NewDrawListFromC(parent_list), NewDrawCmdFromC(cmd)) -} - -//export callbackDrawCallback0 -func callbackDrawCallback0(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(0), parent_list, cmd) -} - -//export callbackDrawCallback1 -func callbackDrawCallback1(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(1), parent_list, cmd) -} - -//export callbackDrawCallback2 -func callbackDrawCallback2(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(2), parent_list, cmd) -} - -//export callbackDrawCallback3 -func callbackDrawCallback3(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(3), parent_list, cmd) -} - -//export callbackDrawCallback4 -func callbackDrawCallback4(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(4), parent_list, cmd) -} - -//export callbackDrawCallback5 -func callbackDrawCallback5(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(5), parent_list, cmd) -} - -//export callbackDrawCallback6 -func callbackDrawCallback6(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(6), parent_list, cmd) -} - -//export callbackDrawCallback7 -func callbackDrawCallback7(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(7), parent_list, cmd) -} - -//export callbackDrawCallback8 -func callbackDrawCallback8(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(8), parent_list, cmd) -} - -//export callbackDrawCallback9 -func callbackDrawCallback9(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(9), parent_list, cmd) -} - -//export callbackDrawCallback10 -func callbackDrawCallback10(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(10), parent_list, cmd) -} - -//export callbackDrawCallback11 -func callbackDrawCallback11(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(11), parent_list, cmd) -} - -//export callbackDrawCallback12 -func callbackDrawCallback12(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(12), parent_list, cmd) -} - -//export callbackDrawCallback13 -func callbackDrawCallback13(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(13), parent_list, cmd) -} - -//export callbackDrawCallback14 -func callbackDrawCallback14(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(14), parent_list, cmd) -} - -//export callbackDrawCallback15 -func callbackDrawCallback15(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(15), parent_list, cmd) -} - -//export callbackDrawCallback16 -func callbackDrawCallback16(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(16), parent_list, cmd) -} - -//export callbackDrawCallback17 -func callbackDrawCallback17(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(17), parent_list, cmd) -} - -//export callbackDrawCallback18 -func callbackDrawCallback18(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(18), parent_list, cmd) -} - -//export callbackDrawCallback19 -func callbackDrawCallback19(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(19), parent_list, cmd) -} - -//export callbackDrawCallback20 -func callbackDrawCallback20(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(20), parent_list, cmd) -} - -//export callbackDrawCallback21 -func callbackDrawCallback21(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(21), parent_list, cmd) -} - -//export callbackDrawCallback22 -func callbackDrawCallback22(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(22), parent_list, cmd) -} - -//export callbackDrawCallback23 -func callbackDrawCallback23(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(23), parent_list, cmd) -} - -//export callbackDrawCallback24 -func callbackDrawCallback24(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(24), parent_list, cmd) -} - -//export callbackDrawCallback25 -func callbackDrawCallback25(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(25), parent_list, cmd) -} - -//export callbackDrawCallback26 -func callbackDrawCallback26(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(26), parent_list, cmd) -} - -//export callbackDrawCallback27 -func callbackDrawCallback27(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(27), parent_list, cmd) -} - -//export callbackDrawCallback28 -func callbackDrawCallback28(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(28), parent_list, cmd) -} - -//export callbackDrawCallback29 -func callbackDrawCallback29(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(29), parent_list, cmd) -} - -//export callbackDrawCallback30 -func callbackDrawCallback30(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(30), parent_list, cmd) -} - -//export callbackDrawCallback31 -func callbackDrawCallback31(parent_list *C.ImDrawList, cmd *C.ImDrawCmd) { - wrapDrawCallback(poolDrawCallback.Get(31), parent_list, cmd) -} - -var poolDrawCallback *internal.Pool[DrawCallback, C.ImDrawCallback] - -func init() { - poolDrawCallback = internal.NewPool[DrawCallback, C.ImDrawCallback]( - C.ImDrawCallback(C.callbackDrawCallback0), - C.ImDrawCallback(C.callbackDrawCallback1), - C.ImDrawCallback(C.callbackDrawCallback2), - C.ImDrawCallback(C.callbackDrawCallback3), - C.ImDrawCallback(C.callbackDrawCallback4), - C.ImDrawCallback(C.callbackDrawCallback5), - C.ImDrawCallback(C.callbackDrawCallback6), - C.ImDrawCallback(C.callbackDrawCallback7), - C.ImDrawCallback(C.callbackDrawCallback8), - C.ImDrawCallback(C.callbackDrawCallback9), - C.ImDrawCallback(C.callbackDrawCallback10), - C.ImDrawCallback(C.callbackDrawCallback11), - C.ImDrawCallback(C.callbackDrawCallback12), - C.ImDrawCallback(C.callbackDrawCallback13), - C.ImDrawCallback(C.callbackDrawCallback14), - C.ImDrawCallback(C.callbackDrawCallback15), - C.ImDrawCallback(C.callbackDrawCallback16), - C.ImDrawCallback(C.callbackDrawCallback17), - C.ImDrawCallback(C.callbackDrawCallback18), - C.ImDrawCallback(C.callbackDrawCallback19), - C.ImDrawCallback(C.callbackDrawCallback20), - C.ImDrawCallback(C.callbackDrawCallback21), - C.ImDrawCallback(C.callbackDrawCallback22), - C.ImDrawCallback(C.callbackDrawCallback23), - C.ImDrawCallback(C.callbackDrawCallback24), - C.ImDrawCallback(C.callbackDrawCallback25), - C.ImDrawCallback(C.callbackDrawCallback26), - C.ImDrawCallback(C.callbackDrawCallback27), - C.ImDrawCallback(C.callbackDrawCallback28), - C.ImDrawCallback(C.callbackDrawCallback29), - C.ImDrawCallback(C.callbackDrawCallback30), - C.ImDrawCallback(C.callbackDrawCallback31), - ) -} - -func ClearDrawCallbackPool() { - poolDrawCallback.Clear() -} - type DrawChannel struct { CData *C.ImDrawChannel } @@ -1044,227 +627,6 @@ func NewContextHookFromC[SRC any](cvalue SRC) *ContextHook { return &ContextHook{CData: internal.ReinterpretCast[*C.ImGuiContextHook](cvalue)} } -type ( - ContextHookCallback func(ctx *Context, hook *ContextHook) - cContextHookCallback func(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) -) - -func NewContextHookCallbackFromC(cvalue *C.ImGuiContextHookCallback) *ContextHookCallback { - result := poolContextHookCallback.Find(*cvalue) - return &result -} - -func (c ContextHookCallback) C() (C.ImGuiContextHookCallback, func()) { - return poolContextHookCallback.Allocate(c), func() {} -} - -func wrapContextHookCallback(cb ContextHookCallback, ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - cb(NewContextFromC(ctx), NewContextHookFromC(hook)) -} - -//export callbackContextHookCallback0 -func callbackContextHookCallback0(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(0), ctx, hook) -} - -//export callbackContextHookCallback1 -func callbackContextHookCallback1(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(1), ctx, hook) -} - -//export callbackContextHookCallback2 -func callbackContextHookCallback2(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(2), ctx, hook) -} - -//export callbackContextHookCallback3 -func callbackContextHookCallback3(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(3), ctx, hook) -} - -//export callbackContextHookCallback4 -func callbackContextHookCallback4(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(4), ctx, hook) -} - -//export callbackContextHookCallback5 -func callbackContextHookCallback5(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(5), ctx, hook) -} - -//export callbackContextHookCallback6 -func callbackContextHookCallback6(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(6), ctx, hook) -} - -//export callbackContextHookCallback7 -func callbackContextHookCallback7(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(7), ctx, hook) -} - -//export callbackContextHookCallback8 -func callbackContextHookCallback8(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(8), ctx, hook) -} - -//export callbackContextHookCallback9 -func callbackContextHookCallback9(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(9), ctx, hook) -} - -//export callbackContextHookCallback10 -func callbackContextHookCallback10(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(10), ctx, hook) -} - -//export callbackContextHookCallback11 -func callbackContextHookCallback11(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(11), ctx, hook) -} - -//export callbackContextHookCallback12 -func callbackContextHookCallback12(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(12), ctx, hook) -} - -//export callbackContextHookCallback13 -func callbackContextHookCallback13(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(13), ctx, hook) -} - -//export callbackContextHookCallback14 -func callbackContextHookCallback14(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(14), ctx, hook) -} - -//export callbackContextHookCallback15 -func callbackContextHookCallback15(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(15), ctx, hook) -} - -//export callbackContextHookCallback16 -func callbackContextHookCallback16(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(16), ctx, hook) -} - -//export callbackContextHookCallback17 -func callbackContextHookCallback17(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(17), ctx, hook) -} - -//export callbackContextHookCallback18 -func callbackContextHookCallback18(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(18), ctx, hook) -} - -//export callbackContextHookCallback19 -func callbackContextHookCallback19(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(19), ctx, hook) -} - -//export callbackContextHookCallback20 -func callbackContextHookCallback20(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(20), ctx, hook) -} - -//export callbackContextHookCallback21 -func callbackContextHookCallback21(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(21), ctx, hook) -} - -//export callbackContextHookCallback22 -func callbackContextHookCallback22(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(22), ctx, hook) -} - -//export callbackContextHookCallback23 -func callbackContextHookCallback23(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(23), ctx, hook) -} - -//export callbackContextHookCallback24 -func callbackContextHookCallback24(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(24), ctx, hook) -} - -//export callbackContextHookCallback25 -func callbackContextHookCallback25(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(25), ctx, hook) -} - -//export callbackContextHookCallback26 -func callbackContextHookCallback26(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(26), ctx, hook) -} - -//export callbackContextHookCallback27 -func callbackContextHookCallback27(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(27), ctx, hook) -} - -//export callbackContextHookCallback28 -func callbackContextHookCallback28(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(28), ctx, hook) -} - -//export callbackContextHookCallback29 -func callbackContextHookCallback29(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(29), ctx, hook) -} - -//export callbackContextHookCallback30 -func callbackContextHookCallback30(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(30), ctx, hook) -} - -//export callbackContextHookCallback31 -func callbackContextHookCallback31(ctx *C.ImGuiContext, hook *C.ImGuiContextHook) { - wrapContextHookCallback(poolContextHookCallback.Get(31), ctx, hook) -} - -var poolContextHookCallback *internal.Pool[ContextHookCallback, C.ImGuiContextHookCallback] - -func init() { - poolContextHookCallback = internal.NewPool[ContextHookCallback, C.ImGuiContextHookCallback]( - C.ImGuiContextHookCallback(C.callbackContextHookCallback0), - C.ImGuiContextHookCallback(C.callbackContextHookCallback1), - C.ImGuiContextHookCallback(C.callbackContextHookCallback2), - C.ImGuiContextHookCallback(C.callbackContextHookCallback3), - C.ImGuiContextHookCallback(C.callbackContextHookCallback4), - C.ImGuiContextHookCallback(C.callbackContextHookCallback5), - C.ImGuiContextHookCallback(C.callbackContextHookCallback6), - C.ImGuiContextHookCallback(C.callbackContextHookCallback7), - C.ImGuiContextHookCallback(C.callbackContextHookCallback8), - C.ImGuiContextHookCallback(C.callbackContextHookCallback9), - C.ImGuiContextHookCallback(C.callbackContextHookCallback10), - C.ImGuiContextHookCallback(C.callbackContextHookCallback11), - C.ImGuiContextHookCallback(C.callbackContextHookCallback12), - C.ImGuiContextHookCallback(C.callbackContextHookCallback13), - C.ImGuiContextHookCallback(C.callbackContextHookCallback14), - C.ImGuiContextHookCallback(C.callbackContextHookCallback15), - C.ImGuiContextHookCallback(C.callbackContextHookCallback16), - C.ImGuiContextHookCallback(C.callbackContextHookCallback17), - C.ImGuiContextHookCallback(C.callbackContextHookCallback18), - C.ImGuiContextHookCallback(C.callbackContextHookCallback19), - C.ImGuiContextHookCallback(C.callbackContextHookCallback20), - C.ImGuiContextHookCallback(C.callbackContextHookCallback21), - C.ImGuiContextHookCallback(C.callbackContextHookCallback22), - C.ImGuiContextHookCallback(C.callbackContextHookCallback23), - C.ImGuiContextHookCallback(C.callbackContextHookCallback24), - C.ImGuiContextHookCallback(C.callbackContextHookCallback25), - C.ImGuiContextHookCallback(C.callbackContextHookCallback26), - C.ImGuiContextHookCallback(C.callbackContextHookCallback27), - C.ImGuiContextHookCallback(C.callbackContextHookCallback28), - C.ImGuiContextHookCallback(C.callbackContextHookCallback29), - C.ImGuiContextHookCallback(C.callbackContextHookCallback30), - C.ImGuiContextHookCallback(C.callbackContextHookCallback31), - ) -} - -func ClearContextHookCallbackPool() { - poolContextHookCallback.Clear() -} - type DataTypeInfo struct { CData *C.ImGuiDataTypeInfo } @@ -1477,227 +839,6 @@ func NewDockRequestFromC[SRC any](cvalue SRC) *DockRequest { return &DockRequest{CData: internal.ReinterpretCast[*C.ImGuiDockRequest](cvalue)} } -type ( - ErrorCallback func(ctx *Context, user_data unsafe.Pointer, msg string) - cErrorCallback func(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) -) - -func NewErrorCallbackFromC(cvalue *C.ImGuiErrorCallback) *ErrorCallback { - result := poolErrorCallback.Find(*cvalue) - return &result -} - -func (c ErrorCallback) C() (C.ImGuiErrorCallback, func()) { - return poolErrorCallback.Allocate(c), func() {} -} - -func wrapErrorCallback(cb ErrorCallback, ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - cb(NewContextFromC(ctx), unsafe.Pointer(user_data), C.GoString(msg)) -} - -//export callbackErrorCallback0 -func callbackErrorCallback0(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(0), ctx, user_data, msg) -} - -//export callbackErrorCallback1 -func callbackErrorCallback1(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(1), ctx, user_data, msg) -} - -//export callbackErrorCallback2 -func callbackErrorCallback2(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(2), ctx, user_data, msg) -} - -//export callbackErrorCallback3 -func callbackErrorCallback3(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(3), ctx, user_data, msg) -} - -//export callbackErrorCallback4 -func callbackErrorCallback4(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(4), ctx, user_data, msg) -} - -//export callbackErrorCallback5 -func callbackErrorCallback5(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(5), ctx, user_data, msg) -} - -//export callbackErrorCallback6 -func callbackErrorCallback6(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(6), ctx, user_data, msg) -} - -//export callbackErrorCallback7 -func callbackErrorCallback7(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(7), ctx, user_data, msg) -} - -//export callbackErrorCallback8 -func callbackErrorCallback8(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(8), ctx, user_data, msg) -} - -//export callbackErrorCallback9 -func callbackErrorCallback9(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(9), ctx, user_data, msg) -} - -//export callbackErrorCallback10 -func callbackErrorCallback10(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(10), ctx, user_data, msg) -} - -//export callbackErrorCallback11 -func callbackErrorCallback11(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(11), ctx, user_data, msg) -} - -//export callbackErrorCallback12 -func callbackErrorCallback12(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(12), ctx, user_data, msg) -} - -//export callbackErrorCallback13 -func callbackErrorCallback13(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(13), ctx, user_data, msg) -} - -//export callbackErrorCallback14 -func callbackErrorCallback14(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(14), ctx, user_data, msg) -} - -//export callbackErrorCallback15 -func callbackErrorCallback15(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(15), ctx, user_data, msg) -} - -//export callbackErrorCallback16 -func callbackErrorCallback16(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(16), ctx, user_data, msg) -} - -//export callbackErrorCallback17 -func callbackErrorCallback17(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(17), ctx, user_data, msg) -} - -//export callbackErrorCallback18 -func callbackErrorCallback18(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(18), ctx, user_data, msg) -} - -//export callbackErrorCallback19 -func callbackErrorCallback19(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(19), ctx, user_data, msg) -} - -//export callbackErrorCallback20 -func callbackErrorCallback20(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(20), ctx, user_data, msg) -} - -//export callbackErrorCallback21 -func callbackErrorCallback21(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(21), ctx, user_data, msg) -} - -//export callbackErrorCallback22 -func callbackErrorCallback22(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(22), ctx, user_data, msg) -} - -//export callbackErrorCallback23 -func callbackErrorCallback23(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(23), ctx, user_data, msg) -} - -//export callbackErrorCallback24 -func callbackErrorCallback24(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(24), ctx, user_data, msg) -} - -//export callbackErrorCallback25 -func callbackErrorCallback25(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(25), ctx, user_data, msg) -} - -//export callbackErrorCallback26 -func callbackErrorCallback26(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(26), ctx, user_data, msg) -} - -//export callbackErrorCallback27 -func callbackErrorCallback27(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(27), ctx, user_data, msg) -} - -//export callbackErrorCallback28 -func callbackErrorCallback28(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(28), ctx, user_data, msg) -} - -//export callbackErrorCallback29 -func callbackErrorCallback29(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(29), ctx, user_data, msg) -} - -//export callbackErrorCallback30 -func callbackErrorCallback30(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(30), ctx, user_data, msg) -} - -//export callbackErrorCallback31 -func callbackErrorCallback31(ctx *C.ImGuiContext, user_data unsafe.Pointer, msg *C.char) { - wrapErrorCallback(poolErrorCallback.Get(31), ctx, user_data, msg) -} - -var poolErrorCallback *internal.Pool[ErrorCallback, C.ImGuiErrorCallback] - -func init() { - poolErrorCallback = internal.NewPool[ErrorCallback, C.ImGuiErrorCallback]( - C.ImGuiErrorCallback(C.callbackErrorCallback0), - C.ImGuiErrorCallback(C.callbackErrorCallback1), - C.ImGuiErrorCallback(C.callbackErrorCallback2), - C.ImGuiErrorCallback(C.callbackErrorCallback3), - C.ImGuiErrorCallback(C.callbackErrorCallback4), - C.ImGuiErrorCallback(C.callbackErrorCallback5), - C.ImGuiErrorCallback(C.callbackErrorCallback6), - C.ImGuiErrorCallback(C.callbackErrorCallback7), - C.ImGuiErrorCallback(C.callbackErrorCallback8), - C.ImGuiErrorCallback(C.callbackErrorCallback9), - C.ImGuiErrorCallback(C.callbackErrorCallback10), - C.ImGuiErrorCallback(C.callbackErrorCallback11), - C.ImGuiErrorCallback(C.callbackErrorCallback12), - C.ImGuiErrorCallback(C.callbackErrorCallback13), - C.ImGuiErrorCallback(C.callbackErrorCallback14), - C.ImGuiErrorCallback(C.callbackErrorCallback15), - C.ImGuiErrorCallback(C.callbackErrorCallback16), - C.ImGuiErrorCallback(C.callbackErrorCallback17), - C.ImGuiErrorCallback(C.callbackErrorCallback18), - C.ImGuiErrorCallback(C.callbackErrorCallback19), - C.ImGuiErrorCallback(C.callbackErrorCallback20), - C.ImGuiErrorCallback(C.callbackErrorCallback21), - C.ImGuiErrorCallback(C.callbackErrorCallback22), - C.ImGuiErrorCallback(C.callbackErrorCallback23), - C.ImGuiErrorCallback(C.callbackErrorCallback24), - C.ImGuiErrorCallback(C.callbackErrorCallback25), - C.ImGuiErrorCallback(C.callbackErrorCallback26), - C.ImGuiErrorCallback(C.callbackErrorCallback27), - C.ImGuiErrorCallback(C.callbackErrorCallback28), - C.ImGuiErrorCallback(C.callbackErrorCallback29), - C.ImGuiErrorCallback(C.callbackErrorCallback30), - C.ImGuiErrorCallback(C.callbackErrorCallback31), - ) -} - -func ClearErrorCallbackPool() { - poolErrorCallback.Clear() -} - type ErrorRecoveryState struct { CData *C.ImGuiErrorRecoveryState } @@ -2423,452 +1564,6 @@ func NewLocEntryFromC[SRC any](cvalue SRC) *LocEntry { return &LocEntry{CData: internal.ReinterpretCast[*C.ImGuiLocEntry](cvalue)} } -type ( - MemAllocFunc func(sz uint64, user_data unsafe.Pointer) unsafe.Pointer - cMemAllocFunc func(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer -) - -func NewMemAllocFuncFromC(cvalue *C.ImGuiMemAllocFunc) *MemAllocFunc { - result := poolMemAllocFunc.Find(*cvalue) - return &result -} - -func (c MemAllocFunc) C() (C.ImGuiMemAllocFunc, func()) { - return poolMemAllocFunc.Allocate(c), func() {} -} - -func wrapMemAllocFunc(cb MemAllocFunc, sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - result := cb(uint64(sz), unsafe.Pointer(user_data)) - - defer func() { - }() - return unsafe.Pointer(result) -} - -//export callbackMemAllocFunc0 -func callbackMemAllocFunc0(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(0), sz, user_data) -} - -//export callbackMemAllocFunc1 -func callbackMemAllocFunc1(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(1), sz, user_data) -} - -//export callbackMemAllocFunc2 -func callbackMemAllocFunc2(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(2), sz, user_data) -} - -//export callbackMemAllocFunc3 -func callbackMemAllocFunc3(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(3), sz, user_data) -} - -//export callbackMemAllocFunc4 -func callbackMemAllocFunc4(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(4), sz, user_data) -} - -//export callbackMemAllocFunc5 -func callbackMemAllocFunc5(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(5), sz, user_data) -} - -//export callbackMemAllocFunc6 -func callbackMemAllocFunc6(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(6), sz, user_data) -} - -//export callbackMemAllocFunc7 -func callbackMemAllocFunc7(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(7), sz, user_data) -} - -//export callbackMemAllocFunc8 -func callbackMemAllocFunc8(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(8), sz, user_data) -} - -//export callbackMemAllocFunc9 -func callbackMemAllocFunc9(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(9), sz, user_data) -} - -//export callbackMemAllocFunc10 -func callbackMemAllocFunc10(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(10), sz, user_data) -} - -//export callbackMemAllocFunc11 -func callbackMemAllocFunc11(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(11), sz, user_data) -} - -//export callbackMemAllocFunc12 -func callbackMemAllocFunc12(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(12), sz, user_data) -} - -//export callbackMemAllocFunc13 -func callbackMemAllocFunc13(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(13), sz, user_data) -} - -//export callbackMemAllocFunc14 -func callbackMemAllocFunc14(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(14), sz, user_data) -} - -//export callbackMemAllocFunc15 -func callbackMemAllocFunc15(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(15), sz, user_data) -} - -//export callbackMemAllocFunc16 -func callbackMemAllocFunc16(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(16), sz, user_data) -} - -//export callbackMemAllocFunc17 -func callbackMemAllocFunc17(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(17), sz, user_data) -} - -//export callbackMemAllocFunc18 -func callbackMemAllocFunc18(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(18), sz, user_data) -} - -//export callbackMemAllocFunc19 -func callbackMemAllocFunc19(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(19), sz, user_data) -} - -//export callbackMemAllocFunc20 -func callbackMemAllocFunc20(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(20), sz, user_data) -} - -//export callbackMemAllocFunc21 -func callbackMemAllocFunc21(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(21), sz, user_data) -} - -//export callbackMemAllocFunc22 -func callbackMemAllocFunc22(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(22), sz, user_data) -} - -//export callbackMemAllocFunc23 -func callbackMemAllocFunc23(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(23), sz, user_data) -} - -//export callbackMemAllocFunc24 -func callbackMemAllocFunc24(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(24), sz, user_data) -} - -//export callbackMemAllocFunc25 -func callbackMemAllocFunc25(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(25), sz, user_data) -} - -//export callbackMemAllocFunc26 -func callbackMemAllocFunc26(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(26), sz, user_data) -} - -//export callbackMemAllocFunc27 -func callbackMemAllocFunc27(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(27), sz, user_data) -} - -//export callbackMemAllocFunc28 -func callbackMemAllocFunc28(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(28), sz, user_data) -} - -//export callbackMemAllocFunc29 -func callbackMemAllocFunc29(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(29), sz, user_data) -} - -//export callbackMemAllocFunc30 -func callbackMemAllocFunc30(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(30), sz, user_data) -} - -//export callbackMemAllocFunc31 -func callbackMemAllocFunc31(sz C.size_t, user_data unsafe.Pointer) unsafe.Pointer { - return wrapMemAllocFunc(poolMemAllocFunc.Get(31), sz, user_data) -} - -var poolMemAllocFunc *internal.Pool[MemAllocFunc, C.ImGuiMemAllocFunc] - -func init() { - poolMemAllocFunc = internal.NewPool[MemAllocFunc, C.ImGuiMemAllocFunc]( - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc0), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc1), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc2), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc3), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc4), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc5), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc6), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc7), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc8), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc9), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc10), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc11), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc12), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc13), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc14), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc15), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc16), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc17), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc18), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc19), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc20), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc21), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc22), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc23), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc24), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc25), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc26), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc27), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc28), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc29), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc30), - C.ImGuiMemAllocFunc(C.callbackMemAllocFunc31), - ) -} - -func ClearMemAllocFuncPool() { - poolMemAllocFunc.Clear() -} - -type ( - MemFreeFunc func(ptr unsafe.Pointer, user_data unsafe.Pointer) - cMemFreeFunc func(ptr unsafe.Pointer, user_data unsafe.Pointer) -) - -func NewMemFreeFuncFromC(cvalue *C.ImGuiMemFreeFunc) *MemFreeFunc { - result := poolMemFreeFunc.Find(*cvalue) - return &result -} - -func (c MemFreeFunc) C() (C.ImGuiMemFreeFunc, func()) { - return poolMemFreeFunc.Allocate(c), func() {} -} - -func wrapMemFreeFunc(cb MemFreeFunc, ptr unsafe.Pointer, user_data unsafe.Pointer) { - cb(unsafe.Pointer(ptr), unsafe.Pointer(user_data)) -} - -//export callbackMemFreeFunc0 -func callbackMemFreeFunc0(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(0), ptr, user_data) -} - -//export callbackMemFreeFunc1 -func callbackMemFreeFunc1(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(1), ptr, user_data) -} - -//export callbackMemFreeFunc2 -func callbackMemFreeFunc2(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(2), ptr, user_data) -} - -//export callbackMemFreeFunc3 -func callbackMemFreeFunc3(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(3), ptr, user_data) -} - -//export callbackMemFreeFunc4 -func callbackMemFreeFunc4(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(4), ptr, user_data) -} - -//export callbackMemFreeFunc5 -func callbackMemFreeFunc5(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(5), ptr, user_data) -} - -//export callbackMemFreeFunc6 -func callbackMemFreeFunc6(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(6), ptr, user_data) -} - -//export callbackMemFreeFunc7 -func callbackMemFreeFunc7(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(7), ptr, user_data) -} - -//export callbackMemFreeFunc8 -func callbackMemFreeFunc8(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(8), ptr, user_data) -} - -//export callbackMemFreeFunc9 -func callbackMemFreeFunc9(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(9), ptr, user_data) -} - -//export callbackMemFreeFunc10 -func callbackMemFreeFunc10(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(10), ptr, user_data) -} - -//export callbackMemFreeFunc11 -func callbackMemFreeFunc11(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(11), ptr, user_data) -} - -//export callbackMemFreeFunc12 -func callbackMemFreeFunc12(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(12), ptr, user_data) -} - -//export callbackMemFreeFunc13 -func callbackMemFreeFunc13(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(13), ptr, user_data) -} - -//export callbackMemFreeFunc14 -func callbackMemFreeFunc14(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(14), ptr, user_data) -} - -//export callbackMemFreeFunc15 -func callbackMemFreeFunc15(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(15), ptr, user_data) -} - -//export callbackMemFreeFunc16 -func callbackMemFreeFunc16(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(16), ptr, user_data) -} - -//export callbackMemFreeFunc17 -func callbackMemFreeFunc17(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(17), ptr, user_data) -} - -//export callbackMemFreeFunc18 -func callbackMemFreeFunc18(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(18), ptr, user_data) -} - -//export callbackMemFreeFunc19 -func callbackMemFreeFunc19(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(19), ptr, user_data) -} - -//export callbackMemFreeFunc20 -func callbackMemFreeFunc20(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(20), ptr, user_data) -} - -//export callbackMemFreeFunc21 -func callbackMemFreeFunc21(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(21), ptr, user_data) -} - -//export callbackMemFreeFunc22 -func callbackMemFreeFunc22(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(22), ptr, user_data) -} - -//export callbackMemFreeFunc23 -func callbackMemFreeFunc23(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(23), ptr, user_data) -} - -//export callbackMemFreeFunc24 -func callbackMemFreeFunc24(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(24), ptr, user_data) -} - -//export callbackMemFreeFunc25 -func callbackMemFreeFunc25(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(25), ptr, user_data) -} - -//export callbackMemFreeFunc26 -func callbackMemFreeFunc26(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(26), ptr, user_data) -} - -//export callbackMemFreeFunc27 -func callbackMemFreeFunc27(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(27), ptr, user_data) -} - -//export callbackMemFreeFunc28 -func callbackMemFreeFunc28(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(28), ptr, user_data) -} - -//export callbackMemFreeFunc29 -func callbackMemFreeFunc29(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(29), ptr, user_data) -} - -//export callbackMemFreeFunc30 -func callbackMemFreeFunc30(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(30), ptr, user_data) -} - -//export callbackMemFreeFunc31 -func callbackMemFreeFunc31(ptr unsafe.Pointer, user_data unsafe.Pointer) { - wrapMemFreeFunc(poolMemFreeFunc.Get(31), ptr, user_data) -} - -var poolMemFreeFunc *internal.Pool[MemFreeFunc, C.ImGuiMemFreeFunc] - -func init() { - poolMemFreeFunc = internal.NewPool[MemFreeFunc, C.ImGuiMemFreeFunc]( - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc0), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc1), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc2), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc3), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc4), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc5), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc6), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc7), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc8), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc9), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc10), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc11), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc12), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc13), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc14), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc15), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc16), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc17), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc18), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc19), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc20), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc21), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc22), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc23), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc24), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc25), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc26), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc27), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc28), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc29), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc30), - C.ImGuiMemFreeFunc(C.callbackMemFreeFunc31), - ) -} - -func ClearMemFreeFuncPool() { - poolMemFreeFunc.Clear() -} - type MenuColumns struct { CData *C.ImGuiMenuColumns } @@ -3461,227 +2156,6 @@ func NewShrinkWidthItemFromC[SRC any](cvalue SRC) *ShrinkWidthItem { return &ShrinkWidthItem{CData: internal.ReinterpretCast[*C.ImGuiShrinkWidthItem](cvalue)} } -type ( - SizeCallback func(data *SizeCallbackData) - cSizeCallback func(data *C.ImGuiSizeCallbackData) -) - -func NewSizeCallbackFromC(cvalue *C.ImGuiSizeCallback) *SizeCallback { - result := poolSizeCallback.Find(*cvalue) - return &result -} - -func (c SizeCallback) C() (C.ImGuiSizeCallback, func()) { - return poolSizeCallback.Allocate(c), func() {} -} - -func wrapSizeCallback(cb SizeCallback, data *C.ImGuiSizeCallbackData) { - cb(NewSizeCallbackDataFromC(data)) -} - -//export callbackSizeCallback0 -func callbackSizeCallback0(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(0), data) -} - -//export callbackSizeCallback1 -func callbackSizeCallback1(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(1), data) -} - -//export callbackSizeCallback2 -func callbackSizeCallback2(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(2), data) -} - -//export callbackSizeCallback3 -func callbackSizeCallback3(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(3), data) -} - -//export callbackSizeCallback4 -func callbackSizeCallback4(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(4), data) -} - -//export callbackSizeCallback5 -func callbackSizeCallback5(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(5), data) -} - -//export callbackSizeCallback6 -func callbackSizeCallback6(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(6), data) -} - -//export callbackSizeCallback7 -func callbackSizeCallback7(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(7), data) -} - -//export callbackSizeCallback8 -func callbackSizeCallback8(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(8), data) -} - -//export callbackSizeCallback9 -func callbackSizeCallback9(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(9), data) -} - -//export callbackSizeCallback10 -func callbackSizeCallback10(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(10), data) -} - -//export callbackSizeCallback11 -func callbackSizeCallback11(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(11), data) -} - -//export callbackSizeCallback12 -func callbackSizeCallback12(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(12), data) -} - -//export callbackSizeCallback13 -func callbackSizeCallback13(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(13), data) -} - -//export callbackSizeCallback14 -func callbackSizeCallback14(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(14), data) -} - -//export callbackSizeCallback15 -func callbackSizeCallback15(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(15), data) -} - -//export callbackSizeCallback16 -func callbackSizeCallback16(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(16), data) -} - -//export callbackSizeCallback17 -func callbackSizeCallback17(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(17), data) -} - -//export callbackSizeCallback18 -func callbackSizeCallback18(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(18), data) -} - -//export callbackSizeCallback19 -func callbackSizeCallback19(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(19), data) -} - -//export callbackSizeCallback20 -func callbackSizeCallback20(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(20), data) -} - -//export callbackSizeCallback21 -func callbackSizeCallback21(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(21), data) -} - -//export callbackSizeCallback22 -func callbackSizeCallback22(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(22), data) -} - -//export callbackSizeCallback23 -func callbackSizeCallback23(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(23), data) -} - -//export callbackSizeCallback24 -func callbackSizeCallback24(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(24), data) -} - -//export callbackSizeCallback25 -func callbackSizeCallback25(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(25), data) -} - -//export callbackSizeCallback26 -func callbackSizeCallback26(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(26), data) -} - -//export callbackSizeCallback27 -func callbackSizeCallback27(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(27), data) -} - -//export callbackSizeCallback28 -func callbackSizeCallback28(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(28), data) -} - -//export callbackSizeCallback29 -func callbackSizeCallback29(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(29), data) -} - -//export callbackSizeCallback30 -func callbackSizeCallback30(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(30), data) -} - -//export callbackSizeCallback31 -func callbackSizeCallback31(data *C.ImGuiSizeCallbackData) { - wrapSizeCallback(poolSizeCallback.Get(31), data) -} - -var poolSizeCallback *internal.Pool[SizeCallback, C.ImGuiSizeCallback] - -func init() { - poolSizeCallback = internal.NewPool[SizeCallback, C.ImGuiSizeCallback]( - C.ImGuiSizeCallback(C.callbackSizeCallback0), - C.ImGuiSizeCallback(C.callbackSizeCallback1), - C.ImGuiSizeCallback(C.callbackSizeCallback2), - C.ImGuiSizeCallback(C.callbackSizeCallback3), - C.ImGuiSizeCallback(C.callbackSizeCallback4), - C.ImGuiSizeCallback(C.callbackSizeCallback5), - C.ImGuiSizeCallback(C.callbackSizeCallback6), - C.ImGuiSizeCallback(C.callbackSizeCallback7), - C.ImGuiSizeCallback(C.callbackSizeCallback8), - C.ImGuiSizeCallback(C.callbackSizeCallback9), - C.ImGuiSizeCallback(C.callbackSizeCallback10), - C.ImGuiSizeCallback(C.callbackSizeCallback11), - C.ImGuiSizeCallback(C.callbackSizeCallback12), - C.ImGuiSizeCallback(C.callbackSizeCallback13), - C.ImGuiSizeCallback(C.callbackSizeCallback14), - C.ImGuiSizeCallback(C.callbackSizeCallback15), - C.ImGuiSizeCallback(C.callbackSizeCallback16), - C.ImGuiSizeCallback(C.callbackSizeCallback17), - C.ImGuiSizeCallback(C.callbackSizeCallback18), - C.ImGuiSizeCallback(C.callbackSizeCallback19), - C.ImGuiSizeCallback(C.callbackSizeCallback20), - C.ImGuiSizeCallback(C.callbackSizeCallback21), - C.ImGuiSizeCallback(C.callbackSizeCallback22), - C.ImGuiSizeCallback(C.callbackSizeCallback23), - C.ImGuiSizeCallback(C.callbackSizeCallback24), - C.ImGuiSizeCallback(C.callbackSizeCallback25), - C.ImGuiSizeCallback(C.callbackSizeCallback26), - C.ImGuiSizeCallback(C.callbackSizeCallback27), - C.ImGuiSizeCallback(C.callbackSizeCallback28), - C.ImGuiSizeCallback(C.callbackSizeCallback29), - C.ImGuiSizeCallback(C.callbackSizeCallback30), - C.ImGuiSizeCallback(C.callbackSizeCallback31), - ) -} - -func ClearSizeCallbackPool() { - poolSizeCallback.Clear() -} - type SizeCallbackData struct { CData *C.ImGuiSizeCallbackData } diff --git a/imguizmo/cimguizmo_callbacks.go b/imguizmo/cimguizmo_callbacks.go new file mode 100644 index 00000000..a400c8ac --- /dev/null +++ b/imguizmo/cimguizmo_callbacks.go @@ -0,0 +1,11 @@ +// Code generated by cmd/codegen from https://github.com/AllenDang/cimgui-go. +// DO NOT EDIT. + +package imguizmo + +// #include +// #include +// #include "../imgui/extra_types.h" +// #include "cimguizmo_wrapper.h" +// #include "cimguizmo_typedefs.h" +import "C" diff --git a/immarkdown/cimmarkdown_callbacks.go b/immarkdown/cimmarkdown_callbacks.go new file mode 100644 index 00000000..f49994a1 --- /dev/null +++ b/immarkdown/cimmarkdown_callbacks.go @@ -0,0 +1,1033 @@ +// Code generated by cmd/codegen from https://github.com/AllenDang/cimgui-go. +// DO NOT EDIT. + +package immarkdown + +// #include +// #include +// #include "../imgui/extra_types.h" +// #include "cimmarkdown_wrapper.h" +// #include "cimmarkdown_typedefs.h" +// extern void callbackMarkdownFormalCallback0(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback1(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback2(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback3(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback4(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback5(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback6(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback7(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback8(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback9(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback10(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback11(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback12(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback13(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback14(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback15(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback16(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback17(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback18(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback19(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback20(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback21(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback22(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback23(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback24(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback25(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback26(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback27(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback28(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback29(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback30(MarkdownFormatInfo*, bool); +// extern void callbackMarkdownFormalCallback31(MarkdownFormatInfo*, bool); +// extern MarkdownImageData callbackMarkdownImageCallback0(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback1(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback2(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback3(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback4(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback5(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback6(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback7(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback8(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback9(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback10(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback11(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback12(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback13(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback14(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback15(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback16(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback17(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback18(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback19(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback20(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback21(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback22(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback23(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback24(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback25(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback26(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback27(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback28(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback29(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback30(MarkdownLinkCallbackData); +// extern MarkdownImageData callbackMarkdownImageCallback31(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback0(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback1(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback2(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback3(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback4(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback5(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback6(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback7(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback8(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback9(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback10(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback11(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback12(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback13(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback14(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback15(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback16(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback17(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback18(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback19(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback20(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback21(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback22(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback23(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback24(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback25(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback26(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback27(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback28(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback29(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback30(MarkdownLinkCallbackData); +// extern void callbackMarkdownLinkCallback31(MarkdownLinkCallbackData); +// extern void callbackMarkdownTooltipCallback0(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback1(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback2(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback3(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback4(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback5(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback6(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback7(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback8(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback9(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback10(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback11(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback12(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback13(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback14(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback15(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback16(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback17(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback18(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback19(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback20(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback21(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback22(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback23(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback24(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback25(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback26(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback27(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback28(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback29(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback30(MarkdownTooltipCallbackData); +// extern void callbackMarkdownTooltipCallback31(MarkdownTooltipCallbackData); +import "C" +import "github.com/AllenDang/cimgui-go/internal" + +type ( + MarkdownFormalCallback func(markdownFormatInfo_ *MarkdownFormatInfo, start_ bool) + cMarkdownFormalCallback func(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) +) + +func NewMarkdownFormalCallbackFromC(cvalue *C.MarkdownFormalCallback) *MarkdownFormalCallback { + result := poolMarkdownFormalCallback.Find(cvalue) + return &result +} + +func (c MarkdownFormalCallback) Handle() (*C.MarkdownFormalCallback, func()) { + result := poolMarkdownFormalCallback.Allocate(c) + return result, func() {} +} + +func wrapMarkdownFormalCallback(cb MarkdownFormalCallback, markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + cb(NewMarkdownFormatInfoFromC(markdownFormatInfo_), start_ == C.bool(true)) +} + +//export callbackMarkdownFormalCallback0 +func callbackMarkdownFormalCallback0(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(0), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback1 +func callbackMarkdownFormalCallback1(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(1), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback2 +func callbackMarkdownFormalCallback2(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(2), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback3 +func callbackMarkdownFormalCallback3(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(3), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback4 +func callbackMarkdownFormalCallback4(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(4), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback5 +func callbackMarkdownFormalCallback5(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(5), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback6 +func callbackMarkdownFormalCallback6(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(6), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback7 +func callbackMarkdownFormalCallback7(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(7), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback8 +func callbackMarkdownFormalCallback8(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(8), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback9 +func callbackMarkdownFormalCallback9(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(9), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback10 +func callbackMarkdownFormalCallback10(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(10), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback11 +func callbackMarkdownFormalCallback11(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(11), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback12 +func callbackMarkdownFormalCallback12(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(12), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback13 +func callbackMarkdownFormalCallback13(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(13), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback14 +func callbackMarkdownFormalCallback14(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(14), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback15 +func callbackMarkdownFormalCallback15(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(15), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback16 +func callbackMarkdownFormalCallback16(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(16), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback17 +func callbackMarkdownFormalCallback17(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(17), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback18 +func callbackMarkdownFormalCallback18(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(18), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback19 +func callbackMarkdownFormalCallback19(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(19), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback20 +func callbackMarkdownFormalCallback20(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(20), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback21 +func callbackMarkdownFormalCallback21(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(21), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback22 +func callbackMarkdownFormalCallback22(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(22), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback23 +func callbackMarkdownFormalCallback23(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(23), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback24 +func callbackMarkdownFormalCallback24(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(24), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback25 +func callbackMarkdownFormalCallback25(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(25), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback26 +func callbackMarkdownFormalCallback26(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(26), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback27 +func callbackMarkdownFormalCallback27(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(27), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback28 +func callbackMarkdownFormalCallback28(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(28), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback29 +func callbackMarkdownFormalCallback29(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(29), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback30 +func callbackMarkdownFormalCallback30(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(30), markdownFormatInfo_, start_) +} + +//export callbackMarkdownFormalCallback31 +func callbackMarkdownFormalCallback31(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { + wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(31), markdownFormatInfo_, start_) +} + +var poolMarkdownFormalCallback *internal.Pool[MarkdownFormalCallback, *C.MarkdownFormalCallback] + +func init() { + poolMarkdownFormalCallback = internal.NewPool[MarkdownFormalCallback, *C.MarkdownFormalCallback]( + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback0), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback1), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback2), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback3), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback4), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback5), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback6), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback7), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback8), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback9), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback10), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback11), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback12), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback13), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback14), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback15), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback16), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback17), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback18), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback19), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback20), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback21), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback22), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback23), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback24), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback25), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback26), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback27), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback28), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback29), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback30), + (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback31), + ) +} + +func ClearMarkdownFormalCallbackPool() { + poolMarkdownFormalCallback.Clear() +} + +type ( + MarkdownImageCallback func(data MarkdownLinkCallbackData) MarkdownImageData + cMarkdownImageCallback func(data C.MarkdownLinkCallbackData) C.MarkdownImageData +) + +func NewMarkdownImageCallbackFromC(cvalue *C.MarkdownImageCallback) *MarkdownImageCallback { + result := poolMarkdownImageCallback.Find(cvalue) + return &result +} + +func (c MarkdownImageCallback) Handle() (*C.MarkdownImageCallback, func()) { + result := poolMarkdownImageCallback.Allocate(c) + return result, func() {} +} + +func wrapMarkdownImageCallback(cb MarkdownImageCallback, data C.MarkdownLinkCallbackData) C.MarkdownImageData { + result := cb(*NewMarkdownLinkCallbackDataFromC(func() *C.MarkdownLinkCallbackData { result := data; return &result }())) + resultArg, resultFin := result.C() + defer func() { + resultFin() + }() + return internal.ReinterpretCast[C.MarkdownImageData](resultArg) +} + +//export callbackMarkdownImageCallback0 +func callbackMarkdownImageCallback0(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(0), data) +} + +//export callbackMarkdownImageCallback1 +func callbackMarkdownImageCallback1(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(1), data) +} + +//export callbackMarkdownImageCallback2 +func callbackMarkdownImageCallback2(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(2), data) +} + +//export callbackMarkdownImageCallback3 +func callbackMarkdownImageCallback3(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(3), data) +} + +//export callbackMarkdownImageCallback4 +func callbackMarkdownImageCallback4(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(4), data) +} + +//export callbackMarkdownImageCallback5 +func callbackMarkdownImageCallback5(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(5), data) +} + +//export callbackMarkdownImageCallback6 +func callbackMarkdownImageCallback6(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(6), data) +} + +//export callbackMarkdownImageCallback7 +func callbackMarkdownImageCallback7(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(7), data) +} + +//export callbackMarkdownImageCallback8 +func callbackMarkdownImageCallback8(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(8), data) +} + +//export callbackMarkdownImageCallback9 +func callbackMarkdownImageCallback9(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(9), data) +} + +//export callbackMarkdownImageCallback10 +func callbackMarkdownImageCallback10(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(10), data) +} + +//export callbackMarkdownImageCallback11 +func callbackMarkdownImageCallback11(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(11), data) +} + +//export callbackMarkdownImageCallback12 +func callbackMarkdownImageCallback12(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(12), data) +} + +//export callbackMarkdownImageCallback13 +func callbackMarkdownImageCallback13(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(13), data) +} + +//export callbackMarkdownImageCallback14 +func callbackMarkdownImageCallback14(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(14), data) +} + +//export callbackMarkdownImageCallback15 +func callbackMarkdownImageCallback15(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(15), data) +} + +//export callbackMarkdownImageCallback16 +func callbackMarkdownImageCallback16(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(16), data) +} + +//export callbackMarkdownImageCallback17 +func callbackMarkdownImageCallback17(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(17), data) +} + +//export callbackMarkdownImageCallback18 +func callbackMarkdownImageCallback18(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(18), data) +} + +//export callbackMarkdownImageCallback19 +func callbackMarkdownImageCallback19(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(19), data) +} + +//export callbackMarkdownImageCallback20 +func callbackMarkdownImageCallback20(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(20), data) +} + +//export callbackMarkdownImageCallback21 +func callbackMarkdownImageCallback21(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(21), data) +} + +//export callbackMarkdownImageCallback22 +func callbackMarkdownImageCallback22(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(22), data) +} + +//export callbackMarkdownImageCallback23 +func callbackMarkdownImageCallback23(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(23), data) +} + +//export callbackMarkdownImageCallback24 +func callbackMarkdownImageCallback24(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(24), data) +} + +//export callbackMarkdownImageCallback25 +func callbackMarkdownImageCallback25(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(25), data) +} + +//export callbackMarkdownImageCallback26 +func callbackMarkdownImageCallback26(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(26), data) +} + +//export callbackMarkdownImageCallback27 +func callbackMarkdownImageCallback27(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(27), data) +} + +//export callbackMarkdownImageCallback28 +func callbackMarkdownImageCallback28(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(28), data) +} + +//export callbackMarkdownImageCallback29 +func callbackMarkdownImageCallback29(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(29), data) +} + +//export callbackMarkdownImageCallback30 +func callbackMarkdownImageCallback30(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(30), data) +} + +//export callbackMarkdownImageCallback31 +func callbackMarkdownImageCallback31(data C.MarkdownLinkCallbackData) C.MarkdownImageData { + return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(31), data) +} + +var poolMarkdownImageCallback *internal.Pool[MarkdownImageCallback, *C.MarkdownImageCallback] + +func init() { + poolMarkdownImageCallback = internal.NewPool[MarkdownImageCallback, *C.MarkdownImageCallback]( + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback0), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback1), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback2), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback3), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback4), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback5), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback6), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback7), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback8), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback9), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback10), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback11), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback12), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback13), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback14), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback15), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback16), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback17), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback18), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback19), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback20), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback21), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback22), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback23), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback24), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback25), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback26), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback27), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback28), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback29), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback30), + (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback31), + ) +} + +func ClearMarkdownImageCallbackPool() { + poolMarkdownImageCallback.Clear() +} + +type ( + MarkdownLinkCallback func(data MarkdownLinkCallbackData) + cMarkdownLinkCallback func(data C.MarkdownLinkCallbackData) +) + +func NewMarkdownLinkCallbackFromC(cvalue *C.MarkdownLinkCallback) *MarkdownLinkCallback { + result := poolMarkdownLinkCallback.Find(cvalue) + return &result +} + +func (c MarkdownLinkCallback) Handle() (*C.MarkdownLinkCallback, func()) { + result := poolMarkdownLinkCallback.Allocate(c) + return result, func() {} +} + +func wrapMarkdownLinkCallback(cb MarkdownLinkCallback, data C.MarkdownLinkCallbackData) { + cb(*NewMarkdownLinkCallbackDataFromC(func() *C.MarkdownLinkCallbackData { result := data; return &result }())) +} + +//export callbackMarkdownLinkCallback0 +func callbackMarkdownLinkCallback0(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(0), data) +} + +//export callbackMarkdownLinkCallback1 +func callbackMarkdownLinkCallback1(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(1), data) +} + +//export callbackMarkdownLinkCallback2 +func callbackMarkdownLinkCallback2(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(2), data) +} + +//export callbackMarkdownLinkCallback3 +func callbackMarkdownLinkCallback3(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(3), data) +} + +//export callbackMarkdownLinkCallback4 +func callbackMarkdownLinkCallback4(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(4), data) +} + +//export callbackMarkdownLinkCallback5 +func callbackMarkdownLinkCallback5(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(5), data) +} + +//export callbackMarkdownLinkCallback6 +func callbackMarkdownLinkCallback6(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(6), data) +} + +//export callbackMarkdownLinkCallback7 +func callbackMarkdownLinkCallback7(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(7), data) +} + +//export callbackMarkdownLinkCallback8 +func callbackMarkdownLinkCallback8(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(8), data) +} + +//export callbackMarkdownLinkCallback9 +func callbackMarkdownLinkCallback9(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(9), data) +} + +//export callbackMarkdownLinkCallback10 +func callbackMarkdownLinkCallback10(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(10), data) +} + +//export callbackMarkdownLinkCallback11 +func callbackMarkdownLinkCallback11(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(11), data) +} + +//export callbackMarkdownLinkCallback12 +func callbackMarkdownLinkCallback12(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(12), data) +} + +//export callbackMarkdownLinkCallback13 +func callbackMarkdownLinkCallback13(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(13), data) +} + +//export callbackMarkdownLinkCallback14 +func callbackMarkdownLinkCallback14(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(14), data) +} + +//export callbackMarkdownLinkCallback15 +func callbackMarkdownLinkCallback15(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(15), data) +} + +//export callbackMarkdownLinkCallback16 +func callbackMarkdownLinkCallback16(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(16), data) +} + +//export callbackMarkdownLinkCallback17 +func callbackMarkdownLinkCallback17(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(17), data) +} + +//export callbackMarkdownLinkCallback18 +func callbackMarkdownLinkCallback18(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(18), data) +} + +//export callbackMarkdownLinkCallback19 +func callbackMarkdownLinkCallback19(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(19), data) +} + +//export callbackMarkdownLinkCallback20 +func callbackMarkdownLinkCallback20(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(20), data) +} + +//export callbackMarkdownLinkCallback21 +func callbackMarkdownLinkCallback21(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(21), data) +} + +//export callbackMarkdownLinkCallback22 +func callbackMarkdownLinkCallback22(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(22), data) +} + +//export callbackMarkdownLinkCallback23 +func callbackMarkdownLinkCallback23(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(23), data) +} + +//export callbackMarkdownLinkCallback24 +func callbackMarkdownLinkCallback24(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(24), data) +} + +//export callbackMarkdownLinkCallback25 +func callbackMarkdownLinkCallback25(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(25), data) +} + +//export callbackMarkdownLinkCallback26 +func callbackMarkdownLinkCallback26(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(26), data) +} + +//export callbackMarkdownLinkCallback27 +func callbackMarkdownLinkCallback27(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(27), data) +} + +//export callbackMarkdownLinkCallback28 +func callbackMarkdownLinkCallback28(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(28), data) +} + +//export callbackMarkdownLinkCallback29 +func callbackMarkdownLinkCallback29(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(29), data) +} + +//export callbackMarkdownLinkCallback30 +func callbackMarkdownLinkCallback30(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(30), data) +} + +//export callbackMarkdownLinkCallback31 +func callbackMarkdownLinkCallback31(data C.MarkdownLinkCallbackData) { + wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(31), data) +} + +var poolMarkdownLinkCallback *internal.Pool[MarkdownLinkCallback, *C.MarkdownLinkCallback] + +func init() { + poolMarkdownLinkCallback = internal.NewPool[MarkdownLinkCallback, *C.MarkdownLinkCallback]( + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback0), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback1), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback2), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback3), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback4), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback5), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback6), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback7), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback8), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback9), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback10), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback11), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback12), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback13), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback14), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback15), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback16), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback17), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback18), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback19), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback20), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback21), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback22), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback23), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback24), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback25), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback26), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback27), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback28), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback29), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback30), + (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback31), + ) +} + +func ClearMarkdownLinkCallbackPool() { + poolMarkdownLinkCallback.Clear() +} + +type ( + MarkdownTooltipCallback func(data MarkdownTooltipCallbackData) + cMarkdownTooltipCallback func(data C.MarkdownTooltipCallbackData) +) + +func NewMarkdownTooltipCallbackFromC(cvalue *C.MarkdownTooltipCallback) *MarkdownTooltipCallback { + result := poolMarkdownTooltipCallback.Find(cvalue) + return &result +} + +func (c MarkdownTooltipCallback) Handle() (*C.MarkdownTooltipCallback, func()) { + result := poolMarkdownTooltipCallback.Allocate(c) + return result, func() {} +} + +func wrapMarkdownTooltipCallback(cb MarkdownTooltipCallback, data C.MarkdownTooltipCallbackData) { + cb(*NewMarkdownTooltipCallbackDataFromC(func() *C.MarkdownTooltipCallbackData { result := data; return &result }())) +} + +//export callbackMarkdownTooltipCallback0 +func callbackMarkdownTooltipCallback0(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(0), data) +} + +//export callbackMarkdownTooltipCallback1 +func callbackMarkdownTooltipCallback1(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(1), data) +} + +//export callbackMarkdownTooltipCallback2 +func callbackMarkdownTooltipCallback2(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(2), data) +} + +//export callbackMarkdownTooltipCallback3 +func callbackMarkdownTooltipCallback3(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(3), data) +} + +//export callbackMarkdownTooltipCallback4 +func callbackMarkdownTooltipCallback4(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(4), data) +} + +//export callbackMarkdownTooltipCallback5 +func callbackMarkdownTooltipCallback5(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(5), data) +} + +//export callbackMarkdownTooltipCallback6 +func callbackMarkdownTooltipCallback6(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(6), data) +} + +//export callbackMarkdownTooltipCallback7 +func callbackMarkdownTooltipCallback7(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(7), data) +} + +//export callbackMarkdownTooltipCallback8 +func callbackMarkdownTooltipCallback8(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(8), data) +} + +//export callbackMarkdownTooltipCallback9 +func callbackMarkdownTooltipCallback9(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(9), data) +} + +//export callbackMarkdownTooltipCallback10 +func callbackMarkdownTooltipCallback10(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(10), data) +} + +//export callbackMarkdownTooltipCallback11 +func callbackMarkdownTooltipCallback11(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(11), data) +} + +//export callbackMarkdownTooltipCallback12 +func callbackMarkdownTooltipCallback12(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(12), data) +} + +//export callbackMarkdownTooltipCallback13 +func callbackMarkdownTooltipCallback13(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(13), data) +} + +//export callbackMarkdownTooltipCallback14 +func callbackMarkdownTooltipCallback14(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(14), data) +} + +//export callbackMarkdownTooltipCallback15 +func callbackMarkdownTooltipCallback15(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(15), data) +} + +//export callbackMarkdownTooltipCallback16 +func callbackMarkdownTooltipCallback16(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(16), data) +} + +//export callbackMarkdownTooltipCallback17 +func callbackMarkdownTooltipCallback17(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(17), data) +} + +//export callbackMarkdownTooltipCallback18 +func callbackMarkdownTooltipCallback18(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(18), data) +} + +//export callbackMarkdownTooltipCallback19 +func callbackMarkdownTooltipCallback19(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(19), data) +} + +//export callbackMarkdownTooltipCallback20 +func callbackMarkdownTooltipCallback20(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(20), data) +} + +//export callbackMarkdownTooltipCallback21 +func callbackMarkdownTooltipCallback21(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(21), data) +} + +//export callbackMarkdownTooltipCallback22 +func callbackMarkdownTooltipCallback22(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(22), data) +} + +//export callbackMarkdownTooltipCallback23 +func callbackMarkdownTooltipCallback23(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(23), data) +} + +//export callbackMarkdownTooltipCallback24 +func callbackMarkdownTooltipCallback24(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(24), data) +} + +//export callbackMarkdownTooltipCallback25 +func callbackMarkdownTooltipCallback25(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(25), data) +} + +//export callbackMarkdownTooltipCallback26 +func callbackMarkdownTooltipCallback26(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(26), data) +} + +//export callbackMarkdownTooltipCallback27 +func callbackMarkdownTooltipCallback27(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(27), data) +} + +//export callbackMarkdownTooltipCallback28 +func callbackMarkdownTooltipCallback28(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(28), data) +} + +//export callbackMarkdownTooltipCallback29 +func callbackMarkdownTooltipCallback29(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(29), data) +} + +//export callbackMarkdownTooltipCallback30 +func callbackMarkdownTooltipCallback30(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(30), data) +} + +//export callbackMarkdownTooltipCallback31 +func callbackMarkdownTooltipCallback31(data C.MarkdownTooltipCallbackData) { + wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(31), data) +} + +var poolMarkdownTooltipCallback *internal.Pool[MarkdownTooltipCallback, *C.MarkdownTooltipCallback] + +func init() { + poolMarkdownTooltipCallback = internal.NewPool[MarkdownTooltipCallback, *C.MarkdownTooltipCallback]( + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback0), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback1), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback2), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback3), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback4), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback5), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback6), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback7), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback8), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback9), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback10), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback11), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback12), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback13), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback14), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback15), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback16), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback17), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback18), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback19), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback20), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback21), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback22), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback23), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback24), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback25), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback26), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback27), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback28), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback29), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback30), + (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback31), + ) +} + +func ClearMarkdownTooltipCallbackPool() { + poolMarkdownTooltipCallback.Clear() +} diff --git a/immarkdown/cimmarkdown_typedefs.go b/immarkdown/cimmarkdown_typedefs.go index a36fb982..ab91bb8f 100644 --- a/immarkdown/cimmarkdown_typedefs.go +++ b/immarkdown/cimmarkdown_typedefs.go @@ -8,134 +8,6 @@ package immarkdown // #include "../imgui/extra_types.h" // #include "cimmarkdown_wrapper.h" // #include "cimmarkdown_typedefs.h" -// extern void callbackMarkdownFormalCallback0(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback1(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback2(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback3(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback4(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback5(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback6(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback7(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback8(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback9(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback10(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback11(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback12(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback13(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback14(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback15(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback16(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback17(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback18(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback19(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback20(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback21(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback22(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback23(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback24(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback25(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback26(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback27(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback28(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback29(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback30(MarkdownFormatInfo*, bool); -// extern void callbackMarkdownFormalCallback31(MarkdownFormatInfo*, bool); -// extern MarkdownImageData callbackMarkdownImageCallback0(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback1(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback2(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback3(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback4(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback5(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback6(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback7(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback8(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback9(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback10(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback11(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback12(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback13(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback14(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback15(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback16(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback17(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback18(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback19(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback20(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback21(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback22(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback23(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback24(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback25(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback26(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback27(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback28(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback29(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback30(MarkdownLinkCallbackData); -// extern MarkdownImageData callbackMarkdownImageCallback31(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback0(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback1(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback2(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback3(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback4(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback5(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback6(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback7(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback8(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback9(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback10(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback11(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback12(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback13(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback14(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback15(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback16(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback17(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback18(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback19(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback20(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback21(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback22(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback23(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback24(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback25(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback26(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback27(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback28(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback29(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback30(MarkdownLinkCallbackData); -// extern void callbackMarkdownLinkCallback31(MarkdownLinkCallbackData); -// extern void callbackMarkdownTooltipCallback0(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback1(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback2(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback3(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback4(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback5(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback6(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback7(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback8(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback9(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback10(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback11(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback12(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback13(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback14(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback15(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback16(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback17(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback18(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback19(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback20(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback21(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback22(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback23(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback24(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback25(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback26(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback27(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback28(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback29(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback30(MarkdownTooltipCallbackData); -// extern void callbackMarkdownTooltipCallback31(MarkdownTooltipCallbackData); import "C" import "github.com/AllenDang/cimgui-go/internal" @@ -243,228 +115,6 @@ func NewMarkdownConfigFromC[SRC any](cvalue SRC) *MarkdownConfig { return &MarkdownConfig{CData: internal.ReinterpretCast[*C.MarkdownConfig](cvalue)} } -type ( - MarkdownFormalCallback func(markdownFormatInfo_ *MarkdownFormatInfo, start_ bool) - cMarkdownFormalCallback func(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) -) - -func NewMarkdownFormalCallbackFromC(cvalue *C.MarkdownFormalCallback) *MarkdownFormalCallback { - result := poolMarkdownFormalCallback.Find(cvalue) - return &result -} - -func (c MarkdownFormalCallback) Handle() (*C.MarkdownFormalCallback, func()) { - result := poolMarkdownFormalCallback.Allocate(c) - return result, func() {} -} - -func wrapMarkdownFormalCallback(cb MarkdownFormalCallback, markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - cb(NewMarkdownFormatInfoFromC(markdownFormatInfo_), start_ == C.bool(true)) -} - -//export callbackMarkdownFormalCallback0 -func callbackMarkdownFormalCallback0(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(0), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback1 -func callbackMarkdownFormalCallback1(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(1), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback2 -func callbackMarkdownFormalCallback2(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(2), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback3 -func callbackMarkdownFormalCallback3(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(3), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback4 -func callbackMarkdownFormalCallback4(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(4), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback5 -func callbackMarkdownFormalCallback5(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(5), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback6 -func callbackMarkdownFormalCallback6(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(6), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback7 -func callbackMarkdownFormalCallback7(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(7), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback8 -func callbackMarkdownFormalCallback8(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(8), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback9 -func callbackMarkdownFormalCallback9(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(9), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback10 -func callbackMarkdownFormalCallback10(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(10), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback11 -func callbackMarkdownFormalCallback11(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(11), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback12 -func callbackMarkdownFormalCallback12(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(12), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback13 -func callbackMarkdownFormalCallback13(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(13), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback14 -func callbackMarkdownFormalCallback14(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(14), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback15 -func callbackMarkdownFormalCallback15(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(15), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback16 -func callbackMarkdownFormalCallback16(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(16), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback17 -func callbackMarkdownFormalCallback17(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(17), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback18 -func callbackMarkdownFormalCallback18(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(18), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback19 -func callbackMarkdownFormalCallback19(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(19), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback20 -func callbackMarkdownFormalCallback20(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(20), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback21 -func callbackMarkdownFormalCallback21(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(21), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback22 -func callbackMarkdownFormalCallback22(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(22), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback23 -func callbackMarkdownFormalCallback23(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(23), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback24 -func callbackMarkdownFormalCallback24(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(24), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback25 -func callbackMarkdownFormalCallback25(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(25), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback26 -func callbackMarkdownFormalCallback26(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(26), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback27 -func callbackMarkdownFormalCallback27(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(27), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback28 -func callbackMarkdownFormalCallback28(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(28), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback29 -func callbackMarkdownFormalCallback29(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(29), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback30 -func callbackMarkdownFormalCallback30(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(30), markdownFormatInfo_, start_) -} - -//export callbackMarkdownFormalCallback31 -func callbackMarkdownFormalCallback31(markdownFormatInfo_ *C.MarkdownFormatInfo, start_ C.bool) { - wrapMarkdownFormalCallback(poolMarkdownFormalCallback.Get(31), markdownFormatInfo_, start_) -} - -var poolMarkdownFormalCallback *internal.Pool[MarkdownFormalCallback, *C.MarkdownFormalCallback] - -func init() { - poolMarkdownFormalCallback = internal.NewPool[MarkdownFormalCallback, *C.MarkdownFormalCallback]( - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback0), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback1), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback2), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback3), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback4), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback5), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback6), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback7), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback8), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback9), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback10), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback11), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback12), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback13), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback14), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback15), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback16), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback17), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback18), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback19), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback20), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback21), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback22), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback23), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback24), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback25), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback26), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback27), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback28), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback29), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback30), - (*C.MarkdownFormalCallback)(C.callbackMarkdownFormalCallback31), - ) -} - -func ClearMarkdownFormalCallbackPool() { - poolMarkdownFormalCallback.Clear() -} - type MarkdownFormatInfo struct { CData *C.MarkdownFormatInfo } @@ -517,233 +167,6 @@ func NewMarkdownHeadingFormatFromC[SRC any](cvalue SRC) *MarkdownHeadingFormat { return &MarkdownHeadingFormat{CData: internal.ReinterpretCast[*C.MarkdownHeadingFormat](cvalue)} } -type ( - MarkdownImageCallback func(data MarkdownLinkCallbackData) MarkdownImageData - cMarkdownImageCallback func(data C.MarkdownLinkCallbackData) C.MarkdownImageData -) - -func NewMarkdownImageCallbackFromC(cvalue *C.MarkdownImageCallback) *MarkdownImageCallback { - result := poolMarkdownImageCallback.Find(cvalue) - return &result -} - -func (c MarkdownImageCallback) Handle() (*C.MarkdownImageCallback, func()) { - result := poolMarkdownImageCallback.Allocate(c) - return result, func() {} -} - -func wrapMarkdownImageCallback(cb MarkdownImageCallback, data C.MarkdownLinkCallbackData) C.MarkdownImageData { - result := cb(*NewMarkdownLinkCallbackDataFromC(func() *C.MarkdownLinkCallbackData { result := data; return &result }())) - resultArg, resultFin := result.C() - defer func() { - resultFin() - }() - return internal.ReinterpretCast[C.MarkdownImageData](resultArg) -} - -//export callbackMarkdownImageCallback0 -func callbackMarkdownImageCallback0(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(0), data) -} - -//export callbackMarkdownImageCallback1 -func callbackMarkdownImageCallback1(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(1), data) -} - -//export callbackMarkdownImageCallback2 -func callbackMarkdownImageCallback2(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(2), data) -} - -//export callbackMarkdownImageCallback3 -func callbackMarkdownImageCallback3(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(3), data) -} - -//export callbackMarkdownImageCallback4 -func callbackMarkdownImageCallback4(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(4), data) -} - -//export callbackMarkdownImageCallback5 -func callbackMarkdownImageCallback5(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(5), data) -} - -//export callbackMarkdownImageCallback6 -func callbackMarkdownImageCallback6(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(6), data) -} - -//export callbackMarkdownImageCallback7 -func callbackMarkdownImageCallback7(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(7), data) -} - -//export callbackMarkdownImageCallback8 -func callbackMarkdownImageCallback8(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(8), data) -} - -//export callbackMarkdownImageCallback9 -func callbackMarkdownImageCallback9(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(9), data) -} - -//export callbackMarkdownImageCallback10 -func callbackMarkdownImageCallback10(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(10), data) -} - -//export callbackMarkdownImageCallback11 -func callbackMarkdownImageCallback11(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(11), data) -} - -//export callbackMarkdownImageCallback12 -func callbackMarkdownImageCallback12(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(12), data) -} - -//export callbackMarkdownImageCallback13 -func callbackMarkdownImageCallback13(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(13), data) -} - -//export callbackMarkdownImageCallback14 -func callbackMarkdownImageCallback14(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(14), data) -} - -//export callbackMarkdownImageCallback15 -func callbackMarkdownImageCallback15(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(15), data) -} - -//export callbackMarkdownImageCallback16 -func callbackMarkdownImageCallback16(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(16), data) -} - -//export callbackMarkdownImageCallback17 -func callbackMarkdownImageCallback17(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(17), data) -} - -//export callbackMarkdownImageCallback18 -func callbackMarkdownImageCallback18(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(18), data) -} - -//export callbackMarkdownImageCallback19 -func callbackMarkdownImageCallback19(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(19), data) -} - -//export callbackMarkdownImageCallback20 -func callbackMarkdownImageCallback20(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(20), data) -} - -//export callbackMarkdownImageCallback21 -func callbackMarkdownImageCallback21(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(21), data) -} - -//export callbackMarkdownImageCallback22 -func callbackMarkdownImageCallback22(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(22), data) -} - -//export callbackMarkdownImageCallback23 -func callbackMarkdownImageCallback23(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(23), data) -} - -//export callbackMarkdownImageCallback24 -func callbackMarkdownImageCallback24(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(24), data) -} - -//export callbackMarkdownImageCallback25 -func callbackMarkdownImageCallback25(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(25), data) -} - -//export callbackMarkdownImageCallback26 -func callbackMarkdownImageCallback26(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(26), data) -} - -//export callbackMarkdownImageCallback27 -func callbackMarkdownImageCallback27(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(27), data) -} - -//export callbackMarkdownImageCallback28 -func callbackMarkdownImageCallback28(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(28), data) -} - -//export callbackMarkdownImageCallback29 -func callbackMarkdownImageCallback29(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(29), data) -} - -//export callbackMarkdownImageCallback30 -func callbackMarkdownImageCallback30(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(30), data) -} - -//export callbackMarkdownImageCallback31 -func callbackMarkdownImageCallback31(data C.MarkdownLinkCallbackData) C.MarkdownImageData { - return wrapMarkdownImageCallback(poolMarkdownImageCallback.Get(31), data) -} - -var poolMarkdownImageCallback *internal.Pool[MarkdownImageCallback, *C.MarkdownImageCallback] - -func init() { - poolMarkdownImageCallback = internal.NewPool[MarkdownImageCallback, *C.MarkdownImageCallback]( - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback0), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback1), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback2), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback3), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback4), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback5), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback6), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback7), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback8), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback9), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback10), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback11), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback12), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback13), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback14), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback15), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback16), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback17), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback18), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback19), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback20), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback21), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback22), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback23), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback24), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback25), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback26), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback27), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback28), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback29), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback30), - (*C.MarkdownImageCallback)(C.callbackMarkdownImageCallback31), - ) -} - -func ClearMarkdownImageCallbackPool() { - poolMarkdownImageCallback.Clear() -} - type MarkdownImageData struct { CData *C.MarkdownImageData } @@ -770,228 +193,6 @@ func NewMarkdownImageDataFromC[SRC any](cvalue SRC) *MarkdownImageData { return &MarkdownImageData{CData: internal.ReinterpretCast[*C.MarkdownImageData](cvalue)} } -type ( - MarkdownLinkCallback func(data MarkdownLinkCallbackData) - cMarkdownLinkCallback func(data C.MarkdownLinkCallbackData) -) - -func NewMarkdownLinkCallbackFromC(cvalue *C.MarkdownLinkCallback) *MarkdownLinkCallback { - result := poolMarkdownLinkCallback.Find(cvalue) - return &result -} - -func (c MarkdownLinkCallback) Handle() (*C.MarkdownLinkCallback, func()) { - result := poolMarkdownLinkCallback.Allocate(c) - return result, func() {} -} - -func wrapMarkdownLinkCallback(cb MarkdownLinkCallback, data C.MarkdownLinkCallbackData) { - cb(*NewMarkdownLinkCallbackDataFromC(func() *C.MarkdownLinkCallbackData { result := data; return &result }())) -} - -//export callbackMarkdownLinkCallback0 -func callbackMarkdownLinkCallback0(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(0), data) -} - -//export callbackMarkdownLinkCallback1 -func callbackMarkdownLinkCallback1(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(1), data) -} - -//export callbackMarkdownLinkCallback2 -func callbackMarkdownLinkCallback2(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(2), data) -} - -//export callbackMarkdownLinkCallback3 -func callbackMarkdownLinkCallback3(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(3), data) -} - -//export callbackMarkdownLinkCallback4 -func callbackMarkdownLinkCallback4(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(4), data) -} - -//export callbackMarkdownLinkCallback5 -func callbackMarkdownLinkCallback5(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(5), data) -} - -//export callbackMarkdownLinkCallback6 -func callbackMarkdownLinkCallback6(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(6), data) -} - -//export callbackMarkdownLinkCallback7 -func callbackMarkdownLinkCallback7(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(7), data) -} - -//export callbackMarkdownLinkCallback8 -func callbackMarkdownLinkCallback8(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(8), data) -} - -//export callbackMarkdownLinkCallback9 -func callbackMarkdownLinkCallback9(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(9), data) -} - -//export callbackMarkdownLinkCallback10 -func callbackMarkdownLinkCallback10(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(10), data) -} - -//export callbackMarkdownLinkCallback11 -func callbackMarkdownLinkCallback11(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(11), data) -} - -//export callbackMarkdownLinkCallback12 -func callbackMarkdownLinkCallback12(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(12), data) -} - -//export callbackMarkdownLinkCallback13 -func callbackMarkdownLinkCallback13(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(13), data) -} - -//export callbackMarkdownLinkCallback14 -func callbackMarkdownLinkCallback14(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(14), data) -} - -//export callbackMarkdownLinkCallback15 -func callbackMarkdownLinkCallback15(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(15), data) -} - -//export callbackMarkdownLinkCallback16 -func callbackMarkdownLinkCallback16(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(16), data) -} - -//export callbackMarkdownLinkCallback17 -func callbackMarkdownLinkCallback17(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(17), data) -} - -//export callbackMarkdownLinkCallback18 -func callbackMarkdownLinkCallback18(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(18), data) -} - -//export callbackMarkdownLinkCallback19 -func callbackMarkdownLinkCallback19(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(19), data) -} - -//export callbackMarkdownLinkCallback20 -func callbackMarkdownLinkCallback20(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(20), data) -} - -//export callbackMarkdownLinkCallback21 -func callbackMarkdownLinkCallback21(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(21), data) -} - -//export callbackMarkdownLinkCallback22 -func callbackMarkdownLinkCallback22(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(22), data) -} - -//export callbackMarkdownLinkCallback23 -func callbackMarkdownLinkCallback23(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(23), data) -} - -//export callbackMarkdownLinkCallback24 -func callbackMarkdownLinkCallback24(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(24), data) -} - -//export callbackMarkdownLinkCallback25 -func callbackMarkdownLinkCallback25(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(25), data) -} - -//export callbackMarkdownLinkCallback26 -func callbackMarkdownLinkCallback26(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(26), data) -} - -//export callbackMarkdownLinkCallback27 -func callbackMarkdownLinkCallback27(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(27), data) -} - -//export callbackMarkdownLinkCallback28 -func callbackMarkdownLinkCallback28(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(28), data) -} - -//export callbackMarkdownLinkCallback29 -func callbackMarkdownLinkCallback29(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(29), data) -} - -//export callbackMarkdownLinkCallback30 -func callbackMarkdownLinkCallback30(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(30), data) -} - -//export callbackMarkdownLinkCallback31 -func callbackMarkdownLinkCallback31(data C.MarkdownLinkCallbackData) { - wrapMarkdownLinkCallback(poolMarkdownLinkCallback.Get(31), data) -} - -var poolMarkdownLinkCallback *internal.Pool[MarkdownLinkCallback, *C.MarkdownLinkCallback] - -func init() { - poolMarkdownLinkCallback = internal.NewPool[MarkdownLinkCallback, *C.MarkdownLinkCallback]( - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback0), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback1), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback2), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback3), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback4), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback5), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback6), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback7), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback8), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback9), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback10), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback11), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback12), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback13), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback14), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback15), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback16), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback17), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback18), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback19), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback20), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback21), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback22), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback23), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback24), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback25), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback26), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback27), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback28), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback29), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback30), - (*C.MarkdownLinkCallback)(C.callbackMarkdownLinkCallback31), - ) -} - -func ClearMarkdownLinkCallbackPool() { - poolMarkdownLinkCallback.Clear() -} - type MarkdownLinkCallbackData struct { CData *C.MarkdownLinkCallbackData } @@ -1018,228 +219,6 @@ func NewMarkdownLinkCallbackDataFromC[SRC any](cvalue SRC) *MarkdownLinkCallback return &MarkdownLinkCallbackData{CData: internal.ReinterpretCast[*C.MarkdownLinkCallbackData](cvalue)} } -type ( - MarkdownTooltipCallback func(data MarkdownTooltipCallbackData) - cMarkdownTooltipCallback func(data C.MarkdownTooltipCallbackData) -) - -func NewMarkdownTooltipCallbackFromC(cvalue *C.MarkdownTooltipCallback) *MarkdownTooltipCallback { - result := poolMarkdownTooltipCallback.Find(cvalue) - return &result -} - -func (c MarkdownTooltipCallback) Handle() (*C.MarkdownTooltipCallback, func()) { - result := poolMarkdownTooltipCallback.Allocate(c) - return result, func() {} -} - -func wrapMarkdownTooltipCallback(cb MarkdownTooltipCallback, data C.MarkdownTooltipCallbackData) { - cb(*NewMarkdownTooltipCallbackDataFromC(func() *C.MarkdownTooltipCallbackData { result := data; return &result }())) -} - -//export callbackMarkdownTooltipCallback0 -func callbackMarkdownTooltipCallback0(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(0), data) -} - -//export callbackMarkdownTooltipCallback1 -func callbackMarkdownTooltipCallback1(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(1), data) -} - -//export callbackMarkdownTooltipCallback2 -func callbackMarkdownTooltipCallback2(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(2), data) -} - -//export callbackMarkdownTooltipCallback3 -func callbackMarkdownTooltipCallback3(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(3), data) -} - -//export callbackMarkdownTooltipCallback4 -func callbackMarkdownTooltipCallback4(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(4), data) -} - -//export callbackMarkdownTooltipCallback5 -func callbackMarkdownTooltipCallback5(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(5), data) -} - -//export callbackMarkdownTooltipCallback6 -func callbackMarkdownTooltipCallback6(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(6), data) -} - -//export callbackMarkdownTooltipCallback7 -func callbackMarkdownTooltipCallback7(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(7), data) -} - -//export callbackMarkdownTooltipCallback8 -func callbackMarkdownTooltipCallback8(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(8), data) -} - -//export callbackMarkdownTooltipCallback9 -func callbackMarkdownTooltipCallback9(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(9), data) -} - -//export callbackMarkdownTooltipCallback10 -func callbackMarkdownTooltipCallback10(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(10), data) -} - -//export callbackMarkdownTooltipCallback11 -func callbackMarkdownTooltipCallback11(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(11), data) -} - -//export callbackMarkdownTooltipCallback12 -func callbackMarkdownTooltipCallback12(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(12), data) -} - -//export callbackMarkdownTooltipCallback13 -func callbackMarkdownTooltipCallback13(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(13), data) -} - -//export callbackMarkdownTooltipCallback14 -func callbackMarkdownTooltipCallback14(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(14), data) -} - -//export callbackMarkdownTooltipCallback15 -func callbackMarkdownTooltipCallback15(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(15), data) -} - -//export callbackMarkdownTooltipCallback16 -func callbackMarkdownTooltipCallback16(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(16), data) -} - -//export callbackMarkdownTooltipCallback17 -func callbackMarkdownTooltipCallback17(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(17), data) -} - -//export callbackMarkdownTooltipCallback18 -func callbackMarkdownTooltipCallback18(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(18), data) -} - -//export callbackMarkdownTooltipCallback19 -func callbackMarkdownTooltipCallback19(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(19), data) -} - -//export callbackMarkdownTooltipCallback20 -func callbackMarkdownTooltipCallback20(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(20), data) -} - -//export callbackMarkdownTooltipCallback21 -func callbackMarkdownTooltipCallback21(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(21), data) -} - -//export callbackMarkdownTooltipCallback22 -func callbackMarkdownTooltipCallback22(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(22), data) -} - -//export callbackMarkdownTooltipCallback23 -func callbackMarkdownTooltipCallback23(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(23), data) -} - -//export callbackMarkdownTooltipCallback24 -func callbackMarkdownTooltipCallback24(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(24), data) -} - -//export callbackMarkdownTooltipCallback25 -func callbackMarkdownTooltipCallback25(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(25), data) -} - -//export callbackMarkdownTooltipCallback26 -func callbackMarkdownTooltipCallback26(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(26), data) -} - -//export callbackMarkdownTooltipCallback27 -func callbackMarkdownTooltipCallback27(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(27), data) -} - -//export callbackMarkdownTooltipCallback28 -func callbackMarkdownTooltipCallback28(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(28), data) -} - -//export callbackMarkdownTooltipCallback29 -func callbackMarkdownTooltipCallback29(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(29), data) -} - -//export callbackMarkdownTooltipCallback30 -func callbackMarkdownTooltipCallback30(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(30), data) -} - -//export callbackMarkdownTooltipCallback31 -func callbackMarkdownTooltipCallback31(data C.MarkdownTooltipCallbackData) { - wrapMarkdownTooltipCallback(poolMarkdownTooltipCallback.Get(31), data) -} - -var poolMarkdownTooltipCallback *internal.Pool[MarkdownTooltipCallback, *C.MarkdownTooltipCallback] - -func init() { - poolMarkdownTooltipCallback = internal.NewPool[MarkdownTooltipCallback, *C.MarkdownTooltipCallback]( - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback0), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback1), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback2), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback3), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback4), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback5), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback6), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback7), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback8), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback9), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback10), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback11), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback12), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback13), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback14), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback15), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback16), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback17), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback18), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback19), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback20), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback21), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback22), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback23), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback24), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback25), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback26), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback27), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback28), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback29), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback30), - (*C.MarkdownTooltipCallback)(C.callbackMarkdownTooltipCallback31), - ) -} - -func ClearMarkdownTooltipCallbackPool() { - poolMarkdownTooltipCallback.Clear() -} - type MarkdownTooltipCallbackData struct { CData *C.MarkdownTooltipCallbackData } diff --git a/imnodes/cimnodes_callbacks.go b/imnodes/cimnodes_callbacks.go new file mode 100644 index 00000000..c8bef00d --- /dev/null +++ b/imnodes/cimnodes_callbacks.go @@ -0,0 +1,269 @@ +// Code generated by cmd/codegen from https://github.com/AllenDang/cimgui-go. +// DO NOT EDIT. + +package imnodes + +// #include +// #include +// #include "../imgui/extra_types.h" +// #include "cimnodes_wrapper.h" +// #include "cimnodes_typedefs.h" +// extern void callbackMiniMapNodeHoveringCallback0(int, void*); +// extern void callbackMiniMapNodeHoveringCallback1(int, void*); +// extern void callbackMiniMapNodeHoveringCallback2(int, void*); +// extern void callbackMiniMapNodeHoveringCallback3(int, void*); +// extern void callbackMiniMapNodeHoveringCallback4(int, void*); +// extern void callbackMiniMapNodeHoveringCallback5(int, void*); +// extern void callbackMiniMapNodeHoveringCallback6(int, void*); +// extern void callbackMiniMapNodeHoveringCallback7(int, void*); +// extern void callbackMiniMapNodeHoveringCallback8(int, void*); +// extern void callbackMiniMapNodeHoveringCallback9(int, void*); +// extern void callbackMiniMapNodeHoveringCallback10(int, void*); +// extern void callbackMiniMapNodeHoveringCallback11(int, void*); +// extern void callbackMiniMapNodeHoveringCallback12(int, void*); +// extern void callbackMiniMapNodeHoveringCallback13(int, void*); +// extern void callbackMiniMapNodeHoveringCallback14(int, void*); +// extern void callbackMiniMapNodeHoveringCallback15(int, void*); +// extern void callbackMiniMapNodeHoveringCallback16(int, void*); +// extern void callbackMiniMapNodeHoveringCallback17(int, void*); +// extern void callbackMiniMapNodeHoveringCallback18(int, void*); +// extern void callbackMiniMapNodeHoveringCallback19(int, void*); +// extern void callbackMiniMapNodeHoveringCallback20(int, void*); +// extern void callbackMiniMapNodeHoveringCallback21(int, void*); +// extern void callbackMiniMapNodeHoveringCallback22(int, void*); +// extern void callbackMiniMapNodeHoveringCallback23(int, void*); +// extern void callbackMiniMapNodeHoveringCallback24(int, void*); +// extern void callbackMiniMapNodeHoveringCallback25(int, void*); +// extern void callbackMiniMapNodeHoveringCallback26(int, void*); +// extern void callbackMiniMapNodeHoveringCallback27(int, void*); +// extern void callbackMiniMapNodeHoveringCallback28(int, void*); +// extern void callbackMiniMapNodeHoveringCallback29(int, void*); +// extern void callbackMiniMapNodeHoveringCallback30(int, void*); +// extern void callbackMiniMapNodeHoveringCallback31(int, void*); +import "C" +import ( + "unsafe" + + "github.com/AllenDang/cimgui-go/internal" +) + +type ( + MiniMapNodeHoveringCallback func(arg0 int32, arg1 unsafe.Pointer) + cMiniMapNodeHoveringCallback func(arg0 C.int, arg1 unsafe.Pointer) +) + +func NewMiniMapNodeHoveringCallbackFromC(cvalue *C.ImNodesMiniMapNodeHoveringCallback) *MiniMapNodeHoveringCallback { + result := poolMiniMapNodeHoveringCallback.Find(*cvalue) + return &result +} + +func (c MiniMapNodeHoveringCallback) C() (C.ImNodesMiniMapNodeHoveringCallback, func()) { + return poolMiniMapNodeHoveringCallback.Allocate(c), func() {} +} + +func wrapMiniMapNodeHoveringCallback(cb MiniMapNodeHoveringCallback, arg0 C.int, arg1 unsafe.Pointer) { + cb(int32(arg0), unsafe.Pointer(arg1)) +} + +//export callbackMiniMapNodeHoveringCallback0 +func callbackMiniMapNodeHoveringCallback0(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(0), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback1 +func callbackMiniMapNodeHoveringCallback1(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(1), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback2 +func callbackMiniMapNodeHoveringCallback2(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(2), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback3 +func callbackMiniMapNodeHoveringCallback3(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(3), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback4 +func callbackMiniMapNodeHoveringCallback4(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(4), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback5 +func callbackMiniMapNodeHoveringCallback5(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(5), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback6 +func callbackMiniMapNodeHoveringCallback6(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(6), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback7 +func callbackMiniMapNodeHoveringCallback7(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(7), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback8 +func callbackMiniMapNodeHoveringCallback8(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(8), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback9 +func callbackMiniMapNodeHoveringCallback9(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(9), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback10 +func callbackMiniMapNodeHoveringCallback10(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(10), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback11 +func callbackMiniMapNodeHoveringCallback11(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(11), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback12 +func callbackMiniMapNodeHoveringCallback12(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(12), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback13 +func callbackMiniMapNodeHoveringCallback13(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(13), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback14 +func callbackMiniMapNodeHoveringCallback14(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(14), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback15 +func callbackMiniMapNodeHoveringCallback15(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(15), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback16 +func callbackMiniMapNodeHoveringCallback16(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(16), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback17 +func callbackMiniMapNodeHoveringCallback17(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(17), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback18 +func callbackMiniMapNodeHoveringCallback18(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(18), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback19 +func callbackMiniMapNodeHoveringCallback19(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(19), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback20 +func callbackMiniMapNodeHoveringCallback20(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(20), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback21 +func callbackMiniMapNodeHoveringCallback21(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(21), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback22 +func callbackMiniMapNodeHoveringCallback22(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(22), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback23 +func callbackMiniMapNodeHoveringCallback23(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(23), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback24 +func callbackMiniMapNodeHoveringCallback24(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(24), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback25 +func callbackMiniMapNodeHoveringCallback25(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(25), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback26 +func callbackMiniMapNodeHoveringCallback26(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(26), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback27 +func callbackMiniMapNodeHoveringCallback27(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(27), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback28 +func callbackMiniMapNodeHoveringCallback28(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(28), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback29 +func callbackMiniMapNodeHoveringCallback29(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(29), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback30 +func callbackMiniMapNodeHoveringCallback30(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(30), arg0, arg1) +} + +//export callbackMiniMapNodeHoveringCallback31 +func callbackMiniMapNodeHoveringCallback31(arg0 C.int, arg1 unsafe.Pointer) { + wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(31), arg0, arg1) +} + +var poolMiniMapNodeHoveringCallback *internal.Pool[MiniMapNodeHoveringCallback, C.ImNodesMiniMapNodeHoveringCallback] + +func init() { + poolMiniMapNodeHoveringCallback = internal.NewPool[MiniMapNodeHoveringCallback, C.ImNodesMiniMapNodeHoveringCallback]( + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback0), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback1), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback2), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback3), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback4), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback5), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback6), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback7), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback8), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback9), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback10), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback11), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback12), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback13), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback14), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback15), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback16), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback17), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback18), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback19), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback20), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback21), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback22), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback23), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback24), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback25), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback26), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback27), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback28), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback29), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback30), + C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback31), + ) +} + +func ClearMiniMapNodeHoveringCallbackPool() { + poolMiniMapNodeHoveringCallback.Clear() +} diff --git a/imnodes/cimnodes_typedefs.go b/imnodes/cimnodes_typedefs.go index 105162a9..db58426b 100644 --- a/imnodes/cimnodes_typedefs.go +++ b/imnodes/cimnodes_typedefs.go @@ -8,44 +8,8 @@ package imnodes // #include "../imgui/extra_types.h" // #include "cimnodes_wrapper.h" // #include "cimnodes_typedefs.h" -// extern void callbackMiniMapNodeHoveringCallback0(int, void*); -// extern void callbackMiniMapNodeHoveringCallback1(int, void*); -// extern void callbackMiniMapNodeHoveringCallback2(int, void*); -// extern void callbackMiniMapNodeHoveringCallback3(int, void*); -// extern void callbackMiniMapNodeHoveringCallback4(int, void*); -// extern void callbackMiniMapNodeHoveringCallback5(int, void*); -// extern void callbackMiniMapNodeHoveringCallback6(int, void*); -// extern void callbackMiniMapNodeHoveringCallback7(int, void*); -// extern void callbackMiniMapNodeHoveringCallback8(int, void*); -// extern void callbackMiniMapNodeHoveringCallback9(int, void*); -// extern void callbackMiniMapNodeHoveringCallback10(int, void*); -// extern void callbackMiniMapNodeHoveringCallback11(int, void*); -// extern void callbackMiniMapNodeHoveringCallback12(int, void*); -// extern void callbackMiniMapNodeHoveringCallback13(int, void*); -// extern void callbackMiniMapNodeHoveringCallback14(int, void*); -// extern void callbackMiniMapNodeHoveringCallback15(int, void*); -// extern void callbackMiniMapNodeHoveringCallback16(int, void*); -// extern void callbackMiniMapNodeHoveringCallback17(int, void*); -// extern void callbackMiniMapNodeHoveringCallback18(int, void*); -// extern void callbackMiniMapNodeHoveringCallback19(int, void*); -// extern void callbackMiniMapNodeHoveringCallback20(int, void*); -// extern void callbackMiniMapNodeHoveringCallback21(int, void*); -// extern void callbackMiniMapNodeHoveringCallback22(int, void*); -// extern void callbackMiniMapNodeHoveringCallback23(int, void*); -// extern void callbackMiniMapNodeHoveringCallback24(int, void*); -// extern void callbackMiniMapNodeHoveringCallback25(int, void*); -// extern void callbackMiniMapNodeHoveringCallback26(int, void*); -// extern void callbackMiniMapNodeHoveringCallback27(int, void*); -// extern void callbackMiniMapNodeHoveringCallback28(int, void*); -// extern void callbackMiniMapNodeHoveringCallback29(int, void*); -// extern void callbackMiniMapNodeHoveringCallback30(int, void*); -// extern void callbackMiniMapNodeHoveringCallback31(int, void*); import "C" -import ( - "unsafe" - - "github.com/AllenDang/cimgui-go/internal" -) +import "github.com/AllenDang/cimgui-go/internal" type EmulateThreeButtonMouse struct { CData *C.EmulateThreeButtonMouse @@ -129,227 +93,6 @@ func NewIOFromC[SRC any](cvalue SRC) *IO { return &IO{CData: internal.ReinterpretCast[*C.ImNodesIO](cvalue)} } -type ( - MiniMapNodeHoveringCallback func(arg0 int32, arg1 unsafe.Pointer) - cMiniMapNodeHoveringCallback func(arg0 C.int, arg1 unsafe.Pointer) -) - -func NewMiniMapNodeHoveringCallbackFromC(cvalue *C.ImNodesMiniMapNodeHoveringCallback) *MiniMapNodeHoveringCallback { - result := poolMiniMapNodeHoveringCallback.Find(*cvalue) - return &result -} - -func (c MiniMapNodeHoveringCallback) C() (C.ImNodesMiniMapNodeHoveringCallback, func()) { - return poolMiniMapNodeHoveringCallback.Allocate(c), func() {} -} - -func wrapMiniMapNodeHoveringCallback(cb MiniMapNodeHoveringCallback, arg0 C.int, arg1 unsafe.Pointer) { - cb(int32(arg0), unsafe.Pointer(arg1)) -} - -//export callbackMiniMapNodeHoveringCallback0 -func callbackMiniMapNodeHoveringCallback0(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(0), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback1 -func callbackMiniMapNodeHoveringCallback1(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(1), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback2 -func callbackMiniMapNodeHoveringCallback2(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(2), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback3 -func callbackMiniMapNodeHoveringCallback3(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(3), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback4 -func callbackMiniMapNodeHoveringCallback4(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(4), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback5 -func callbackMiniMapNodeHoveringCallback5(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(5), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback6 -func callbackMiniMapNodeHoveringCallback6(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(6), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback7 -func callbackMiniMapNodeHoveringCallback7(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(7), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback8 -func callbackMiniMapNodeHoveringCallback8(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(8), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback9 -func callbackMiniMapNodeHoveringCallback9(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(9), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback10 -func callbackMiniMapNodeHoveringCallback10(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(10), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback11 -func callbackMiniMapNodeHoveringCallback11(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(11), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback12 -func callbackMiniMapNodeHoveringCallback12(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(12), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback13 -func callbackMiniMapNodeHoveringCallback13(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(13), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback14 -func callbackMiniMapNodeHoveringCallback14(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(14), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback15 -func callbackMiniMapNodeHoveringCallback15(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(15), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback16 -func callbackMiniMapNodeHoveringCallback16(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(16), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback17 -func callbackMiniMapNodeHoveringCallback17(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(17), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback18 -func callbackMiniMapNodeHoveringCallback18(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(18), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback19 -func callbackMiniMapNodeHoveringCallback19(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(19), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback20 -func callbackMiniMapNodeHoveringCallback20(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(20), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback21 -func callbackMiniMapNodeHoveringCallback21(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(21), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback22 -func callbackMiniMapNodeHoveringCallback22(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(22), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback23 -func callbackMiniMapNodeHoveringCallback23(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(23), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback24 -func callbackMiniMapNodeHoveringCallback24(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(24), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback25 -func callbackMiniMapNodeHoveringCallback25(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(25), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback26 -func callbackMiniMapNodeHoveringCallback26(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(26), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback27 -func callbackMiniMapNodeHoveringCallback27(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(27), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback28 -func callbackMiniMapNodeHoveringCallback28(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(28), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback29 -func callbackMiniMapNodeHoveringCallback29(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(29), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback30 -func callbackMiniMapNodeHoveringCallback30(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(30), arg0, arg1) -} - -//export callbackMiniMapNodeHoveringCallback31 -func callbackMiniMapNodeHoveringCallback31(arg0 C.int, arg1 unsafe.Pointer) { - wrapMiniMapNodeHoveringCallback(poolMiniMapNodeHoveringCallback.Get(31), arg0, arg1) -} - -var poolMiniMapNodeHoveringCallback *internal.Pool[MiniMapNodeHoveringCallback, C.ImNodesMiniMapNodeHoveringCallback] - -func init() { - poolMiniMapNodeHoveringCallback = internal.NewPool[MiniMapNodeHoveringCallback, C.ImNodesMiniMapNodeHoveringCallback]( - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback0), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback1), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback2), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback3), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback4), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback5), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback6), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback7), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback8), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback9), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback10), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback11), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback12), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback13), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback14), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback15), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback16), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback17), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback18), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback19), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback20), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback21), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback22), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback23), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback24), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback25), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback26), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback27), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback28), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback29), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback30), - C.ImNodesMiniMapNodeHoveringCallback(C.callbackMiniMapNodeHoveringCallback31), - ) -} - -func ClearMiniMapNodeHoveringCallbackPool() { - poolMiniMapNodeHoveringCallback.Clear() -} - type MiniMapNodeHoveringCallbackUserData struct { Data uintptr } diff --git a/implot/cimplot_callbacks.go b/implot/cimplot_callbacks.go new file mode 100644 index 00000000..b8354233 --- /dev/null +++ b/implot/cimplot_callbacks.go @@ -0,0 +1,787 @@ +// Code generated by cmd/codegen from https://github.com/AllenDang/cimgui-go. +// DO NOT EDIT. + +package implot + +// #include +// #include +// #include "../imgui/extra_types.h" +// #include "cimplot_wrapper.h" +// #include "cimplot_typedefs.h" +// extern int callbackFormatter0(double, char*, int, void*); +// extern int callbackFormatter1(double, char*, int, void*); +// extern int callbackFormatter2(double, char*, int, void*); +// extern int callbackFormatter3(double, char*, int, void*); +// extern int callbackFormatter4(double, char*, int, void*); +// extern int callbackFormatter5(double, char*, int, void*); +// extern int callbackFormatter6(double, char*, int, void*); +// extern int callbackFormatter7(double, char*, int, void*); +// extern int callbackFormatter8(double, char*, int, void*); +// extern int callbackFormatter9(double, char*, int, void*); +// extern int callbackFormatter10(double, char*, int, void*); +// extern int callbackFormatter11(double, char*, int, void*); +// extern int callbackFormatter12(double, char*, int, void*); +// extern int callbackFormatter13(double, char*, int, void*); +// extern int callbackFormatter14(double, char*, int, void*); +// extern int callbackFormatter15(double, char*, int, void*); +// extern int callbackFormatter16(double, char*, int, void*); +// extern int callbackFormatter17(double, char*, int, void*); +// extern int callbackFormatter18(double, char*, int, void*); +// extern int callbackFormatter19(double, char*, int, void*); +// extern int callbackFormatter20(double, char*, int, void*); +// extern int callbackFormatter21(double, char*, int, void*); +// extern int callbackFormatter22(double, char*, int, void*); +// extern int callbackFormatter23(double, char*, int, void*); +// extern int callbackFormatter24(double, char*, int, void*); +// extern int callbackFormatter25(double, char*, int, void*); +// extern int callbackFormatter26(double, char*, int, void*); +// extern int callbackFormatter27(double, char*, int, void*); +// extern int callbackFormatter28(double, char*, int, void*); +// extern int callbackFormatter29(double, char*, int, void*); +// extern int callbackFormatter30(double, char*, int, void*); +// extern int callbackFormatter31(double, char*, int, void*); +// extern ImPlotPoint callbackter0(int, void*); +// extern ImPlotPoint callbackter1(int, void*); +// extern ImPlotPoint callbackter2(int, void*); +// extern ImPlotPoint callbackter3(int, void*); +// extern ImPlotPoint callbackter4(int, void*); +// extern ImPlotPoint callbackter5(int, void*); +// extern ImPlotPoint callbackter6(int, void*); +// extern ImPlotPoint callbackter7(int, void*); +// extern ImPlotPoint callbackter8(int, void*); +// extern ImPlotPoint callbackter9(int, void*); +// extern ImPlotPoint callbackter10(int, void*); +// extern ImPlotPoint callbackter11(int, void*); +// extern ImPlotPoint callbackter12(int, void*); +// extern ImPlotPoint callbackter13(int, void*); +// extern ImPlotPoint callbackter14(int, void*); +// extern ImPlotPoint callbackter15(int, void*); +// extern ImPlotPoint callbackter16(int, void*); +// extern ImPlotPoint callbackter17(int, void*); +// extern ImPlotPoint callbackter18(int, void*); +// extern ImPlotPoint callbackter19(int, void*); +// extern ImPlotPoint callbackter20(int, void*); +// extern ImPlotPoint callbackter21(int, void*); +// extern ImPlotPoint callbackter22(int, void*); +// extern ImPlotPoint callbackter23(int, void*); +// extern ImPlotPoint callbackter24(int, void*); +// extern ImPlotPoint callbackter25(int, void*); +// extern ImPlotPoint callbackter26(int, void*); +// extern ImPlotPoint callbackter27(int, void*); +// extern ImPlotPoint callbackter28(int, void*); +// extern ImPlotPoint callbackter29(int, void*); +// extern ImPlotPoint callbackter30(int, void*); +// extern ImPlotPoint callbackter31(int, void*); +// extern double callbackTransform0(double, void*); +// extern double callbackTransform1(double, void*); +// extern double callbackTransform2(double, void*); +// extern double callbackTransform3(double, void*); +// extern double callbackTransform4(double, void*); +// extern double callbackTransform5(double, void*); +// extern double callbackTransform6(double, void*); +// extern double callbackTransform7(double, void*); +// extern double callbackTransform8(double, void*); +// extern double callbackTransform9(double, void*); +// extern double callbackTransform10(double, void*); +// extern double callbackTransform11(double, void*); +// extern double callbackTransform12(double, void*); +// extern double callbackTransform13(double, void*); +// extern double callbackTransform14(double, void*); +// extern double callbackTransform15(double, void*); +// extern double callbackTransform16(double, void*); +// extern double callbackTransform17(double, void*); +// extern double callbackTransform18(double, void*); +// extern double callbackTransform19(double, void*); +// extern double callbackTransform20(double, void*); +// extern double callbackTransform21(double, void*); +// extern double callbackTransform22(double, void*); +// extern double callbackTransform23(double, void*); +// extern double callbackTransform24(double, void*); +// extern double callbackTransform25(double, void*); +// extern double callbackTransform26(double, void*); +// extern double callbackTransform27(double, void*); +// extern double callbackTransform28(double, void*); +// extern double callbackTransform29(double, void*); +// extern double callbackTransform30(double, void*); +// extern double callbackTransform31(double, void*); +import "C" +import ( + "unsafe" + + "github.com/AllenDang/cimgui-go/internal" +) + +type ( + Formatter func(value float64, buff string, size int32, user_data unsafe.Pointer) int32 + cFormatter func(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int +) + +func NewFormatterFromC(cvalue *C.ImPlotFormatter) *Formatter { + result := poolFormatter.Find(*cvalue) + return &result +} + +func (c Formatter) C() (C.ImPlotFormatter, func()) { + return poolFormatter.Allocate(c), func() {} +} + +func wrapFormatter(cb Formatter, value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + result := cb(float64(value), C.GoString(buff), int32(size), unsafe.Pointer(user_data)) + + defer func() { + }() + return C.int(result) +} + +//export callbackFormatter0 +func callbackFormatter0(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(0), value, buff, size, user_data) +} + +//export callbackFormatter1 +func callbackFormatter1(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(1), value, buff, size, user_data) +} + +//export callbackFormatter2 +func callbackFormatter2(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(2), value, buff, size, user_data) +} + +//export callbackFormatter3 +func callbackFormatter3(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(3), value, buff, size, user_data) +} + +//export callbackFormatter4 +func callbackFormatter4(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(4), value, buff, size, user_data) +} + +//export callbackFormatter5 +func callbackFormatter5(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(5), value, buff, size, user_data) +} + +//export callbackFormatter6 +func callbackFormatter6(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(6), value, buff, size, user_data) +} + +//export callbackFormatter7 +func callbackFormatter7(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(7), value, buff, size, user_data) +} + +//export callbackFormatter8 +func callbackFormatter8(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(8), value, buff, size, user_data) +} + +//export callbackFormatter9 +func callbackFormatter9(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(9), value, buff, size, user_data) +} + +//export callbackFormatter10 +func callbackFormatter10(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(10), value, buff, size, user_data) +} + +//export callbackFormatter11 +func callbackFormatter11(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(11), value, buff, size, user_data) +} + +//export callbackFormatter12 +func callbackFormatter12(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(12), value, buff, size, user_data) +} + +//export callbackFormatter13 +func callbackFormatter13(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(13), value, buff, size, user_data) +} + +//export callbackFormatter14 +func callbackFormatter14(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(14), value, buff, size, user_data) +} + +//export callbackFormatter15 +func callbackFormatter15(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(15), value, buff, size, user_data) +} + +//export callbackFormatter16 +func callbackFormatter16(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(16), value, buff, size, user_data) +} + +//export callbackFormatter17 +func callbackFormatter17(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(17), value, buff, size, user_data) +} + +//export callbackFormatter18 +func callbackFormatter18(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(18), value, buff, size, user_data) +} + +//export callbackFormatter19 +func callbackFormatter19(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(19), value, buff, size, user_data) +} + +//export callbackFormatter20 +func callbackFormatter20(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(20), value, buff, size, user_data) +} + +//export callbackFormatter21 +func callbackFormatter21(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(21), value, buff, size, user_data) +} + +//export callbackFormatter22 +func callbackFormatter22(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(22), value, buff, size, user_data) +} + +//export callbackFormatter23 +func callbackFormatter23(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(23), value, buff, size, user_data) +} + +//export callbackFormatter24 +func callbackFormatter24(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(24), value, buff, size, user_data) +} + +//export callbackFormatter25 +func callbackFormatter25(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(25), value, buff, size, user_data) +} + +//export callbackFormatter26 +func callbackFormatter26(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(26), value, buff, size, user_data) +} + +//export callbackFormatter27 +func callbackFormatter27(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(27), value, buff, size, user_data) +} + +//export callbackFormatter28 +func callbackFormatter28(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(28), value, buff, size, user_data) +} + +//export callbackFormatter29 +func callbackFormatter29(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(29), value, buff, size, user_data) +} + +//export callbackFormatter30 +func callbackFormatter30(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(30), value, buff, size, user_data) +} + +//export callbackFormatter31 +func callbackFormatter31(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { + return wrapFormatter(poolFormatter.Get(31), value, buff, size, user_data) +} + +var poolFormatter *internal.Pool[Formatter, C.ImPlotFormatter] + +func init() { + poolFormatter = internal.NewPool[Formatter, C.ImPlotFormatter]( + C.ImPlotFormatter(C.callbackFormatter0), + C.ImPlotFormatter(C.callbackFormatter1), + C.ImPlotFormatter(C.callbackFormatter2), + C.ImPlotFormatter(C.callbackFormatter3), + C.ImPlotFormatter(C.callbackFormatter4), + C.ImPlotFormatter(C.callbackFormatter5), + C.ImPlotFormatter(C.callbackFormatter6), + C.ImPlotFormatter(C.callbackFormatter7), + C.ImPlotFormatter(C.callbackFormatter8), + C.ImPlotFormatter(C.callbackFormatter9), + C.ImPlotFormatter(C.callbackFormatter10), + C.ImPlotFormatter(C.callbackFormatter11), + C.ImPlotFormatter(C.callbackFormatter12), + C.ImPlotFormatter(C.callbackFormatter13), + C.ImPlotFormatter(C.callbackFormatter14), + C.ImPlotFormatter(C.callbackFormatter15), + C.ImPlotFormatter(C.callbackFormatter16), + C.ImPlotFormatter(C.callbackFormatter17), + C.ImPlotFormatter(C.callbackFormatter18), + C.ImPlotFormatter(C.callbackFormatter19), + C.ImPlotFormatter(C.callbackFormatter20), + C.ImPlotFormatter(C.callbackFormatter21), + C.ImPlotFormatter(C.callbackFormatter22), + C.ImPlotFormatter(C.callbackFormatter23), + C.ImPlotFormatter(C.callbackFormatter24), + C.ImPlotFormatter(C.callbackFormatter25), + C.ImPlotFormatter(C.callbackFormatter26), + C.ImPlotFormatter(C.callbackFormatter27), + C.ImPlotFormatter(C.callbackFormatter28), + C.ImPlotFormatter(C.callbackFormatter29), + C.ImPlotFormatter(C.callbackFormatter30), + C.ImPlotFormatter(C.callbackFormatter31), + ) +} + +func ClearFormatterPool() { + poolFormatter.Clear() +} + +type ( + ter func(idx int32, user_data unsafe.Pointer) PlotPoint + cter func(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint +) + +func NewterFromC(cvalue *C.ImPlotGetter) *ter { + result := poolter.Find(*cvalue) + return &result +} + +func (c ter) C() (C.ImPlotGetter, func()) { + return poolter.Allocate(c), func() {} +} + +func wrapter(cb ter, idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + result := cb(int32(idx), unsafe.Pointer(user_data)) + + defer func() { + }() + return internal.ReinterpretCast[C.ImPlotPoint](result.ToC()) +} + +//export callbackter0 +func callbackter0(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(0), idx, user_data) +} + +//export callbackter1 +func callbackter1(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(1), idx, user_data) +} + +//export callbackter2 +func callbackter2(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(2), idx, user_data) +} + +//export callbackter3 +func callbackter3(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(3), idx, user_data) +} + +//export callbackter4 +func callbackter4(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(4), idx, user_data) +} + +//export callbackter5 +func callbackter5(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(5), idx, user_data) +} + +//export callbackter6 +func callbackter6(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(6), idx, user_data) +} + +//export callbackter7 +func callbackter7(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(7), idx, user_data) +} + +//export callbackter8 +func callbackter8(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(8), idx, user_data) +} + +//export callbackter9 +func callbackter9(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(9), idx, user_data) +} + +//export callbackter10 +func callbackter10(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(10), idx, user_data) +} + +//export callbackter11 +func callbackter11(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(11), idx, user_data) +} + +//export callbackter12 +func callbackter12(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(12), idx, user_data) +} + +//export callbackter13 +func callbackter13(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(13), idx, user_data) +} + +//export callbackter14 +func callbackter14(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(14), idx, user_data) +} + +//export callbackter15 +func callbackter15(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(15), idx, user_data) +} + +//export callbackter16 +func callbackter16(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(16), idx, user_data) +} + +//export callbackter17 +func callbackter17(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(17), idx, user_data) +} + +//export callbackter18 +func callbackter18(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(18), idx, user_data) +} + +//export callbackter19 +func callbackter19(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(19), idx, user_data) +} + +//export callbackter20 +func callbackter20(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(20), idx, user_data) +} + +//export callbackter21 +func callbackter21(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(21), idx, user_data) +} + +//export callbackter22 +func callbackter22(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(22), idx, user_data) +} + +//export callbackter23 +func callbackter23(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(23), idx, user_data) +} + +//export callbackter24 +func callbackter24(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(24), idx, user_data) +} + +//export callbackter25 +func callbackter25(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(25), idx, user_data) +} + +//export callbackter26 +func callbackter26(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(26), idx, user_data) +} + +//export callbackter27 +func callbackter27(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(27), idx, user_data) +} + +//export callbackter28 +func callbackter28(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(28), idx, user_data) +} + +//export callbackter29 +func callbackter29(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(29), idx, user_data) +} + +//export callbackter30 +func callbackter30(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(30), idx, user_data) +} + +//export callbackter31 +func callbackter31(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { + return wrapter(poolter.Get(31), idx, user_data) +} + +var poolter *internal.Pool[ter, C.ImPlotGetter] + +func init() { + poolter = internal.NewPool[ter, C.ImPlotGetter]( + C.ImPlotGetter(C.callbackter0), + C.ImPlotGetter(C.callbackter1), + C.ImPlotGetter(C.callbackter2), + C.ImPlotGetter(C.callbackter3), + C.ImPlotGetter(C.callbackter4), + C.ImPlotGetter(C.callbackter5), + C.ImPlotGetter(C.callbackter6), + C.ImPlotGetter(C.callbackter7), + C.ImPlotGetter(C.callbackter8), + C.ImPlotGetter(C.callbackter9), + C.ImPlotGetter(C.callbackter10), + C.ImPlotGetter(C.callbackter11), + C.ImPlotGetter(C.callbackter12), + C.ImPlotGetter(C.callbackter13), + C.ImPlotGetter(C.callbackter14), + C.ImPlotGetter(C.callbackter15), + C.ImPlotGetter(C.callbackter16), + C.ImPlotGetter(C.callbackter17), + C.ImPlotGetter(C.callbackter18), + C.ImPlotGetter(C.callbackter19), + C.ImPlotGetter(C.callbackter20), + C.ImPlotGetter(C.callbackter21), + C.ImPlotGetter(C.callbackter22), + C.ImPlotGetter(C.callbackter23), + C.ImPlotGetter(C.callbackter24), + C.ImPlotGetter(C.callbackter25), + C.ImPlotGetter(C.callbackter26), + C.ImPlotGetter(C.callbackter27), + C.ImPlotGetter(C.callbackter28), + C.ImPlotGetter(C.callbackter29), + C.ImPlotGetter(C.callbackter30), + C.ImPlotGetter(C.callbackter31), + ) +} + +func ClearterPool() { + poolter.Clear() +} + +type ( + Transform func(value float64, user_data unsafe.Pointer) float64 + cTransform func(value C.double, user_data unsafe.Pointer) C.double +) + +func NewTransformFromC(cvalue *C.ImPlotTransform) *Transform { + result := poolTransform.Find(*cvalue) + return &result +} + +func (c Transform) C() (C.ImPlotTransform, func()) { + return poolTransform.Allocate(c), func() {} +} + +func wrapTransform(cb Transform, value C.double, user_data unsafe.Pointer) C.double { + result := cb(float64(value), unsafe.Pointer(user_data)) + + defer func() { + }() + return C.double(result) +} + +//export callbackTransform0 +func callbackTransform0(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(0), value, user_data) +} + +//export callbackTransform1 +func callbackTransform1(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(1), value, user_data) +} + +//export callbackTransform2 +func callbackTransform2(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(2), value, user_data) +} + +//export callbackTransform3 +func callbackTransform3(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(3), value, user_data) +} + +//export callbackTransform4 +func callbackTransform4(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(4), value, user_data) +} + +//export callbackTransform5 +func callbackTransform5(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(5), value, user_data) +} + +//export callbackTransform6 +func callbackTransform6(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(6), value, user_data) +} + +//export callbackTransform7 +func callbackTransform7(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(7), value, user_data) +} + +//export callbackTransform8 +func callbackTransform8(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(8), value, user_data) +} + +//export callbackTransform9 +func callbackTransform9(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(9), value, user_data) +} + +//export callbackTransform10 +func callbackTransform10(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(10), value, user_data) +} + +//export callbackTransform11 +func callbackTransform11(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(11), value, user_data) +} + +//export callbackTransform12 +func callbackTransform12(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(12), value, user_data) +} + +//export callbackTransform13 +func callbackTransform13(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(13), value, user_data) +} + +//export callbackTransform14 +func callbackTransform14(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(14), value, user_data) +} + +//export callbackTransform15 +func callbackTransform15(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(15), value, user_data) +} + +//export callbackTransform16 +func callbackTransform16(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(16), value, user_data) +} + +//export callbackTransform17 +func callbackTransform17(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(17), value, user_data) +} + +//export callbackTransform18 +func callbackTransform18(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(18), value, user_data) +} + +//export callbackTransform19 +func callbackTransform19(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(19), value, user_data) +} + +//export callbackTransform20 +func callbackTransform20(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(20), value, user_data) +} + +//export callbackTransform21 +func callbackTransform21(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(21), value, user_data) +} + +//export callbackTransform22 +func callbackTransform22(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(22), value, user_data) +} + +//export callbackTransform23 +func callbackTransform23(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(23), value, user_data) +} + +//export callbackTransform24 +func callbackTransform24(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(24), value, user_data) +} + +//export callbackTransform25 +func callbackTransform25(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(25), value, user_data) +} + +//export callbackTransform26 +func callbackTransform26(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(26), value, user_data) +} + +//export callbackTransform27 +func callbackTransform27(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(27), value, user_data) +} + +//export callbackTransform28 +func callbackTransform28(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(28), value, user_data) +} + +//export callbackTransform29 +func callbackTransform29(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(29), value, user_data) +} + +//export callbackTransform30 +func callbackTransform30(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(30), value, user_data) +} + +//export callbackTransform31 +func callbackTransform31(value C.double, user_data unsafe.Pointer) C.double { + return wrapTransform(poolTransform.Get(31), value, user_data) +} + +var poolTransform *internal.Pool[Transform, C.ImPlotTransform] + +func init() { + poolTransform = internal.NewPool[Transform, C.ImPlotTransform]( + C.ImPlotTransform(C.callbackTransform0), + C.ImPlotTransform(C.callbackTransform1), + C.ImPlotTransform(C.callbackTransform2), + C.ImPlotTransform(C.callbackTransform3), + C.ImPlotTransform(C.callbackTransform4), + C.ImPlotTransform(C.callbackTransform5), + C.ImPlotTransform(C.callbackTransform6), + C.ImPlotTransform(C.callbackTransform7), + C.ImPlotTransform(C.callbackTransform8), + C.ImPlotTransform(C.callbackTransform9), + C.ImPlotTransform(C.callbackTransform10), + C.ImPlotTransform(C.callbackTransform11), + C.ImPlotTransform(C.callbackTransform12), + C.ImPlotTransform(C.callbackTransform13), + C.ImPlotTransform(C.callbackTransform14), + C.ImPlotTransform(C.callbackTransform15), + C.ImPlotTransform(C.callbackTransform16), + C.ImPlotTransform(C.callbackTransform17), + C.ImPlotTransform(C.callbackTransform18), + C.ImPlotTransform(C.callbackTransform19), + C.ImPlotTransform(C.callbackTransform20), + C.ImPlotTransform(C.callbackTransform21), + C.ImPlotTransform(C.callbackTransform22), + C.ImPlotTransform(C.callbackTransform23), + C.ImPlotTransform(C.callbackTransform24), + C.ImPlotTransform(C.callbackTransform25), + C.ImPlotTransform(C.callbackTransform26), + C.ImPlotTransform(C.callbackTransform27), + C.ImPlotTransform(C.callbackTransform28), + C.ImPlotTransform(C.callbackTransform29), + C.ImPlotTransform(C.callbackTransform30), + C.ImPlotTransform(C.callbackTransform31), + ) +} + +func ClearTransformPool() { + poolTransform.Clear() +} diff --git a/implot/cimplot_typedefs.go b/implot/cimplot_typedefs.go index 4afbaaf5..7c785602 100644 --- a/implot/cimplot_typedefs.go +++ b/implot/cimplot_typedefs.go @@ -8,108 +8,8 @@ package implot // #include "../imgui/extra_types.h" // #include "cimplot_wrapper.h" // #include "cimplot_typedefs.h" -// extern int callbackFormatter0(double, char*, int, void*); -// extern int callbackFormatter1(double, char*, int, void*); -// extern int callbackFormatter2(double, char*, int, void*); -// extern int callbackFormatter3(double, char*, int, void*); -// extern int callbackFormatter4(double, char*, int, void*); -// extern int callbackFormatter5(double, char*, int, void*); -// extern int callbackFormatter6(double, char*, int, void*); -// extern int callbackFormatter7(double, char*, int, void*); -// extern int callbackFormatter8(double, char*, int, void*); -// extern int callbackFormatter9(double, char*, int, void*); -// extern int callbackFormatter10(double, char*, int, void*); -// extern int callbackFormatter11(double, char*, int, void*); -// extern int callbackFormatter12(double, char*, int, void*); -// extern int callbackFormatter13(double, char*, int, void*); -// extern int callbackFormatter14(double, char*, int, void*); -// extern int callbackFormatter15(double, char*, int, void*); -// extern int callbackFormatter16(double, char*, int, void*); -// extern int callbackFormatter17(double, char*, int, void*); -// extern int callbackFormatter18(double, char*, int, void*); -// extern int callbackFormatter19(double, char*, int, void*); -// extern int callbackFormatter20(double, char*, int, void*); -// extern int callbackFormatter21(double, char*, int, void*); -// extern int callbackFormatter22(double, char*, int, void*); -// extern int callbackFormatter23(double, char*, int, void*); -// extern int callbackFormatter24(double, char*, int, void*); -// extern int callbackFormatter25(double, char*, int, void*); -// extern int callbackFormatter26(double, char*, int, void*); -// extern int callbackFormatter27(double, char*, int, void*); -// extern int callbackFormatter28(double, char*, int, void*); -// extern int callbackFormatter29(double, char*, int, void*); -// extern int callbackFormatter30(double, char*, int, void*); -// extern int callbackFormatter31(double, char*, int, void*); -// extern ImPlotPoint callbackter0(int, void*); -// extern ImPlotPoint callbackter1(int, void*); -// extern ImPlotPoint callbackter2(int, void*); -// extern ImPlotPoint callbackter3(int, void*); -// extern ImPlotPoint callbackter4(int, void*); -// extern ImPlotPoint callbackter5(int, void*); -// extern ImPlotPoint callbackter6(int, void*); -// extern ImPlotPoint callbackter7(int, void*); -// extern ImPlotPoint callbackter8(int, void*); -// extern ImPlotPoint callbackter9(int, void*); -// extern ImPlotPoint callbackter10(int, void*); -// extern ImPlotPoint callbackter11(int, void*); -// extern ImPlotPoint callbackter12(int, void*); -// extern ImPlotPoint callbackter13(int, void*); -// extern ImPlotPoint callbackter14(int, void*); -// extern ImPlotPoint callbackter15(int, void*); -// extern ImPlotPoint callbackter16(int, void*); -// extern ImPlotPoint callbackter17(int, void*); -// extern ImPlotPoint callbackter18(int, void*); -// extern ImPlotPoint callbackter19(int, void*); -// extern ImPlotPoint callbackter20(int, void*); -// extern ImPlotPoint callbackter21(int, void*); -// extern ImPlotPoint callbackter22(int, void*); -// extern ImPlotPoint callbackter23(int, void*); -// extern ImPlotPoint callbackter24(int, void*); -// extern ImPlotPoint callbackter25(int, void*); -// extern ImPlotPoint callbackter26(int, void*); -// extern ImPlotPoint callbackter27(int, void*); -// extern ImPlotPoint callbackter28(int, void*); -// extern ImPlotPoint callbackter29(int, void*); -// extern ImPlotPoint callbackter30(int, void*); -// extern ImPlotPoint callbackter31(int, void*); -// extern double callbackTransform0(double, void*); -// extern double callbackTransform1(double, void*); -// extern double callbackTransform2(double, void*); -// extern double callbackTransform3(double, void*); -// extern double callbackTransform4(double, void*); -// extern double callbackTransform5(double, void*); -// extern double callbackTransform6(double, void*); -// extern double callbackTransform7(double, void*); -// extern double callbackTransform8(double, void*); -// extern double callbackTransform9(double, void*); -// extern double callbackTransform10(double, void*); -// extern double callbackTransform11(double, void*); -// extern double callbackTransform12(double, void*); -// extern double callbackTransform13(double, void*); -// extern double callbackTransform14(double, void*); -// extern double callbackTransform15(double, void*); -// extern double callbackTransform16(double, void*); -// extern double callbackTransform17(double, void*); -// extern double callbackTransform18(double, void*); -// extern double callbackTransform19(double, void*); -// extern double callbackTransform20(double, void*); -// extern double callbackTransform21(double, void*); -// extern double callbackTransform22(double, void*); -// extern double callbackTransform23(double, void*); -// extern double callbackTransform24(double, void*); -// extern double callbackTransform25(double, void*); -// extern double callbackTransform26(double, void*); -// extern double callbackTransform27(double, void*); -// extern double callbackTransform28(double, void*); -// extern double callbackTransform29(double, void*); -// extern double callbackTransform30(double, void*); -// extern double callbackTransform31(double, void*); import "C" -import ( - "unsafe" - - "github.com/AllenDang/cimgui-go/internal" -) +import "github.com/AllenDang/cimgui-go/internal" type FormatterTimeData struct { CData *C.Formatter_Time_Data @@ -334,456 +234,6 @@ func NewDateTimeSpecFromC[SRC any](cvalue SRC) *DateTimeSpec { return &DateTimeSpec{CData: internal.ReinterpretCast[*C.ImPlotDateTimeSpec](cvalue)} } -type ( - Formatter func(value float64, buff string, size int32, user_data unsafe.Pointer) int32 - cFormatter func(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int -) - -func NewFormatterFromC(cvalue *C.ImPlotFormatter) *Formatter { - result := poolFormatter.Find(*cvalue) - return &result -} - -func (c Formatter) C() (C.ImPlotFormatter, func()) { - return poolFormatter.Allocate(c), func() {} -} - -func wrapFormatter(cb Formatter, value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - result := cb(float64(value), C.GoString(buff), int32(size), unsafe.Pointer(user_data)) - - defer func() { - }() - return C.int(result) -} - -//export callbackFormatter0 -func callbackFormatter0(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(0), value, buff, size, user_data) -} - -//export callbackFormatter1 -func callbackFormatter1(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(1), value, buff, size, user_data) -} - -//export callbackFormatter2 -func callbackFormatter2(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(2), value, buff, size, user_data) -} - -//export callbackFormatter3 -func callbackFormatter3(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(3), value, buff, size, user_data) -} - -//export callbackFormatter4 -func callbackFormatter4(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(4), value, buff, size, user_data) -} - -//export callbackFormatter5 -func callbackFormatter5(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(5), value, buff, size, user_data) -} - -//export callbackFormatter6 -func callbackFormatter6(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(6), value, buff, size, user_data) -} - -//export callbackFormatter7 -func callbackFormatter7(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(7), value, buff, size, user_data) -} - -//export callbackFormatter8 -func callbackFormatter8(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(8), value, buff, size, user_data) -} - -//export callbackFormatter9 -func callbackFormatter9(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(9), value, buff, size, user_data) -} - -//export callbackFormatter10 -func callbackFormatter10(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(10), value, buff, size, user_data) -} - -//export callbackFormatter11 -func callbackFormatter11(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(11), value, buff, size, user_data) -} - -//export callbackFormatter12 -func callbackFormatter12(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(12), value, buff, size, user_data) -} - -//export callbackFormatter13 -func callbackFormatter13(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(13), value, buff, size, user_data) -} - -//export callbackFormatter14 -func callbackFormatter14(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(14), value, buff, size, user_data) -} - -//export callbackFormatter15 -func callbackFormatter15(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(15), value, buff, size, user_data) -} - -//export callbackFormatter16 -func callbackFormatter16(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(16), value, buff, size, user_data) -} - -//export callbackFormatter17 -func callbackFormatter17(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(17), value, buff, size, user_data) -} - -//export callbackFormatter18 -func callbackFormatter18(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(18), value, buff, size, user_data) -} - -//export callbackFormatter19 -func callbackFormatter19(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(19), value, buff, size, user_data) -} - -//export callbackFormatter20 -func callbackFormatter20(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(20), value, buff, size, user_data) -} - -//export callbackFormatter21 -func callbackFormatter21(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(21), value, buff, size, user_data) -} - -//export callbackFormatter22 -func callbackFormatter22(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(22), value, buff, size, user_data) -} - -//export callbackFormatter23 -func callbackFormatter23(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(23), value, buff, size, user_data) -} - -//export callbackFormatter24 -func callbackFormatter24(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(24), value, buff, size, user_data) -} - -//export callbackFormatter25 -func callbackFormatter25(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(25), value, buff, size, user_data) -} - -//export callbackFormatter26 -func callbackFormatter26(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(26), value, buff, size, user_data) -} - -//export callbackFormatter27 -func callbackFormatter27(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(27), value, buff, size, user_data) -} - -//export callbackFormatter28 -func callbackFormatter28(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(28), value, buff, size, user_data) -} - -//export callbackFormatter29 -func callbackFormatter29(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(29), value, buff, size, user_data) -} - -//export callbackFormatter30 -func callbackFormatter30(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(30), value, buff, size, user_data) -} - -//export callbackFormatter31 -func callbackFormatter31(value C.double, buff *C.char, size C.int, user_data unsafe.Pointer) C.int { - return wrapFormatter(poolFormatter.Get(31), value, buff, size, user_data) -} - -var poolFormatter *internal.Pool[Formatter, C.ImPlotFormatter] - -func init() { - poolFormatter = internal.NewPool[Formatter, C.ImPlotFormatter]( - C.ImPlotFormatter(C.callbackFormatter0), - C.ImPlotFormatter(C.callbackFormatter1), - C.ImPlotFormatter(C.callbackFormatter2), - C.ImPlotFormatter(C.callbackFormatter3), - C.ImPlotFormatter(C.callbackFormatter4), - C.ImPlotFormatter(C.callbackFormatter5), - C.ImPlotFormatter(C.callbackFormatter6), - C.ImPlotFormatter(C.callbackFormatter7), - C.ImPlotFormatter(C.callbackFormatter8), - C.ImPlotFormatter(C.callbackFormatter9), - C.ImPlotFormatter(C.callbackFormatter10), - C.ImPlotFormatter(C.callbackFormatter11), - C.ImPlotFormatter(C.callbackFormatter12), - C.ImPlotFormatter(C.callbackFormatter13), - C.ImPlotFormatter(C.callbackFormatter14), - C.ImPlotFormatter(C.callbackFormatter15), - C.ImPlotFormatter(C.callbackFormatter16), - C.ImPlotFormatter(C.callbackFormatter17), - C.ImPlotFormatter(C.callbackFormatter18), - C.ImPlotFormatter(C.callbackFormatter19), - C.ImPlotFormatter(C.callbackFormatter20), - C.ImPlotFormatter(C.callbackFormatter21), - C.ImPlotFormatter(C.callbackFormatter22), - C.ImPlotFormatter(C.callbackFormatter23), - C.ImPlotFormatter(C.callbackFormatter24), - C.ImPlotFormatter(C.callbackFormatter25), - C.ImPlotFormatter(C.callbackFormatter26), - C.ImPlotFormatter(C.callbackFormatter27), - C.ImPlotFormatter(C.callbackFormatter28), - C.ImPlotFormatter(C.callbackFormatter29), - C.ImPlotFormatter(C.callbackFormatter30), - C.ImPlotFormatter(C.callbackFormatter31), - ) -} - -func ClearFormatterPool() { - poolFormatter.Clear() -} - -type ( - ter func(idx int32, user_data unsafe.Pointer) PlotPoint - cter func(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint -) - -func NewterFromC(cvalue *C.ImPlotGetter) *ter { - result := poolter.Find(*cvalue) - return &result -} - -func (c ter) C() (C.ImPlotGetter, func()) { - return poolter.Allocate(c), func() {} -} - -func wrapter(cb ter, idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - result := cb(int32(idx), unsafe.Pointer(user_data)) - - defer func() { - }() - return internal.ReinterpretCast[C.ImPlotPoint](result.ToC()) -} - -//export callbackter0 -func callbackter0(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(0), idx, user_data) -} - -//export callbackter1 -func callbackter1(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(1), idx, user_data) -} - -//export callbackter2 -func callbackter2(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(2), idx, user_data) -} - -//export callbackter3 -func callbackter3(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(3), idx, user_data) -} - -//export callbackter4 -func callbackter4(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(4), idx, user_data) -} - -//export callbackter5 -func callbackter5(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(5), idx, user_data) -} - -//export callbackter6 -func callbackter6(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(6), idx, user_data) -} - -//export callbackter7 -func callbackter7(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(7), idx, user_data) -} - -//export callbackter8 -func callbackter8(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(8), idx, user_data) -} - -//export callbackter9 -func callbackter9(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(9), idx, user_data) -} - -//export callbackter10 -func callbackter10(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(10), idx, user_data) -} - -//export callbackter11 -func callbackter11(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(11), idx, user_data) -} - -//export callbackter12 -func callbackter12(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(12), idx, user_data) -} - -//export callbackter13 -func callbackter13(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(13), idx, user_data) -} - -//export callbackter14 -func callbackter14(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(14), idx, user_data) -} - -//export callbackter15 -func callbackter15(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(15), idx, user_data) -} - -//export callbackter16 -func callbackter16(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(16), idx, user_data) -} - -//export callbackter17 -func callbackter17(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(17), idx, user_data) -} - -//export callbackter18 -func callbackter18(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(18), idx, user_data) -} - -//export callbackter19 -func callbackter19(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(19), idx, user_data) -} - -//export callbackter20 -func callbackter20(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(20), idx, user_data) -} - -//export callbackter21 -func callbackter21(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(21), idx, user_data) -} - -//export callbackter22 -func callbackter22(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(22), idx, user_data) -} - -//export callbackter23 -func callbackter23(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(23), idx, user_data) -} - -//export callbackter24 -func callbackter24(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(24), idx, user_data) -} - -//export callbackter25 -func callbackter25(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(25), idx, user_data) -} - -//export callbackter26 -func callbackter26(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(26), idx, user_data) -} - -//export callbackter27 -func callbackter27(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(27), idx, user_data) -} - -//export callbackter28 -func callbackter28(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(28), idx, user_data) -} - -//export callbackter29 -func callbackter29(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(29), idx, user_data) -} - -//export callbackter30 -func callbackter30(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(30), idx, user_data) -} - -//export callbackter31 -func callbackter31(idx C.int, user_data unsafe.Pointer) C.ImPlotPoint { - return wrapter(poolter.Get(31), idx, user_data) -} - -var poolter *internal.Pool[ter, C.ImPlotGetter] - -func init() { - poolter = internal.NewPool[ter, C.ImPlotGetter]( - C.ImPlotGetter(C.callbackter0), - C.ImPlotGetter(C.callbackter1), - C.ImPlotGetter(C.callbackter2), - C.ImPlotGetter(C.callbackter3), - C.ImPlotGetter(C.callbackter4), - C.ImPlotGetter(C.callbackter5), - C.ImPlotGetter(C.callbackter6), - C.ImPlotGetter(C.callbackter7), - C.ImPlotGetter(C.callbackter8), - C.ImPlotGetter(C.callbackter9), - C.ImPlotGetter(C.callbackter10), - C.ImPlotGetter(C.callbackter11), - C.ImPlotGetter(C.callbackter12), - C.ImPlotGetter(C.callbackter13), - C.ImPlotGetter(C.callbackter14), - C.ImPlotGetter(C.callbackter15), - C.ImPlotGetter(C.callbackter16), - C.ImPlotGetter(C.callbackter17), - C.ImPlotGetter(C.callbackter18), - C.ImPlotGetter(C.callbackter19), - C.ImPlotGetter(C.callbackter20), - C.ImPlotGetter(C.callbackter21), - C.ImPlotGetter(C.callbackter22), - C.ImPlotGetter(C.callbackter23), - C.ImPlotGetter(C.callbackter24), - C.ImPlotGetter(C.callbackter25), - C.ImPlotGetter(C.callbackter26), - C.ImPlotGetter(C.callbackter27), - C.ImPlotGetter(C.callbackter28), - C.ImPlotGetter(C.callbackter29), - C.ImPlotGetter(C.callbackter30), - C.ImPlotGetter(C.callbackter31), - ) -} - -func ClearterPool() { - poolter.Clear() -} - type InputMap struct { CData *C.ImPlotInputMap } @@ -1199,228 +649,3 @@ func NewEmptyTicker() *Ticker { func NewTickerFromC[SRC any](cvalue SRC) *Ticker { return &Ticker{CData: internal.ReinterpretCast[*C.ImPlotTicker](cvalue)} } - -type ( - Transform func(value float64, user_data unsafe.Pointer) float64 - cTransform func(value C.double, user_data unsafe.Pointer) C.double -) - -func NewTransformFromC(cvalue *C.ImPlotTransform) *Transform { - result := poolTransform.Find(*cvalue) - return &result -} - -func (c Transform) C() (C.ImPlotTransform, func()) { - return poolTransform.Allocate(c), func() {} -} - -func wrapTransform(cb Transform, value C.double, user_data unsafe.Pointer) C.double { - result := cb(float64(value), unsafe.Pointer(user_data)) - - defer func() { - }() - return C.double(result) -} - -//export callbackTransform0 -func callbackTransform0(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(0), value, user_data) -} - -//export callbackTransform1 -func callbackTransform1(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(1), value, user_data) -} - -//export callbackTransform2 -func callbackTransform2(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(2), value, user_data) -} - -//export callbackTransform3 -func callbackTransform3(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(3), value, user_data) -} - -//export callbackTransform4 -func callbackTransform4(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(4), value, user_data) -} - -//export callbackTransform5 -func callbackTransform5(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(5), value, user_data) -} - -//export callbackTransform6 -func callbackTransform6(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(6), value, user_data) -} - -//export callbackTransform7 -func callbackTransform7(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(7), value, user_data) -} - -//export callbackTransform8 -func callbackTransform8(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(8), value, user_data) -} - -//export callbackTransform9 -func callbackTransform9(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(9), value, user_data) -} - -//export callbackTransform10 -func callbackTransform10(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(10), value, user_data) -} - -//export callbackTransform11 -func callbackTransform11(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(11), value, user_data) -} - -//export callbackTransform12 -func callbackTransform12(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(12), value, user_data) -} - -//export callbackTransform13 -func callbackTransform13(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(13), value, user_data) -} - -//export callbackTransform14 -func callbackTransform14(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(14), value, user_data) -} - -//export callbackTransform15 -func callbackTransform15(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(15), value, user_data) -} - -//export callbackTransform16 -func callbackTransform16(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(16), value, user_data) -} - -//export callbackTransform17 -func callbackTransform17(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(17), value, user_data) -} - -//export callbackTransform18 -func callbackTransform18(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(18), value, user_data) -} - -//export callbackTransform19 -func callbackTransform19(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(19), value, user_data) -} - -//export callbackTransform20 -func callbackTransform20(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(20), value, user_data) -} - -//export callbackTransform21 -func callbackTransform21(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(21), value, user_data) -} - -//export callbackTransform22 -func callbackTransform22(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(22), value, user_data) -} - -//export callbackTransform23 -func callbackTransform23(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(23), value, user_data) -} - -//export callbackTransform24 -func callbackTransform24(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(24), value, user_data) -} - -//export callbackTransform25 -func callbackTransform25(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(25), value, user_data) -} - -//export callbackTransform26 -func callbackTransform26(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(26), value, user_data) -} - -//export callbackTransform27 -func callbackTransform27(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(27), value, user_data) -} - -//export callbackTransform28 -func callbackTransform28(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(28), value, user_data) -} - -//export callbackTransform29 -func callbackTransform29(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(29), value, user_data) -} - -//export callbackTransform30 -func callbackTransform30(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(30), value, user_data) -} - -//export callbackTransform31 -func callbackTransform31(value C.double, user_data unsafe.Pointer) C.double { - return wrapTransform(poolTransform.Get(31), value, user_data) -} - -var poolTransform *internal.Pool[Transform, C.ImPlotTransform] - -func init() { - poolTransform = internal.NewPool[Transform, C.ImPlotTransform]( - C.ImPlotTransform(C.callbackTransform0), - C.ImPlotTransform(C.callbackTransform1), - C.ImPlotTransform(C.callbackTransform2), - C.ImPlotTransform(C.callbackTransform3), - C.ImPlotTransform(C.callbackTransform4), - C.ImPlotTransform(C.callbackTransform5), - C.ImPlotTransform(C.callbackTransform6), - C.ImPlotTransform(C.callbackTransform7), - C.ImPlotTransform(C.callbackTransform8), - C.ImPlotTransform(C.callbackTransform9), - C.ImPlotTransform(C.callbackTransform10), - C.ImPlotTransform(C.callbackTransform11), - C.ImPlotTransform(C.callbackTransform12), - C.ImPlotTransform(C.callbackTransform13), - C.ImPlotTransform(C.callbackTransform14), - C.ImPlotTransform(C.callbackTransform15), - C.ImPlotTransform(C.callbackTransform16), - C.ImPlotTransform(C.callbackTransform17), - C.ImPlotTransform(C.callbackTransform18), - C.ImPlotTransform(C.callbackTransform19), - C.ImPlotTransform(C.callbackTransform20), - C.ImPlotTransform(C.callbackTransform21), - C.ImPlotTransform(C.callbackTransform22), - C.ImPlotTransform(C.callbackTransform23), - C.ImPlotTransform(C.callbackTransform24), - C.ImPlotTransform(C.callbackTransform25), - C.ImPlotTransform(C.callbackTransform26), - C.ImPlotTransform(C.callbackTransform27), - C.ImPlotTransform(C.callbackTransform28), - C.ImPlotTransform(C.callbackTransform29), - C.ImPlotTransform(C.callbackTransform30), - C.ImPlotTransform(C.callbackTransform31), - ) -} - -func ClearTransformPool() { - poolTransform.Clear() -}