From ce499f13c76346c9a3498ffd8434197e3ac9857c Mon Sep 17 00:00:00 2001 From: gucio321 <73652197+gucio321@users.noreply.github.com> Date: Mon, 19 Dec 2022 20:59:31 +0100 Subject: [PATCH 1/8] codegen: extract argWrapper map into separated function; put it in arguments_wrapper.go --- cmd/codegen/arguments_wrapper.go | 77 ++++++++++++++++++++++++++++++++ cmd/codegen/gengo.go | 71 +---------------------------- 2 files changed, 78 insertions(+), 70 deletions(-) diff --git a/cmd/codegen/arguments_wrapper.go b/cmd/codegen/arguments_wrapper.go index ae3edf5d3..6ad37a186 100644 --- a/cmd/codegen/arguments_wrapper.go +++ b/cmd/codegen/arguments_wrapper.go @@ -5,6 +5,83 @@ import "fmt" type typeWrapper func(arg ArgDef) (argType string, def string, varName string) +func argWrapper(argType string) (wrapper typeWrapper, err error) { + argWrapperMap := map[string]typeWrapper{ + "char*": constCharW, + "const char*": constCharW, + "const char**": charPtrPtrW, + "const char* const[]": charPtrPtrW, + "unsigned char": ucharW, + "unsigned char**": uCharPtrW, + "size_t": sizeTW, + "size_t*": sizeTPtrW, + "float": floatW, + "float*": floatPtrW, + "const float*": floatArrayW, + "short": shortW, + "unsigned short": ushortW, + "ImU8": u8W, + "const ImU8*": u8SliceW, + "ImU16": u16W, + "const ImU16*": u16SliceW, + "ImU32": u32W, + "const ImU32*": u32SliceW, + "ImU64": u64W, + "const ImU64*": uint64ArrayW, + "ImS8": s8W, + "const ImS8*": s8SliceW, + "ImS16": s16W, + "const ImS16*": s16SliceW, + "ImS32": s32W, + "const ImS32*": s32SliceW, + "const ImS64*": int64ArrayW, + "int": intW, + "int*": intPtrW, + "unsigned int": uintW, + "unsigned int*": uintPtrW, + "double": doubleW, + "double*": doublePtrW, + "bool": boolW, + "bool*": boolPtrW, + "int[2]": int2W, + "int[3]": int3W, + "int[4]": int4W, + "float[2]": float2W, + "float[3]": float3W, + "float[4]": float4W, + "ImWchar": imWcharW, + "const ImWchar*": imWcharPtrW, + "ImGuiID": imGuiIDW, + "ImTextureID": imTextureIDW, + "ImDrawIdx": imDrawIdxW, + "ImGuiTableColumnIdx": imTableColumnIdxW, + "ImGuiTableDrawChannelIdx": imTableDrawChannelIdxW, + "void*": voidPtrW, + "const void*": voidPtrW, + "const ImVec2": imVec2W, + "const ImVec2*": imVec2PtrW, + "ImVec2": imVec2W, + "ImVec2*": imVec2PtrW, + "ImVec2[2]": imVec22W, + "const ImVec4": imVec4W, + "const ImVec4*": imVec4PtrW, + "ImVec4": imVec4W, + "ImVec4*": imVec4PtrW, + "ImColor*": imColorPtrW, + "ImRect": imRectW, + "ImRect*": imRectPtrW, + "ImPlotPoint": imPlotPointW, + "const ImPlotPoint": imPlotPointW, + "ImPlotPoint*": imPlotPointPtrW, + } + + if wrapper, ok := argWrapperMap[argType]; ok { + return wrapper, nil + } + + return nil, fmt.Errorf("no wrapper for type %s", argType) +} + func constCharW(arg ArgDef) (argType string, def string, varName string) { argType = "string" def = fmt.Sprintf(`%[1]sArg, %[1]sFin := wrapString(%[1]s) diff --git a/cmd/codegen/gengo.go b/cmd/codegen/gengo.go index eda999174..c6ae18a8c 100644 --- a/cmd/codegen/gengo.go +++ b/cmd/codegen/gengo.go @@ -140,75 +140,6 @@ import "unsafe" `, prefix)) - argWrapperMap := map[string]typeWrapper{ - "char*": constCharW, - "const char*": constCharW, - "const char**": charPtrPtrW, - "const char* const[]": charPtrPtrW, - "unsigned char": ucharW, - "unsigned char**": uCharPtrW, - "size_t": sizeTW, - "size_t*": sizeTPtrW, - "float": floatW, - "float*": floatPtrW, - "const float*": floatArrayW, - "short": shortW, - "unsigned short": ushortW, - "ImU8": u8W, - "const ImU8*": u8SliceW, - "ImU16": u16W, - "const ImU16*": u16SliceW, - "ImU32": u32W, - "const ImU32*": u32SliceW, - "ImU64": u64W, - "const ImU64*": uint64ArrayW, - "ImS8": s8W, - "const ImS8*": s8SliceW, - "ImS16": s16W, - "const ImS16*": s16SliceW, - "ImS32": s32W, - "const ImS32*": s32SliceW, - "const ImS64*": int64ArrayW, - "int": intW, - "int*": intPtrW, - "unsigned int": uintW, - "unsigned int*": uintPtrW, - "double": doubleW, - "double*": doublePtrW, - "bool": boolW, - "bool*": boolPtrW, - "int[2]": int2W, - "int[3]": int3W, - "int[4]": int4W, - "float[2]": float2W, - "float[3]": float3W, - "float[4]": float4W, - "ImWchar": imWcharW, - "const ImWchar*": imWcharPtrW, - "ImGuiID": imGuiIDW, - "ImTextureID": imTextureIDW, - "ImDrawIdx": imDrawIdxW, - "ImGuiTableColumnIdx": imTableColumnIdxW, - "ImGuiTableDrawChannelIdx": imTableDrawChannelIdxW, - "void*": voidPtrW, - "const void*": voidPtrW, - "const ImVec2": imVec2W, - "const ImVec2*": imVec2PtrW, - "ImVec2": imVec2W, - "ImVec2*": imVec2PtrW, - "ImVec2[2]": imVec22W, - "const ImVec4": imVec4W, - "const ImVec4*": imVec4PtrW, - "ImVec4": imVec4W, - "ImVec4*": imVec4PtrW, - "ImColor*": imColorPtrW, - "ImRect": imRectW, - "ImRect*": imRectPtrW, - "ImPlotPoint": imPlotPointW, - "const ImPlotPoint": imPlotPointW, - "ImPlotPoint*": imPlotPointPtrW, - } - returnWrapperMap := map[string]returnWrapper{ "bool": boolReturnW, "char*": constCharReturnW, @@ -298,7 +229,7 @@ import "unsafe" continue } - if v, ok := argWrapperMap[a.Type]; ok { + if v, err := argWrapper(a.Type); err != nil { argType, argDef, varName := v(a) if goEnumName := trimImGuiPrefix(argType); isEnum(goEnumName) { argType = goEnumName From de4b915c09f07408b30db4526faa37480780ff4e Mon Sep 17 00:00:00 2001 From: gucio321 <73652197+gucio321@users.noreply.github.com> Date: Mon, 19 Dec 2022 21:00:19 +0100 Subject: [PATCH 2/8] codegen: rename typeWrapper -> argumentWrapper --- cmd/codegen/arguments_wrapper.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/codegen/arguments_wrapper.go b/cmd/codegen/arguments_wrapper.go index 6ad37a186..d493fd369 100644 --- a/cmd/codegen/arguments_wrapper.go +++ b/cmd/codegen/arguments_wrapper.go @@ -3,10 +3,10 @@ package main import "C" import "fmt" -type typeWrapper func(arg ArgDef) (argType string, def string, varName string) +type argumentWrapper func(arg ArgDef) (argType string, def string, varName string) -func argWrapper(argType string) (wrapper typeWrapper, err error) { - argWrapperMap := map[string]typeWrapper{ +func argWrapper(argType string) (wrapper argumentWrapper, err error) { + argWrapperMap := map[string]argumentWrapper{ "char*": constCharW, "const char*": constCharW, "const char**": charPtrPtrW, From c62658bf05b64eaa69b750e833f31b00852ed29a Mon Sep 17 00:00:00 2001 From: gucio321 <73652197+gucio321@users.noreply.github.com> Date: Mon, 19 Dec 2022 21:13:58 +0100 Subject: [PATCH 3/8] gengo: extrat nested function an typedef --- cmd/codegen/gengo.go | 56 ++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/cmd/codegen/gengo.go b/cmd/codegen/gengo.go index c6ae18a8c..c44875a7d 100644 --- a/cmd/codegen/gengo.go +++ b/cmd/codegen/gengo.go @@ -172,12 +172,6 @@ import "unsafe" "size_t": doubleReturnW, } - type argOutput struct { - ArgType string - ArgDef string - VarName string - } - isEnum := func(argType string) bool { for _, en := range enumNames { if argType == en { @@ -229,7 +223,7 @@ import "unsafe" continue } - if v, err := argWrapper(a.Type); err != nil { + if v, err := argWrapper(a.Type); err == nil { argType, argDef, varName := v(a) if goEnumName := trimImGuiPrefix(argType); isEnum(goEnumName) { argType = goEnumName @@ -289,19 +283,6 @@ import "unsafe" fmt.Printf("generated: %s%s\n", f.FuncName, f.Args) } - // Generate function args - argStmtFunc := func() string { - var invokeStmt []string - for _, aw := range argWrappers { - invokeStmt = append(invokeStmt, aw.VarName) - if len(aw.ArgDef) > 0 { - sb.WriteString(fmt.Sprintf("%s\n\n", aw.ArgDef)) - } - } - - return strings.Join(invokeStmt, ",") - } - skipStructs := []string{ "ImVec1", "ImVec2", @@ -387,7 +368,7 @@ import "unsafe" // temporary out arg definition sb.WriteString(fmt.Sprintf("%s := &%s{}\n", outArg.Name, outArgT)) - argInvokeStmt := argStmtFunc() + argInvokeStmt := argStmtFunc(argWrappers, &sb) // C function call sb.WriteString(fmt.Sprintf("C.%s(%s)\n", f.FuncName, argInvokeStmt)) @@ -408,14 +389,14 @@ import "unsafe" sb.WriteString(fmt.Sprintf("func (self %[1]s) %[2]s(%[3]s) {\n", funcParts[0], funcName, strings.Join(args, ","))) - argInvokeStmt := argStmtFunc() + argInvokeStmt := argStmtFunc(argWrappers, &sb) sb.WriteString(fmt.Sprintf("C.%s(self.handle(), %s)\n", f.FuncName, argInvokeStmt)) sb.WriteString("}\n\n") } else { sb.WriteString(funcSignatureFunc(f.FuncName, args, "")) - argInvokeStmt := argStmtFunc() + argInvokeStmt := argStmtFunc(argWrappers, &sb) sb.WriteString(fmt.Sprintf("C.%s(%s)\n", f.FuncName, argInvokeStmt)) sb.WriteString("}\n\n") @@ -428,7 +409,7 @@ import "unsafe" sb.WriteString(funcSignatureFunc(f.FuncName, args, returnType)) - argInvokeStmt := argStmtFunc() + argInvokeStmt := argStmtFunc(argWrappers, &sb) sb.WriteString(fmt.Sprintf(returnStmt, fmt.Sprintf("C.%s(%s)", f.FuncName, argInvokeStmt))) sb.WriteString("}\n\n") @@ -439,7 +420,7 @@ import "unsafe" sb.WriteString(funcSignatureFunc(f.FuncName, args, returnType)) - argInvokeStmt := argStmtFunc() + argInvokeStmt := argStmtFunc(argWrappers, &sb) sb.WriteString(fmt.Sprintf("return %s(%s)", returnType, fmt.Sprintf("C.%s(%s)", f.FuncName, argInvokeStmt))) sb.WriteString("}\n\n") @@ -452,7 +433,7 @@ import "unsafe" sb.WriteString(funcSignatureFunc(f.FuncName, args, pureReturnType)) - argInvokeStmt := argStmtFunc() + argInvokeStmt := argStmtFunc(argWrappers, &sb) sb.WriteString(fmt.Sprintf("return (%s)(unsafe.Pointer(%s))", pureReturnType, fmt.Sprintf("C.%s(%s)", f.FuncName, argInvokeStmt))) sb.WriteString("}\n\n") @@ -461,7 +442,7 @@ import "unsafe" } else if f.StructGetter && funk.ContainsString(structNames, f.Ret) { sb.WriteString(funcSignatureFunc(f.FuncName, args, f.Ret)) - argInvokeStmt := argStmtFunc() + argInvokeStmt := argStmtFunc(argWrappers, &sb) sb.WriteString(fmt.Sprintf("return new%sFromC(C.%s(%s))", f.Ret, f.FuncName, argInvokeStmt)) sb.WriteString("}\n\n") @@ -489,7 +470,7 @@ import "unsafe" sb.WriteString(fmt.Sprintf("func %s(%s) %s {\n", newFuncName, strings.Join(args, ","), returnType)) - argInvokeStmt := argStmtFunc() + argInvokeStmt := argStmtFunc(argWrappers, &sb) sb.WriteString(fmt.Sprintf("return (%s)(unsafe.Pointer(C.%s(%s)))", returnType, f.FuncName, argInvokeStmt)) @@ -512,3 +493,22 @@ import "unsafe" _, _ = goFile.WriteString(sb.String()) } + +type argOutput struct { + ArgType string + ArgDef string + VarName string +} + +// Generate function args +func argStmtFunc(argWrappers []argOutput, sb *strings.Builder) string { + var invokeStmt []string + for _, aw := range argWrappers { + invokeStmt = append(invokeStmt, aw.VarName) + if len(aw.ArgDef) > 0 { + sb.WriteString(fmt.Sprintf("%s\n\n", aw.ArgDef)) + } + } + + return strings.Join(invokeStmt, ",") +} From b81edbc122780d84c593b6d4e30c6a9f06f94ab7 Mon Sep 17 00:00:00 2001 From: gucio321 <73652197+gucio321@users.noreply.github.com> Date: Mon, 19 Dec 2022 21:17:43 +0100 Subject: [PATCH 4/8] codegen: extract return types' wrappers map --- cmd/codegen/gengo.go | 38 +++------------------------------ cmd/codegen/return_wrapper.go | 40 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 35 deletions(-) diff --git a/cmd/codegen/gengo.go b/cmd/codegen/gengo.go index c44875a7d..55b60bfc2 100644 --- a/cmd/codegen/gengo.go +++ b/cmd/codegen/gengo.go @@ -140,38 +140,6 @@ import "unsafe" `, prefix)) - returnWrapperMap := map[string]returnWrapper{ - "bool": boolReturnW, - "char*": constCharReturnW, - "const char*": constCharReturnW, - "const ImWchar*": constWCharPtrReturnW, - "ImWchar": imWcharReturnW, - "float": floatReturnW, - "double": doubleReturnW, - "int": intReturnW, - "unsigned int": uintReturnW, - "short": intReturnW, - "ImS8": intReturnW, - "ImS16": intReturnW, - "ImS32": intReturnW, - "ImU8": uintReturnW, - "ImU16": uintReturnW, - "ImU32": u32ReturnW, - "ImU64": uint64ReturnW, - "ImVec4": imVec4ReturnW, - "const ImVec4*": imVec4PtrReturnW, - "ImGuiID": idReturnW, - "ImTextureID": textureIdReturnW, - "ImVec2": imVec2ReturnW, - "ImColor": imColorReturnW, - "ImPlotPoint": imPlotPointReturnW, - "ImRect": imRectReturnW, - "ImGuiTableColumnIdx": imTableColumnIdxReturnW, - "ImGuiTableDrawChannelIdx": imTableDrawChannelIdxReturnW, - "void*": voidPtrReturnW, - "size_t": doubleReturnW, - } - isEnum := func(argType string) bool { for _, en := range enumNames { if argType == en { @@ -355,8 +323,8 @@ import "unsafe" // find out the return type outArg := f.ArgsT[0] outArgT := strings.TrimSuffix(outArg.Type, "*") - returnWrapper, found := returnWrapperMap[outArgT] - if !found { + returnWrapper, err := getReturnTypeWrapperFunc(outArgT) + if err != nil { fmt.Printf("Unknown return type \"%s\" in function %s\n", f.Ret, f.FuncName) continue } @@ -404,7 +372,7 @@ import "unsafe" convertedFuncCount += 1 default: - if rf, ok := returnWrapperMap[f.Ret]; ok { + if rf, err := getReturnTypeWrapperFunc(f.Ret); err == nil { returnType, returnStmt := rf() sb.WriteString(funcSignatureFunc(f.FuncName, args, returnType)) diff --git a/cmd/codegen/return_wrapper.go b/cmd/codegen/return_wrapper.go index 540362540..67c7ced3d 100644 --- a/cmd/codegen/return_wrapper.go +++ b/cmd/codegen/return_wrapper.go @@ -5,6 +5,46 @@ import "fmt" // Wrapper for return value type returnWrapper func() (returnType string, returnStmt string) +func getReturnTypeWrapperFunc(returnType string) (returnWrapper, error) { + returnWrapperMap := map[string]returnWrapper{ + "bool": boolReturnW, + "char*": constCharReturnW, + "const char*": constCharReturnW, + "const ImWchar*": constWCharPtrReturnW, + "ImWchar": imWcharReturnW, + "float": floatReturnW, + "double": doubleReturnW, + "int": intReturnW, + "unsigned int": uintReturnW, + "short": intReturnW, + "ImS8": intReturnW, + "ImS16": intReturnW, + "ImS32": intReturnW, + "ImU8": uintReturnW, + "ImU16": uintReturnW, + "ImU32": u32ReturnW, + "ImU64": uint64ReturnW, + "ImVec4": imVec4ReturnW, + "const ImVec4*": imVec4PtrReturnW, + "ImGuiID": idReturnW, + "ImTextureID": textureIdReturnW, + "ImVec2": imVec2ReturnW, + "ImColor": imColorReturnW, + "ImPlotPoint": imPlotPointReturnW, + "ImRect": imRectReturnW, + "ImGuiTableColumnIdx": imTableColumnIdxReturnW, + "ImGuiTableDrawChannelIdx": imTableDrawChannelIdxReturnW, + "void*": voidPtrReturnW, + "size_t": doubleReturnW, + } + + if v, ok := returnWrapperMap[returnType]; ok { + return v, nil + } + + return nil, fmt.Errorf("return type %s not found", returnType) +} + func boolReturnW() (returnType string, returnStmt string) { returnType = "bool" returnStmt = "return %s == C.bool(true)\n" From 5d2457675f2c0a45c5af2d5a632bc140af7add93 Mon Sep 17 00:00:00 2001 From: gucio321 <73652197+gucio321@users.noreply.github.com> Date: Mon, 19 Dec 2022 21:19:57 +0100 Subject: [PATCH 5/8] gengo: remove redundant break stmt --- cmd/codegen/gengo.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/codegen/gengo.go b/cmd/codegen/gengo.go index 55b60bfc2..586b5c0d1 100644 --- a/cmd/codegen/gengo.go +++ b/cmd/codegen/gengo.go @@ -236,7 +236,6 @@ import "unsafe" if !shouldGenerate { fmt.Printf("Unknown argument type \"%s\" in function %s\n", a.Type, f.FuncName) - break } } From 561fcd8a8a885ef1759432ea5357fd38e1e2b29a Mon Sep 17 00:00:00 2001 From: gucio321 Date: Tue, 3 Jan 2023 08:29:22 +0100 Subject: [PATCH 6/8] codegen: remove unused code --- cmd/codegen/gengo.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/cmd/codegen/gengo.go b/cmd/codegen/gengo.go index 097470bb8..4620d1f88 100644 --- a/cmd/codegen/gengo.go +++ b/cmd/codegen/gengo.go @@ -9,24 +9,6 @@ import ( "github.com/thoas/go-funk" ) -type TypeMap struct { - GoType string - CgoWrapper string -} - -func tm(goType string, cgoWrapper string) *TypeMap { - return &TypeMap{ - GoType: goType, - CgoWrapper: cgoWrapper, - } -} - -var structMemberTypeMap = map[string]*TypeMap{ - "unsigned int": tm("uint32", "C.uint(%s)"), - "float": tm("float32", "C.float(%s)"), - "int": tm("int32", "C.int(%s)"), -} - func trimImGuiPrefix(id string) string { // don't trim prefixes for implot's ImAxis - it conflicts with ImGuIAxis (from imgui_internal.h) if strings.HasPrefix(id, "ImAxis") { From 2fdf8b05965a1f47dd6201747174ae582e5f1b47 Mon Sep 17 00:00:00 2001 From: gucio321 Date: Tue, 3 Jan 2023 08:35:56 +0100 Subject: [PATCH 7/8] cimgui-go: regenerate code --- cimgui_funcs.go | 113 ++++++ cimplot_funcs.go | 943 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 1055 insertions(+), 1 deletion(-) diff --git a/cimgui_funcs.go b/cimgui_funcs.go index 52962f8ea..3707bd408 100644 --- a/cimgui_funcs.go +++ b/cimgui_funcs.go @@ -112,6 +112,10 @@ func (self ImDrawList) AddBezierQuadraticV(p1 Vec2, p2 Vec2, p3 Vec2, col uint32 C.DrawList_AddBezierQuadraticV(self.handle(), p1.toC(), p2.toC(), p3.toC(), C.ImU32(col), C.float(thickness), C.int(num_segments)) } +func (self ImDrawList) AddCallback(callback_data unsafe.Pointer) { + C.DrawList_AddCallback(self.handle(), callback_data) +} + // DrawList_AddCircleV parameter default value hint: // num_segments: 0 // thickness: 1.0f @@ -1639,6 +1643,18 @@ func ColumnsV(count int32, id string, border bool) { C.ColumnsV(C.int(count), idArg, C.bool(border)) } +// Combo_FnBoolPtr parameter default value hint: +// popup_max_height_in_items: -1 +func Combo_FnBoolPtr(label string, current_item *int32, data unsafe.Pointer, items_count int32, popup_max_height_in_items int32) bool { + labelArg, labelFin := wrapString(label) + defer labelFin() + + current_itemArg, current_itemFin := wrapNumberPtr[C.int, int32](current_item) + defer current_itemFin() + + return C.Combo_FnBoolPtr(labelArg, current_itemArg, data, C.int(items_count), C.int(popup_max_height_in_items)) == C.bool(true) +} + // Combo_StrV parameter default value hint: // popup_max_height_in_items: -1 func Combo_StrV(label string, current_item *int32, items_separated_by_zeros string, popup_max_height_in_items int32) bool { @@ -2682,6 +2698,52 @@ func InputScalarNV(label string, data_type DataType, p_data unsafe.Pointer, comp return C.InputScalarNV(labelArg, C.ImGuiDataType(data_type), p_data, C.int(components), p_step, p_step_fast, formatArg, C.ImGuiInputTextFlags(flags)) == C.bool(true) } +// InputTextV parameter default value hint: +// callback: NULL +// flags: 0 +// user_data: NULL +func InputTextV(label string, buf string, buf_size uint64, flags InputTextFlags, user_data unsafe.Pointer) bool { + labelArg, labelFin := wrapString(label) + defer labelFin() + + bufArg, bufFin := wrapString(buf) + defer bufFin() + + return C.InputTextV(labelArg, bufArg, C.xlong(buf_size), C.ImGuiInputTextFlags(flags), user_data) == C.bool(true) +} + +// InputTextMultilineV parameter default value hint: +// callback: NULL +// flags: 0 +// size: ImVec2(0,0) +// user_data: NULL +func InputTextMultilineV(label string, buf string, buf_size uint64, size Vec2, flags InputTextFlags, user_data unsafe.Pointer) bool { + labelArg, labelFin := wrapString(label) + defer labelFin() + + bufArg, bufFin := wrapString(buf) + defer bufFin() + + return C.InputTextMultilineV(labelArg, bufArg, C.xlong(buf_size), size.toC(), C.ImGuiInputTextFlags(flags), user_data) == C.bool(true) +} + +// InputTextWithHintV parameter default value hint: +// callback: NULL +// flags: 0 +// user_data: NULL +func InputTextWithHintV(label string, hint string, buf string, buf_size uint64, flags InputTextFlags, user_data unsafe.Pointer) bool { + labelArg, labelFin := wrapString(label) + defer labelFin() + + hintArg, hintFin := wrapString(hint) + defer hintFin() + + bufArg, bufFin := wrapString(buf) + defer bufFin() + + return C.InputTextWithHintV(labelArg, hintArg, bufArg, C.xlong(buf_size), C.ImGuiInputTextFlags(flags), user_data) == C.bool(true) +} + // InvisibleButtonV parameter default value hint: // flags: 0 func InvisibleButtonV(str_id string, size Vec2, flags ButtonFlags) bool { @@ -2855,6 +2917,18 @@ func LabelText(label string, fmt string) { C.LabelText(labelArg, fmtArg) } +// ListBox_FnBoolPtr parameter default value hint: +// height_in_items: -1 +func ListBox_FnBoolPtr(label string, current_item *int32, data unsafe.Pointer, items_count int32, height_in_items int32) bool { + labelArg, labelFin := wrapString(label) + defer labelFin() + + current_itemArg, current_itemFin := wrapNumberPtr[C.int, int32](current_item) + defer current_itemFin() + + return C.ListBox_FnBoolPtr(labelArg, current_itemArg, data, C.int(items_count), C.int(height_in_items)) == C.bool(true) +} + // ListBox_Str_arrV parameter default value hint: // height_in_items: -1 func ListBox_Str_arrV(label string, current_item *int32, items []string, items_count int32, height_in_items int32) bool { @@ -3014,6 +3088,22 @@ func PlotHistogram_FloatPtrV(label string, values []float32, values_count int32, C.PlotHistogram_FloatPtrV(labelArg, (*C.float)(&(values[0])), C.int(values_count), C.int(values_offset), overlay_textArg, C.float(scale_min), C.float(scale_max), graph_size.toC(), C.int(stride)) } +// PlotHistogram_FnFloatPtr parameter default value hint: +// graph_size: ImVec2(0,0) +// overlay_text: NULL +// scale_max: FLT_MAX +// scale_min: FLT_MAX +// values_offset: 0 +func PlotHistogram_FnFloatPtr(label string, data unsafe.Pointer, values_count int32, values_offset int32, overlay_text string, scale_min float32, scale_max float32, graph_size Vec2) { + labelArg, labelFin := wrapString(label) + defer labelFin() + + overlay_textArg, overlay_textFin := wrapString(overlay_text) + defer overlay_textFin() + + C.PlotHistogram_FnFloatPtr(labelArg, data, C.int(values_count), C.int(values_offset), overlay_textArg, C.float(scale_min), C.float(scale_max), graph_size.toC()) +} + // PlotLines_FloatPtrV parameter default value hint: // graph_size: ImVec2(0,0) // overlay_text: NULL @@ -3031,6 +3121,22 @@ func PlotLines_FloatPtrV(label string, values []float32, values_count int32, val C.PlotLines_FloatPtrV(labelArg, (*C.float)(&(values[0])), C.int(values_count), C.int(values_offset), overlay_textArg, C.float(scale_min), C.float(scale_max), graph_size.toC(), C.int(stride)) } +// PlotLines_FnFloatPtr parameter default value hint: +// graph_size: ImVec2(0,0) +// overlay_text: NULL +// scale_max: FLT_MAX +// scale_min: FLT_MAX +// values_offset: 0 +func PlotLines_FnFloatPtr(label string, data unsafe.Pointer, values_count int32, values_offset int32, overlay_text string, scale_min float32, scale_max float32, graph_size Vec2) { + labelArg, labelFin := wrapString(label) + defer labelFin() + + overlay_textArg, overlay_textFin := wrapString(overlay_text) + defer overlay_textFin() + + C.PlotLines_FnFloatPtr(labelArg, data, C.int(values_count), C.int(values_offset), overlay_textArg, C.float(scale_min), C.float(scale_max), graph_size.toC()) +} + func PopAllowKeyboardFocus() { C.PopAllowKeyboardFocus() } @@ -3355,6 +3461,13 @@ func SetNextWindowSizeV(size Vec2, cond Cond) { C.SetNextWindowSizeV(size.toC(), C.ImGuiCond(cond)) } +// SetNextWindowSizeConstraintsV parameter default value hint: +// custom_callback: NULL +// custom_callback_data: NULL +func SetNextWindowSizeConstraintsV(size_min Vec2, size_max Vec2, custom_callback_data unsafe.Pointer) { + C.SetNextWindowSizeConstraintsV(size_min.toC(), size_max.toC(), custom_callback_data) +} + func SetNextWindowViewport(viewport_id ImGuiID) { C.SetNextWindowViewport(C.ImGuiID(viewport_id)) } diff --git a/cimplot_funcs.go b/cimplot_funcs.go index 756dbed58..fb486eaf8 100644 --- a/cimplot_funcs.go +++ b/cimplot_funcs.go @@ -791,6 +791,26 @@ func Plot_PlotBarGroups_U8PtrV(label_ids []string, values []*byte, item_count in C.Plot_PlotBarGroups_U8PtrV(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(item_count), C.int(group_count), C.double(group_size), C.double(shift), C.ImPlotBarGroupsFlags(flags)) } +// Plot_PlotBarGroups_doublePtrV parameter default value hint: +// flags: 0 +// group_size: 0.67 +// shift: 0 +func Plot_PlotBarGroups_doublePtrV(label_ids []string, item_count int32, group_count int32, group_size float64, shift float64, flags PlotBarGroupsFlags) { + label_idsArg, label_idsFin := wrapStringList(label_ids) + defer label_idsFin() + + C.Plot_PlotBarGroups_doublePtrV(label_idsArg, C.int(item_count), C.int(group_count), C.double(group_size), C.double(shift), C.ImPlotBarGroupsFlags(flags)) +} + +// Plot_PlotBarsGV parameter default value hint: +// flags: 0 +func Plot_PlotBarsGV(label_id string, data unsafe.Pointer, count int32, bar_size float64, flags PlotBarsFlags) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotBarsGV(label_idArg, data, C.int(count), C.double(bar_size), C.ImPlotBarsFlags(flags)) +} + // Plot_PlotBars_FloatPtrFloatPtrV parameter default value hint: // flags: 0 // offset: 0 @@ -1187,6 +1207,39 @@ func Plot_PlotBars_U8PtrU8PtrV(label_id string, xs []*byte, ys []*byte, count in C.Plot_PlotBars_U8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.double(bar_size), C.ImPlotBarsFlags(flags), C.int(offset), C.int(stride)) } +// Plot_PlotBars_doublePtrIntV parameter default value hint: +// bar_size: 0.67 +// flags: 0 +// offset: 0 +// shift: 0 +// stride: sizeof(double) +func Plot_PlotBars_doublePtrIntV(label_id string, count int32, bar_size float64, shift float64, flags PlotBarsFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotBars_doublePtrIntV(label_idArg, C.int(count), C.double(bar_size), C.double(shift), C.ImPlotBarsFlags(flags), C.int(offset), C.int(stride)) +} + +// Plot_PlotBars_doublePtrdoublePtrV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +func Plot_PlotBars_doublePtrdoublePtrV(label_id string, count int32, bar_size float64, flags PlotBarsFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotBars_doublePtrdoublePtrV(label_idArg, C.int(count), C.double(bar_size), C.ImPlotBarsFlags(flags), C.int(offset), C.int(stride)) +} + +// Plot_PlotDigitalGV parameter default value hint: +// flags: 0 +func Plot_PlotDigitalGV(label_id string, data unsafe.Pointer, count int32, flags PlotDigitalFlags) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotDigitalGV(label_idArg, data, C.int(count), C.ImPlotDigitalFlags(flags)) +} + // Plot_PlotDigital_FloatPtrV parameter default value hint: // flags: 0 // offset: 0 @@ -1406,6 +1459,17 @@ func Plot_PlotDigital_U8PtrV(label_id string, xs []*byte, ys []*byte, count int3 C.Plot_PlotDigital_U8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.ImPlotDigitalFlags(flags), C.int(offset), C.int(stride)) } +// Plot_PlotDigital_doublePtrV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +func Plot_PlotDigital_doublePtrV(label_id string, count int32, flags PlotDigitalFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotDigital_doublePtrV(label_idArg, C.int(count), C.ImPlotDigitalFlags(flags), C.int(offset), C.int(stride)) +} + // Plot_PlotDummyV parameter default value hint: // flags: 0 func Plot_PlotDummyV(label_id string, flags PlotDummyFlags) { @@ -2033,6 +2097,28 @@ func Plot_PlotErrorBars_U8PtrU8PtrU8PtrU8PtrV(label_id string, xs []*byte, ys [] C.Plot_PlotErrorBars_U8PtrU8PtrU8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), (*C.ImU8)(&negArg[0]), (*C.ImU8)(&posArg[0]), C.int(count), C.ImPlotErrorBarsFlags(flags), C.int(offset), C.int(stride)) } +// Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrIntV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +func Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrIntV(label_id string, count int32, flags PlotErrorBarsFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrIntV(label_idArg, C.int(count), C.ImPlotErrorBarsFlags(flags), C.int(offset), C.int(stride)) +} + +// Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrdoublePtrV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +func Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrdoublePtrV(label_id string, count int32, flags PlotErrorBarsFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrdoublePtrV(label_idArg, C.int(count), C.ImPlotErrorBarsFlags(flags), C.int(offset), C.int(stride)) +} + // Plot_PlotHeatmap_FloatPtrV parameter default value hint: // bounds_max: ImPlotPoint(1,1) // bounds_min: ImPlotPoint(0,0) @@ -2246,6 +2332,443 @@ func Plot_PlotHeatmap_U8PtrV(label_id string, values []*byte, rows int32, cols i C.Plot_PlotHeatmap_U8PtrV(label_idArg, (*C.ImU8)(&valuesArg[0]), C.int(rows), C.int(cols), C.double(scale_min), C.double(scale_max), label_fmtArg, bounds_min.toC(), bounds_max.toC(), C.ImPlotHeatmapFlags(flags)) } +// Plot_PlotHeatmap_doublePtrV parameter default value hint: +// bounds_max: ImPlotPoint(1,1) +// bounds_min: ImPlotPoint(0,0) +// flags: 0 +// label_fmt: "%.1f" +// scale_max: 0 +// scale_min: 0 +func Plot_PlotHeatmap_doublePtrV(label_id string, rows int32, cols int32, scale_min float64, scale_max float64, label_fmt string, bounds_min PlotPoint, bounds_max PlotPoint, flags PlotHeatmapFlags) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + label_fmtArg, label_fmtFin := wrapString(label_fmt) + defer label_fmtFin() + + C.Plot_PlotHeatmap_doublePtrV(label_idArg, C.int(rows), C.int(cols), C.double(scale_min), C.double(scale_max), label_fmtArg, bounds_min.toC(), bounds_max.toC(), C.ImPlotHeatmapFlags(flags)) +} + +// Plot_PlotHistogram2D_FloatPtrV parameter default value hint: +// flags: 0 +// range: ImPlotRect() +// x_bins: ImPlotBin_Sturges +// y_bins: ImPlotBin_Sturges +func Plot_PlotHistogram2D_FloatPtrV(label_id string, xs []float32, ys []float32, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + return float64(C.Plot_PlotHistogram2D_FloatPtrV(label_idArg, (*C.float)(&(xs[0])), (*C.float)(&(ys[0])), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram2D_S16PtrV parameter default value hint: +// flags: 0 +// range: ImPlotRect() +// x_bins: ImPlotBin_Sturges +// y_bins: ImPlotBin_Sturges +func Plot_PlotHistogram2D_S16PtrV(label_id string, xs []*int, ys []*int, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + xsArg := make([]C.ImS16, len(xs)) + for i, xsV := range xs { + xsArg[i] = C.ImS16(*xsV) + } + defer func() { + for i, xsV := range xsArg { + *xs[i] = int(xsV) + } + }() + + ysArg := make([]C.ImS16, len(ys)) + for i, ysV := range ys { + ysArg[i] = C.ImS16(*ysV) + } + defer func() { + for i, ysV := range ysArg { + *ys[i] = int(ysV) + } + }() + + return float64(C.Plot_PlotHistogram2D_S16PtrV(label_idArg, (*C.ImS16)(&xsArg[0]), (*C.ImS16)(&ysArg[0]), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram2D_S32PtrV parameter default value hint: +// flags: 0 +// range: ImPlotRect() +// x_bins: ImPlotBin_Sturges +// y_bins: ImPlotBin_Sturges +func Plot_PlotHistogram2D_S32PtrV(label_id string, xs []*int32, ys []*int32, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + xsArg := make([]C.ImS32, len(xs)) + for i, xsV := range xs { + xsArg[i] = C.ImS32(*xsV) + } + defer func() { + for i, xsV := range xsArg { + *xs[i] = int32(xsV) + } + }() + + ysArg := make([]C.ImS32, len(ys)) + for i, ysV := range ys { + ysArg[i] = C.ImS32(*ysV) + } + defer func() { + for i, ysV := range ysArg { + *ys[i] = int32(ysV) + } + }() + + return float64(C.Plot_PlotHistogram2D_S32PtrV(label_idArg, (*C.ImS32)(&xsArg[0]), (*C.ImS32)(&ysArg[0]), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram2D_S64PtrV parameter default value hint: +// flags: 0 +// range: ImPlotRect() +// x_bins: ImPlotBin_Sturges +// y_bins: ImPlotBin_Sturges +func Plot_PlotHistogram2D_S64PtrV(label_id string, xs []int64, ys []int64, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + return float64(C.Plot_PlotHistogram2D_S64PtrV(label_idArg, (*C.longlong)(&(xs[0])), (*C.longlong)(&(ys[0])), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram2D_S8PtrV parameter default value hint: +// flags: 0 +// range: ImPlotRect() +// x_bins: ImPlotBin_Sturges +// y_bins: ImPlotBin_Sturges +func Plot_PlotHistogram2D_S8PtrV(label_id string, xs []*int8, ys []*int8, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + xsArg := make([]C.ImS8, len(xs)) + for i, xsV := range xs { + xsArg[i] = C.ImS8(*xsV) + } + defer func() { + for i, xsV := range xsArg { + *xs[i] = int8(xsV) + } + }() + + ysArg := make([]C.ImS8, len(ys)) + for i, ysV := range ys { + ysArg[i] = C.ImS8(*ysV) + } + defer func() { + for i, ysV := range ysArg { + *ys[i] = int8(ysV) + } + }() + + return float64(C.Plot_PlotHistogram2D_S8PtrV(label_idArg, (*C.ImS8)(&xsArg[0]), (*C.ImS8)(&ysArg[0]), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram2D_U16PtrV parameter default value hint: +// flags: 0 +// range: ImPlotRect() +// x_bins: ImPlotBin_Sturges +// y_bins: ImPlotBin_Sturges +func Plot_PlotHistogram2D_U16PtrV(label_id string, xs []*uint16, ys []*uint16, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + xsArg := make([]C.ImU16, len(xs)) + for i, xsV := range xs { + xsArg[i] = C.ImU16(*xsV) + } + defer func() { + for i, xsV := range xsArg { + *xs[i] = uint16(xsV) + } + }() + + ysArg := make([]C.ImU16, len(ys)) + for i, ysV := range ys { + ysArg[i] = C.ImU16(*ysV) + } + defer func() { + for i, ysV := range ysArg { + *ys[i] = uint16(ysV) + } + }() + + return float64(C.Plot_PlotHistogram2D_U16PtrV(label_idArg, (*C.ImU16)(&xsArg[0]), (*C.ImU16)(&ysArg[0]), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram2D_U32PtrV parameter default value hint: +// flags: 0 +// range: ImPlotRect() +// x_bins: ImPlotBin_Sturges +// y_bins: ImPlotBin_Sturges +func Plot_PlotHistogram2D_U32PtrV(label_id string, xs []*uint32, ys []*uint32, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + xsArg := make([]C.ImU32, len(xs)) + for i, xsV := range xs { + xsArg[i] = C.ImU32(*xsV) + } + defer func() { + for i, xsV := range xsArg { + *xs[i] = uint32(xsV) + } + }() + + ysArg := make([]C.ImU32, len(ys)) + for i, ysV := range ys { + ysArg[i] = C.ImU32(*ysV) + } + defer func() { + for i, ysV := range ysArg { + *ys[i] = uint32(ysV) + } + }() + + return float64(C.Plot_PlotHistogram2D_U32PtrV(label_idArg, (*C.ImU32)(&xsArg[0]), (*C.ImU32)(&ysArg[0]), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram2D_U64PtrV parameter default value hint: +// flags: 0 +// range: ImPlotRect() +// x_bins: ImPlotBin_Sturges +// y_bins: ImPlotBin_Sturges +func Plot_PlotHistogram2D_U64PtrV(label_id string, xs []uint64, ys []uint64, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + return float64(C.Plot_PlotHistogram2D_U64PtrV(label_idArg, (*C.ulonglong)(&(xs[0])), (*C.ulonglong)(&(ys[0])), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram2D_U8PtrV parameter default value hint: +// flags: 0 +// range: ImPlotRect() +// x_bins: ImPlotBin_Sturges +// y_bins: ImPlotBin_Sturges +func Plot_PlotHistogram2D_U8PtrV(label_id string, xs []*byte, ys []*byte, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + xsArg := make([]C.ImU8, len(xs)) + for i, xsV := range xs { + xsArg[i] = C.ImU8(*xsV) + } + defer func() { + for i, xsV := range xsArg { + *xs[i] = byte(xsV) + } + }() + + ysArg := make([]C.ImU8, len(ys)) + for i, ysV := range ys { + ysArg[i] = C.ImU8(*ysV) + } + defer func() { + for i, ysV := range ysArg { + *ys[i] = byte(ysV) + } + }() + + return float64(C.Plot_PlotHistogram2D_U8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram2D_doublePtrV parameter default value hint: +// flags: 0 +// range: ImPlotRect() +// x_bins: ImPlotBin_Sturges +// y_bins: ImPlotBin_Sturges +func Plot_PlotHistogram2D_doublePtrV(label_id string, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + return float64(C.Plot_PlotHistogram2D_doublePtrV(label_idArg, C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram_FloatPtrV parameter default value hint: +// bar_scale: 1.0 +// bins: ImPlotBin_Sturges +// flags: 0 +// range: ImPlotRange() +func Plot_PlotHistogram_FloatPtrV(label_id string, values []float32, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + return float64(C.Plot_PlotHistogram_FloatPtrV(label_idArg, (*C.float)(&(values[0])), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram_S16PtrV parameter default value hint: +// bar_scale: 1.0 +// bins: ImPlotBin_Sturges +// flags: 0 +// range: ImPlotRange() +func Plot_PlotHistogram_S16PtrV(label_id string, values []*int, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + valuesArg := make([]C.ImS16, len(values)) + for i, valuesV := range values { + valuesArg[i] = C.ImS16(*valuesV) + } + defer func() { + for i, valuesV := range valuesArg { + *values[i] = int(valuesV) + } + }() + + return float64(C.Plot_PlotHistogram_S16PtrV(label_idArg, (*C.ImS16)(&valuesArg[0]), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram_S32PtrV parameter default value hint: +// bar_scale: 1.0 +// bins: ImPlotBin_Sturges +// flags: 0 +// range: ImPlotRange() +func Plot_PlotHistogram_S32PtrV(label_id string, values []*int32, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + valuesArg := make([]C.ImS32, len(values)) + for i, valuesV := range values { + valuesArg[i] = C.ImS32(*valuesV) + } + defer func() { + for i, valuesV := range valuesArg { + *values[i] = int32(valuesV) + } + }() + + return float64(C.Plot_PlotHistogram_S32PtrV(label_idArg, (*C.ImS32)(&valuesArg[0]), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram_S64PtrV parameter default value hint: +// bar_scale: 1.0 +// bins: ImPlotBin_Sturges +// flags: 0 +// range: ImPlotRange() +func Plot_PlotHistogram_S64PtrV(label_id string, values []int64, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + return float64(C.Plot_PlotHistogram_S64PtrV(label_idArg, (*C.longlong)(&(values[0])), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram_S8PtrV parameter default value hint: +// bar_scale: 1.0 +// bins: ImPlotBin_Sturges +// flags: 0 +// range: ImPlotRange() +func Plot_PlotHistogram_S8PtrV(label_id string, values []*int8, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + valuesArg := make([]C.ImS8, len(values)) + for i, valuesV := range values { + valuesArg[i] = C.ImS8(*valuesV) + } + defer func() { + for i, valuesV := range valuesArg { + *values[i] = int8(valuesV) + } + }() + + return float64(C.Plot_PlotHistogram_S8PtrV(label_idArg, (*C.ImS8)(&valuesArg[0]), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram_U16PtrV parameter default value hint: +// bar_scale: 1.0 +// bins: ImPlotBin_Sturges +// flags: 0 +// range: ImPlotRange() +func Plot_PlotHistogram_U16PtrV(label_id string, values []*uint16, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + valuesArg := make([]C.ImU16, len(values)) + for i, valuesV := range values { + valuesArg[i] = C.ImU16(*valuesV) + } + defer func() { + for i, valuesV := range valuesArg { + *values[i] = uint16(valuesV) + } + }() + + return float64(C.Plot_PlotHistogram_U16PtrV(label_idArg, (*C.ImU16)(&valuesArg[0]), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram_U32PtrV parameter default value hint: +// bar_scale: 1.0 +// bins: ImPlotBin_Sturges +// flags: 0 +// range: ImPlotRange() +func Plot_PlotHistogram_U32PtrV(label_id string, values []*uint32, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + valuesArg := make([]C.ImU32, len(values)) + for i, valuesV := range values { + valuesArg[i] = C.ImU32(*valuesV) + } + defer func() { + for i, valuesV := range valuesArg { + *values[i] = uint32(valuesV) + } + }() + + return float64(C.Plot_PlotHistogram_U32PtrV(label_idArg, (*C.ImU32)(&valuesArg[0]), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram_U64PtrV parameter default value hint: +// bar_scale: 1.0 +// bins: ImPlotBin_Sturges +// flags: 0 +// range: ImPlotRange() +func Plot_PlotHistogram_U64PtrV(label_id string, values []uint64, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + return float64(C.Plot_PlotHistogram_U64PtrV(label_idArg, (*C.ulonglong)(&(values[0])), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram_U8PtrV parameter default value hint: +// bar_scale: 1.0 +// bins: ImPlotBin_Sturges +// flags: 0 +// range: ImPlotRange() +func Plot_PlotHistogram_U8PtrV(label_id string, values []*byte, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + valuesArg := make([]C.ImU8, len(values)) + for i, valuesV := range values { + valuesArg[i] = C.ImU8(*valuesV) + } + defer func() { + for i, valuesV := range valuesArg { + *values[i] = byte(valuesV) + } + }() + + return float64(C.Plot_PlotHistogram_U8PtrV(label_idArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) +} + +// Plot_PlotHistogram_doublePtrV parameter default value hint: +// bar_scale: 1.0 +// bins: ImPlotBin_Sturges +// flags: 0 +// range: ImPlotRange() +func Plot_PlotHistogram_doublePtrV(label_id string, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + return float64(C.Plot_PlotHistogram_doublePtrV(label_idArg, C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) +} + // Plot_PlotImageV parameter default value hint: // flags: 0 // tint_col: ImVec4(1,1,1,1) @@ -2417,6 +2940,26 @@ func Plot_PlotInfLines_U8PtrV(label_id string, values []*byte, count int32, flag C.Plot_PlotInfLines_U8PtrV(label_idArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.ImPlotInfLinesFlags(flags), C.int(offset), C.int(stride)) } +// Plot_PlotInfLines_doublePtrV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +func Plot_PlotInfLines_doublePtrV(label_id string, count int32, flags PlotInfLinesFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotInfLines_doublePtrV(label_idArg, C.int(count), C.ImPlotInfLinesFlags(flags), C.int(offset), C.int(stride)) +} + +// Plot_PlotLineGV parameter default value hint: +// flags: 0 +func Plot_PlotLineGV(label_id string, data unsafe.Pointer, count int32, flags PlotLineFlags) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotLineGV(label_idArg, data, C.int(count), C.ImPlotLineFlags(flags)) +} + // Plot_PlotLine_FloatPtrFloatPtrV parameter default value hint: // flags: 0 // offset: 0 @@ -2813,6 +3356,30 @@ func Plot_PlotLine_U8PtrU8PtrV(label_id string, xs []*byte, ys []*byte, count in C.Plot_PlotLine_U8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.ImPlotLineFlags(flags), C.int(offset), C.int(stride)) } +// Plot_PlotLine_doublePtrIntV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +// xscale: 1 +// xstart: 0 +func Plot_PlotLine_doublePtrIntV(label_id string, count int32, xscale float64, xstart float64, flags PlotLineFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotLine_doublePtrIntV(label_idArg, C.int(count), C.double(xscale), C.double(xstart), C.ImPlotLineFlags(flags), C.int(offset), C.int(stride)) +} + +// Plot_PlotLine_doublePtrdoublePtrV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +func Plot_PlotLine_doublePtrdoublePtrV(label_id string, count int32, flags PlotLineFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotLine_doublePtrdoublePtrV(label_idArg, C.int(count), C.ImPlotLineFlags(flags), C.int(offset), C.int(stride)) +} + // Plot_PlotPieChart_FloatPtrV parameter default value hint: // angle0: 90 // flags: 0 @@ -2996,7 +3563,30 @@ func Plot_PlotPieChart_U8PtrV(label_ids []string, values []*byte, count int32, x label_fmtArg, label_fmtFin := wrapString(label_fmt) defer label_fmtFin() - C.Plot_PlotPieChart_U8PtrV(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) + C.Plot_PlotPieChart_U8PtrV(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) +} + +// Plot_PlotPieChart_doublePtrV parameter default value hint: +// angle0: 90 +// flags: 0 +// label_fmt: "%.1f" +func Plot_PlotPieChart_doublePtrV(label_ids []string, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { + label_idsArg, label_idsFin := wrapStringList(label_ids) + defer label_idsFin() + + label_fmtArg, label_fmtFin := wrapString(label_fmt) + defer label_fmtFin() + + C.Plot_PlotPieChart_doublePtrV(label_idsArg, C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) +} + +// Plot_PlotScatterGV parameter default value hint: +// flags: 0 +func Plot_PlotScatterGV(label_id string, data unsafe.Pointer, count int32, flags PlotScatterFlags) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotScatterGV(label_idArg, data, C.int(count), C.ImPlotScatterFlags(flags)) } // Plot_PlotScatter_FloatPtrFloatPtrV parameter default value hint: @@ -3395,6 +3985,39 @@ func Plot_PlotScatter_U8PtrU8PtrV(label_id string, xs []*byte, ys []*byte, count C.Plot_PlotScatter_U8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.ImPlotScatterFlags(flags), C.int(offset), C.int(stride)) } +// Plot_PlotScatter_doublePtrIntV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +// xscale: 1 +// xstart: 0 +func Plot_PlotScatter_doublePtrIntV(label_id string, count int32, xscale float64, xstart float64, flags PlotScatterFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotScatter_doublePtrIntV(label_idArg, C.int(count), C.double(xscale), C.double(xstart), C.ImPlotScatterFlags(flags), C.int(offset), C.int(stride)) +} + +// Plot_PlotScatter_doublePtrdoublePtrV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +func Plot_PlotScatter_doublePtrdoublePtrV(label_id string, count int32, flags PlotScatterFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotScatter_doublePtrdoublePtrV(label_idArg, C.int(count), C.ImPlotScatterFlags(flags), C.int(offset), C.int(stride)) +} + +// Plot_PlotShadedGV parameter default value hint: +// flags: 0 +func Plot_PlotShadedGV(label_id string, data1 unsafe.Pointer, data2 unsafe.Pointer, count int32, flags PlotShadedFlags) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotShadedGV(label_idArg, data1, data2, C.int(count), C.ImPlotShadedFlags(flags)) +} + // Plot_PlotShaded_FloatPtrFloatPtrFloatPtrV parameter default value hint: // flags: 0 // offset: 0 @@ -4088,6 +4711,52 @@ func Plot_PlotShaded_U8PtrU8PtrU8PtrV(label_id string, xs []*byte, ys1 []*byte, C.Plot_PlotShaded_U8PtrU8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ys1Arg[0]), (*C.ImU8)(&ys2Arg[0]), C.int(count), C.ImPlotShadedFlags(flags), C.int(offset), C.int(stride)) } +// Plot_PlotShaded_doublePtrIntV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +// xscale: 1 +// xstart: 0 +// yref: 0 +func Plot_PlotShaded_doublePtrIntV(label_id string, count int32, yref float64, xscale float64, xstart float64, flags PlotShadedFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotShaded_doublePtrIntV(label_idArg, C.int(count), C.double(yref), C.double(xscale), C.double(xstart), C.ImPlotShadedFlags(flags), C.int(offset), C.int(stride)) +} + +// Plot_PlotShaded_doublePtrdoublePtrIntV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +// yref: 0 +func Plot_PlotShaded_doublePtrdoublePtrIntV(label_id string, count int32, yref float64, flags PlotShadedFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotShaded_doublePtrdoublePtrIntV(label_idArg, C.int(count), C.double(yref), C.ImPlotShadedFlags(flags), C.int(offset), C.int(stride)) +} + +// Plot_PlotShaded_doublePtrdoublePtrdoublePtrV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +func Plot_PlotShaded_doublePtrdoublePtrdoublePtrV(label_id string, count int32, flags PlotShadedFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotShaded_doublePtrdoublePtrdoublePtrV(label_idArg, C.int(count), C.ImPlotShadedFlags(flags), C.int(offset), C.int(stride)) +} + +// Plot_PlotStairsGV parameter default value hint: +// flags: 0 +func Plot_PlotStairsGV(label_id string, data unsafe.Pointer, count int32, flags PlotStairsFlags) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotStairsGV(label_idArg, data, C.int(count), C.ImPlotStairsFlags(flags)) +} + // Plot_PlotStairs_FloatPtrFloatPtrV parameter default value hint: // flags: 0 // offset: 0 @@ -4484,6 +5153,30 @@ func Plot_PlotStairs_U8PtrU8PtrV(label_id string, xs []*byte, ys []*byte, count C.Plot_PlotStairs_U8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.ImPlotStairsFlags(flags), C.int(offset), C.int(stride)) } +// Plot_PlotStairs_doublePtrIntV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +// xscale: 1 +// xstart: 0 +func Plot_PlotStairs_doublePtrIntV(label_id string, count int32, xscale float64, xstart float64, flags PlotStairsFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotStairs_doublePtrIntV(label_idArg, C.int(count), C.double(xscale), C.double(xstart), C.ImPlotStairsFlags(flags), C.int(offset), C.int(stride)) +} + +// Plot_PlotStairs_doublePtrdoublePtrV parameter default value hint: +// flags: 0 +// offset: 0 +// stride: sizeof(double) +func Plot_PlotStairs_doublePtrdoublePtrV(label_id string, count int32, flags PlotStairsFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotStairs_doublePtrdoublePtrV(label_idArg, C.int(count), C.ImPlotStairsFlags(flags), C.int(offset), C.int(stride)) +} + // Plot_PlotStems_FloatPtrFloatPtrV parameter default value hint: // flags: 0 // offset: 0 @@ -4898,6 +5591,32 @@ func Plot_PlotStems_U8PtrU8PtrV(label_id string, xs []*byte, ys []*byte, count i C.Plot_PlotStems_U8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.double(ref), C.ImPlotStemsFlags(flags), C.int(offset), C.int(stride)) } +// Plot_PlotStems_doublePtrIntV parameter default value hint: +// flags: 0 +// offset: 0 +// ref: 0 +// scale: 1 +// start: 0 +// stride: sizeof(double) +func Plot_PlotStems_doublePtrIntV(label_id string, count int32, ref float64, scale float64, start float64, flags PlotStemsFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotStems_doublePtrIntV(label_idArg, C.int(count), C.double(ref), C.double(scale), C.double(start), C.ImPlotStemsFlags(flags), C.int(offset), C.int(stride)) +} + +// Plot_PlotStems_doublePtrdoublePtrV parameter default value hint: +// flags: 0 +// offset: 0 +// ref: 0 +// stride: sizeof(double) +func Plot_PlotStems_doublePtrdoublePtrV(label_id string, count int32, ref float64, flags PlotStemsFlags, offset int32, stride int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotStems_doublePtrdoublePtrV(label_idArg, C.int(count), C.double(ref), C.ImPlotStemsFlags(flags), C.int(offset), C.int(stride)) +} + // Plot_PlotTextV parameter default value hint: // flags: 0 // pix_offset: ImVec2(0,0) @@ -5109,6 +5828,12 @@ func Plot_SetupAxisV(axis ImAxis, label string, flags PlotAxisFlags) { C.Plot_SetupAxisV(C.ImAxis(axis), labelArg, C.ImPlotAxisFlags(flags)) } +// Plot_SetupAxisFormat_PlotFormatterV parameter default value hint: +// data: ((void*)0) +func Plot_SetupAxisFormat_PlotFormatterV(axis ImAxis, data unsafe.Pointer) { + C.Plot_SetupAxisFormat_PlotFormatterV(C.ImAxis(axis), data) +} + func Plot_SetupAxisFormat_Str(axis ImAxis, fmt string) { fmtArg, fmtFin := wrapString(fmt) defer fmtFin() @@ -5140,6 +5865,12 @@ func Plot_SetupAxisScale_PlotScale(axis ImAxis, scale PlotScale) { C.Plot_SetupAxisScale_PlotScale(C.ImAxis(axis), C.ImPlotScale(scale)) } +// Plot_SetupAxisScale_PlotTransformV parameter default value hint: +// data: ((void*)0) +func Plot_SetupAxisScale_PlotTransformV(axis ImAxis, data unsafe.Pointer) { + C.Plot_SetupAxisScale_PlotTransformV(C.ImAxis(axis), data) +} + // Plot_SetupAxisTicks_doubleV parameter default value hint: // keep_default: false // labels: ((void*)0) @@ -5150,6 +5881,16 @@ func Plot_SetupAxisTicks_doubleV(axis ImAxis, v_min float64, v_max float64, n_ti C.Plot_SetupAxisTicks_doubleV(C.ImAxis(axis), C.double(v_min), C.double(v_max), C.int(n_ticks), labelsArg, C.bool(keep_default)) } +// Plot_SetupAxisTicks_doublePtrV parameter default value hint: +// keep_default: false +// labels: ((void*)0) +func Plot_SetupAxisTicks_doublePtrV(axis ImAxis, n_ticks int32, labels []string, keep_default bool) { + labelsArg, labelsFin := wrapStringList(labels) + defer labelsFin() + + C.Plot_SetupAxisTicks_doublePtrV(C.ImAxis(axis), C.int(n_ticks), labelsArg, C.bool(keep_default)) +} + func Plot_SetupAxisZoomConstraints(axis ImAxis, z_min float64, z_max float64) { C.Plot_SetupAxisZoomConstraints(C.ImAxis(axis), C.double(z_min), C.double(z_max)) } @@ -5590,6 +6331,20 @@ func Plot_PlotBarGroups_U8Ptr(label_ids []string, values []*byte, item_count int C.Plot_PlotBarGroups_U8Ptr(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(item_count), C.int(group_count)) } +func Plot_PlotBarGroups_doublePtr(label_ids []string, item_count int32, group_count int32) { + label_idsArg, label_idsFin := wrapStringList(label_ids) + defer label_idsFin() + + C.Plot_PlotBarGroups_doublePtr(label_idsArg, C.int(item_count), C.int(group_count)) +} + +func Plot_PlotBarsG(label_id string, data unsafe.Pointer, count int32, bar_size float64) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotBarsG(label_idArg, data, C.int(count), C.double(bar_size)) +} + func Plot_PlotBars_FloatPtrFloatPtr(label_id string, xs []float32, ys []float32, count int32, bar_size float64) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -5896,6 +6651,27 @@ func Plot_PlotBars_U8PtrU8Ptr(label_id string, xs []*byte, ys []*byte, count int C.Plot_PlotBars_U8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.double(bar_size)) } +func Plot_PlotBars_doublePtrInt(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotBars_doublePtrInt(label_idArg, C.int(count)) +} + +func Plot_PlotBars_doublePtrdoublePtr(label_id string, count int32, bar_size float64) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotBars_doublePtrdoublePtr(label_idArg, C.int(count), C.double(bar_size)) +} + +func Plot_PlotDigitalG(label_id string, data unsafe.Pointer, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotDigitalG(label_idArg, data, C.int(count)) +} + func Plot_PlotDigital_FloatPtr(label_id string, xs []float32, ys []float32, count int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -6079,6 +6855,13 @@ func Plot_PlotDigital_U8Ptr(label_id string, xs []*byte, ys []*byte, count int32 C.Plot_PlotDigital_U8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count)) } +func Plot_PlotDigital_doublePtr(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotDigital_doublePtr(label_idArg, C.int(count)) +} + func Plot_PlotDummy(label_id string) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -6632,6 +7415,20 @@ func Plot_PlotErrorBars_U8PtrU8PtrU8PtrU8Ptr(label_id string, xs []*byte, ys []* C.Plot_PlotErrorBars_U8PtrU8PtrU8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), (*C.ImU8)(&negArg[0]), (*C.ImU8)(&posArg[0]), C.int(count)) } +func Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrInt(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrInt(label_idArg, C.int(count)) +} + +func Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrdoublePtr(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrdoublePtr(label_idArg, C.int(count)) +} + func Plot_PlotHeatmap_FloatPtr(label_id string, values []float32, rows int32, cols int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -6755,6 +7552,13 @@ func Plot_PlotHeatmap_U8Ptr(label_id string, values []*byte, rows int32, cols in C.Plot_PlotHeatmap_U8Ptr(label_idArg, (*C.ImU8)(&valuesArg[0]), C.int(rows), C.int(cols)) } +func Plot_PlotHeatmap_doublePtr(label_id string, rows int32, cols int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotHeatmap_doublePtr(label_idArg, C.int(rows), C.int(cols)) +} + func Plot_PlotHistogram2D_FloatPtr(label_id string, xs []float32, ys []float32, count int32) float64 { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -6938,6 +7742,13 @@ func Plot_PlotHistogram2D_U8Ptr(label_id string, xs []*byte, ys []*byte, count i return float64(C.Plot_PlotHistogram2D_U8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count))) } +func Plot_PlotHistogram2D_doublePtr(label_id string, count int32) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + return float64(C.Plot_PlotHistogram2D_doublePtr(label_idArg, C.int(count))) +} + func Plot_PlotHistogram_FloatPtr(label_id string, values []float32, count int32) float64 { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -7061,6 +7872,13 @@ func Plot_PlotHistogram_U8Ptr(label_id string, values []*byte, count int32) floa return float64(C.Plot_PlotHistogram_U8Ptr(label_idArg, (*C.ImU8)(&valuesArg[0]), C.int(count))) } +func Plot_PlotHistogram_doublePtr(label_id string, count int32) float64 { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + return float64(C.Plot_PlotHistogram_doublePtr(label_idArg, C.int(count))) +} + func Plot_PlotImage(label_id string, user_texture_id TextureID, bounds_min PlotPoint, bounds_max PlotPoint) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -7191,6 +8009,20 @@ func Plot_PlotInfLines_U8Ptr(label_id string, values []*byte, count int32) { C.Plot_PlotInfLines_U8Ptr(label_idArg, (*C.ImU8)(&valuesArg[0]), C.int(count)) } +func Plot_PlotInfLines_doublePtr(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotInfLines_doublePtr(label_idArg, C.int(count)) +} + +func Plot_PlotLineG(label_id string, data unsafe.Pointer, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotLineG(label_idArg, data, C.int(count)) +} + func Plot_PlotLine_FloatPtrFloatPtr(label_id string, xs []float32, ys []float32, count int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -7497,6 +8329,20 @@ func Plot_PlotLine_U8PtrU8Ptr(label_id string, xs []*byte, ys []*byte, count int C.Plot_PlotLine_U8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count)) } +func Plot_PlotLine_doublePtrInt(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotLine_doublePtrInt(label_idArg, C.int(count)) +} + +func Plot_PlotLine_doublePtrdoublePtr(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotLine_doublePtrdoublePtr(label_idArg, C.int(count)) +} + func Plot_PlotPieChart_FloatPtr(label_ids []string, values []float32, count int32, x float64, y float64, radius float64) { label_idsArg, label_idsFin := wrapStringList(label_ids) defer label_idsFin() @@ -7620,6 +8466,20 @@ func Plot_PlotPieChart_U8Ptr(label_ids []string, values []*byte, count int32, x C.Plot_PlotPieChart_U8Ptr(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) } +func Plot_PlotPieChart_doublePtr(label_ids []string, count int32, x float64, y float64, radius float64) { + label_idsArg, label_idsFin := wrapStringList(label_ids) + defer label_idsFin() + + C.Plot_PlotPieChart_doublePtr(label_idsArg, C.int(count), C.double(x), C.double(y), C.double(radius)) +} + +func Plot_PlotScatterG(label_id string, data unsafe.Pointer, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotScatterG(label_idArg, data, C.int(count)) +} + func Plot_PlotScatter_FloatPtrFloatPtr(label_id string, xs []float32, ys []float32, count int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -7926,6 +8786,27 @@ func Plot_PlotScatter_U8PtrU8Ptr(label_id string, xs []*byte, ys []*byte, count C.Plot_PlotScatter_U8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count)) } +func Plot_PlotScatter_doublePtrInt(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotScatter_doublePtrInt(label_idArg, C.int(count)) +} + +func Plot_PlotScatter_doublePtrdoublePtr(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotScatter_doublePtrdoublePtr(label_idArg, C.int(count)) +} + +func Plot_PlotShadedG(label_id string, data1 unsafe.Pointer, data2 unsafe.Pointer, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotShadedG(label_idArg, data1, data2, C.int(count)) +} + func Plot_PlotShaded_FloatPtrFloatPtrFloatPtr(label_id string, xs []float32, ys1 []float32, ys2 []float32, count int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -8475,6 +9356,34 @@ func Plot_PlotShaded_U8PtrU8PtrU8Ptr(label_id string, xs []*byte, ys1 []*byte, y C.Plot_PlotShaded_U8PtrU8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ys1Arg[0]), (*C.ImU8)(&ys2Arg[0]), C.int(count)) } +func Plot_PlotShaded_doublePtrInt(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotShaded_doublePtrInt(label_idArg, C.int(count)) +} + +func Plot_PlotShaded_doublePtrdoublePtrInt(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotShaded_doublePtrdoublePtrInt(label_idArg, C.int(count)) +} + +func Plot_PlotShaded_doublePtrdoublePtrdoublePtr(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotShaded_doublePtrdoublePtrdoublePtr(label_idArg, C.int(count)) +} + +func Plot_PlotStairsG(label_id string, data unsafe.Pointer, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotStairsG(label_idArg, data, C.int(count)) +} + func Plot_PlotStairs_FloatPtrFloatPtr(label_id string, xs []float32, ys []float32, count int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -8781,6 +9690,20 @@ func Plot_PlotStairs_U8PtrU8Ptr(label_id string, xs []*byte, ys []*byte, count i C.Plot_PlotStairs_U8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count)) } +func Plot_PlotStairs_doublePtrInt(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotStairs_doublePtrInt(label_idArg, C.int(count)) +} + +func Plot_PlotStairs_doublePtrdoublePtr(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotStairs_doublePtrdoublePtr(label_idArg, C.int(count)) +} + func Plot_PlotStems_FloatPtrFloatPtr(label_id string, xs []float32, ys []float32, count int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -9087,6 +10010,20 @@ func Plot_PlotStems_U8PtrU8Ptr(label_id string, xs []*byte, ys []*byte, count in C.Plot_PlotStems_U8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count)) } +func Plot_PlotStems_doublePtrInt(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotStems_doublePtrInt(label_idArg, C.int(count)) +} + +func Plot_PlotStems_doublePtrdoublePtr(label_id string, count int32) { + label_idArg, label_idFin := wrapString(label_id) + defer label_idFin() + + C.Plot_PlotStems_doublePtrdoublePtr(label_idArg, C.int(count)) +} + func Plot_PlotText(text string, x float64, y float64) { textArg, textFin := wrapString(text) defer textFin() @@ -9187,6 +10124,10 @@ func Plot_SetupAxisTicks_double(axis ImAxis, v_min float64, v_max float64, n_tic C.Plot_SetupAxisTicks_double(C.ImAxis(axis), C.double(v_min), C.double(v_max), C.int(n_ticks)) } +func Plot_SetupAxisTicks_doublePtr(axis ImAxis, n_ticks int32) { + C.Plot_SetupAxisTicks_doublePtr(C.ImAxis(axis), C.int(n_ticks)) +} + func Plot_SetupLegend(location PlotLocation) { C.Plot_SetupLegend(C.ImPlotLocation(location)) } From 115fb1c803b71d9701a3c43489563991835a08f9 Mon Sep 17 00:00:00 2001 From: gucio321 Date: Tue, 3 Jan 2023 08:40:27 +0100 Subject: [PATCH 8/8] hotfix: fix broken generation --- cimgui_funcs.go | 113 ----- cimplot_funcs.go | 961 +------------------------------------------ cmd/codegen/gengo.go | 1 + 3 files changed, 11 insertions(+), 1064 deletions(-) diff --git a/cimgui_funcs.go b/cimgui_funcs.go index 3707bd408..52962f8ea 100644 --- a/cimgui_funcs.go +++ b/cimgui_funcs.go @@ -112,10 +112,6 @@ func (self ImDrawList) AddBezierQuadraticV(p1 Vec2, p2 Vec2, p3 Vec2, col uint32 C.DrawList_AddBezierQuadraticV(self.handle(), p1.toC(), p2.toC(), p3.toC(), C.ImU32(col), C.float(thickness), C.int(num_segments)) } -func (self ImDrawList) AddCallback(callback_data unsafe.Pointer) { - C.DrawList_AddCallback(self.handle(), callback_data) -} - // DrawList_AddCircleV parameter default value hint: // num_segments: 0 // thickness: 1.0f @@ -1643,18 +1639,6 @@ func ColumnsV(count int32, id string, border bool) { C.ColumnsV(C.int(count), idArg, C.bool(border)) } -// Combo_FnBoolPtr parameter default value hint: -// popup_max_height_in_items: -1 -func Combo_FnBoolPtr(label string, current_item *int32, data unsafe.Pointer, items_count int32, popup_max_height_in_items int32) bool { - labelArg, labelFin := wrapString(label) - defer labelFin() - - current_itemArg, current_itemFin := wrapNumberPtr[C.int, int32](current_item) - defer current_itemFin() - - return C.Combo_FnBoolPtr(labelArg, current_itemArg, data, C.int(items_count), C.int(popup_max_height_in_items)) == C.bool(true) -} - // Combo_StrV parameter default value hint: // popup_max_height_in_items: -1 func Combo_StrV(label string, current_item *int32, items_separated_by_zeros string, popup_max_height_in_items int32) bool { @@ -2698,52 +2682,6 @@ func InputScalarNV(label string, data_type DataType, p_data unsafe.Pointer, comp return C.InputScalarNV(labelArg, C.ImGuiDataType(data_type), p_data, C.int(components), p_step, p_step_fast, formatArg, C.ImGuiInputTextFlags(flags)) == C.bool(true) } -// InputTextV parameter default value hint: -// callback: NULL -// flags: 0 -// user_data: NULL -func InputTextV(label string, buf string, buf_size uint64, flags InputTextFlags, user_data unsafe.Pointer) bool { - labelArg, labelFin := wrapString(label) - defer labelFin() - - bufArg, bufFin := wrapString(buf) - defer bufFin() - - return C.InputTextV(labelArg, bufArg, C.xlong(buf_size), C.ImGuiInputTextFlags(flags), user_data) == C.bool(true) -} - -// InputTextMultilineV parameter default value hint: -// callback: NULL -// flags: 0 -// size: ImVec2(0,0) -// user_data: NULL -func InputTextMultilineV(label string, buf string, buf_size uint64, size Vec2, flags InputTextFlags, user_data unsafe.Pointer) bool { - labelArg, labelFin := wrapString(label) - defer labelFin() - - bufArg, bufFin := wrapString(buf) - defer bufFin() - - return C.InputTextMultilineV(labelArg, bufArg, C.xlong(buf_size), size.toC(), C.ImGuiInputTextFlags(flags), user_data) == C.bool(true) -} - -// InputTextWithHintV parameter default value hint: -// callback: NULL -// flags: 0 -// user_data: NULL -func InputTextWithHintV(label string, hint string, buf string, buf_size uint64, flags InputTextFlags, user_data unsafe.Pointer) bool { - labelArg, labelFin := wrapString(label) - defer labelFin() - - hintArg, hintFin := wrapString(hint) - defer hintFin() - - bufArg, bufFin := wrapString(buf) - defer bufFin() - - return C.InputTextWithHintV(labelArg, hintArg, bufArg, C.xlong(buf_size), C.ImGuiInputTextFlags(flags), user_data) == C.bool(true) -} - // InvisibleButtonV parameter default value hint: // flags: 0 func InvisibleButtonV(str_id string, size Vec2, flags ButtonFlags) bool { @@ -2917,18 +2855,6 @@ func LabelText(label string, fmt string) { C.LabelText(labelArg, fmtArg) } -// ListBox_FnBoolPtr parameter default value hint: -// height_in_items: -1 -func ListBox_FnBoolPtr(label string, current_item *int32, data unsafe.Pointer, items_count int32, height_in_items int32) bool { - labelArg, labelFin := wrapString(label) - defer labelFin() - - current_itemArg, current_itemFin := wrapNumberPtr[C.int, int32](current_item) - defer current_itemFin() - - return C.ListBox_FnBoolPtr(labelArg, current_itemArg, data, C.int(items_count), C.int(height_in_items)) == C.bool(true) -} - // ListBox_Str_arrV parameter default value hint: // height_in_items: -1 func ListBox_Str_arrV(label string, current_item *int32, items []string, items_count int32, height_in_items int32) bool { @@ -3088,22 +3014,6 @@ func PlotHistogram_FloatPtrV(label string, values []float32, values_count int32, C.PlotHistogram_FloatPtrV(labelArg, (*C.float)(&(values[0])), C.int(values_count), C.int(values_offset), overlay_textArg, C.float(scale_min), C.float(scale_max), graph_size.toC(), C.int(stride)) } -// PlotHistogram_FnFloatPtr parameter default value hint: -// graph_size: ImVec2(0,0) -// overlay_text: NULL -// scale_max: FLT_MAX -// scale_min: FLT_MAX -// values_offset: 0 -func PlotHistogram_FnFloatPtr(label string, data unsafe.Pointer, values_count int32, values_offset int32, overlay_text string, scale_min float32, scale_max float32, graph_size Vec2) { - labelArg, labelFin := wrapString(label) - defer labelFin() - - overlay_textArg, overlay_textFin := wrapString(overlay_text) - defer overlay_textFin() - - C.PlotHistogram_FnFloatPtr(labelArg, data, C.int(values_count), C.int(values_offset), overlay_textArg, C.float(scale_min), C.float(scale_max), graph_size.toC()) -} - // PlotLines_FloatPtrV parameter default value hint: // graph_size: ImVec2(0,0) // overlay_text: NULL @@ -3121,22 +3031,6 @@ func PlotLines_FloatPtrV(label string, values []float32, values_count int32, val C.PlotLines_FloatPtrV(labelArg, (*C.float)(&(values[0])), C.int(values_count), C.int(values_offset), overlay_textArg, C.float(scale_min), C.float(scale_max), graph_size.toC(), C.int(stride)) } -// PlotLines_FnFloatPtr parameter default value hint: -// graph_size: ImVec2(0,0) -// overlay_text: NULL -// scale_max: FLT_MAX -// scale_min: FLT_MAX -// values_offset: 0 -func PlotLines_FnFloatPtr(label string, data unsafe.Pointer, values_count int32, values_offset int32, overlay_text string, scale_min float32, scale_max float32, graph_size Vec2) { - labelArg, labelFin := wrapString(label) - defer labelFin() - - overlay_textArg, overlay_textFin := wrapString(overlay_text) - defer overlay_textFin() - - C.PlotLines_FnFloatPtr(labelArg, data, C.int(values_count), C.int(values_offset), overlay_textArg, C.float(scale_min), C.float(scale_max), graph_size.toC()) -} - func PopAllowKeyboardFocus() { C.PopAllowKeyboardFocus() } @@ -3461,13 +3355,6 @@ func SetNextWindowSizeV(size Vec2, cond Cond) { C.SetNextWindowSizeV(size.toC(), C.ImGuiCond(cond)) } -// SetNextWindowSizeConstraintsV parameter default value hint: -// custom_callback: NULL -// custom_callback_data: NULL -func SetNextWindowSizeConstraintsV(size_min Vec2, size_max Vec2, custom_callback_data unsafe.Pointer) { - C.SetNextWindowSizeConstraintsV(size_min.toC(), size_max.toC(), custom_callback_data) -} - func SetNextWindowViewport(viewport_id ImGuiID) { C.SetNextWindowViewport(C.ImGuiID(viewport_id)) } diff --git a/cimplot_funcs.go b/cimplot_funcs.go index fb486eaf8..756dbed58 100644 --- a/cimplot_funcs.go +++ b/cimplot_funcs.go @@ -791,26 +791,6 @@ func Plot_PlotBarGroups_U8PtrV(label_ids []string, values []*byte, item_count in C.Plot_PlotBarGroups_U8PtrV(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(item_count), C.int(group_count), C.double(group_size), C.double(shift), C.ImPlotBarGroupsFlags(flags)) } -// Plot_PlotBarGroups_doublePtrV parameter default value hint: -// flags: 0 -// group_size: 0.67 -// shift: 0 -func Plot_PlotBarGroups_doublePtrV(label_ids []string, item_count int32, group_count int32, group_size float64, shift float64, flags PlotBarGroupsFlags) { - label_idsArg, label_idsFin := wrapStringList(label_ids) - defer label_idsFin() - - C.Plot_PlotBarGroups_doublePtrV(label_idsArg, C.int(item_count), C.int(group_count), C.double(group_size), C.double(shift), C.ImPlotBarGroupsFlags(flags)) -} - -// Plot_PlotBarsGV parameter default value hint: -// flags: 0 -func Plot_PlotBarsGV(label_id string, data unsafe.Pointer, count int32, bar_size float64, flags PlotBarsFlags) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotBarsGV(label_idArg, data, C.int(count), C.double(bar_size), C.ImPlotBarsFlags(flags)) -} - // Plot_PlotBars_FloatPtrFloatPtrV parameter default value hint: // flags: 0 // offset: 0 @@ -1207,39 +1187,6 @@ func Plot_PlotBars_U8PtrU8PtrV(label_id string, xs []*byte, ys []*byte, count in C.Plot_PlotBars_U8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.double(bar_size), C.ImPlotBarsFlags(flags), C.int(offset), C.int(stride)) } -// Plot_PlotBars_doublePtrIntV parameter default value hint: -// bar_size: 0.67 -// flags: 0 -// offset: 0 -// shift: 0 -// stride: sizeof(double) -func Plot_PlotBars_doublePtrIntV(label_id string, count int32, bar_size float64, shift float64, flags PlotBarsFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotBars_doublePtrIntV(label_idArg, C.int(count), C.double(bar_size), C.double(shift), C.ImPlotBarsFlags(flags), C.int(offset), C.int(stride)) -} - -// Plot_PlotBars_doublePtrdoublePtrV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -func Plot_PlotBars_doublePtrdoublePtrV(label_id string, count int32, bar_size float64, flags PlotBarsFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotBars_doublePtrdoublePtrV(label_idArg, C.int(count), C.double(bar_size), C.ImPlotBarsFlags(flags), C.int(offset), C.int(stride)) -} - -// Plot_PlotDigitalGV parameter default value hint: -// flags: 0 -func Plot_PlotDigitalGV(label_id string, data unsafe.Pointer, count int32, flags PlotDigitalFlags) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotDigitalGV(label_idArg, data, C.int(count), C.ImPlotDigitalFlags(flags)) -} - // Plot_PlotDigital_FloatPtrV parameter default value hint: // flags: 0 // offset: 0 @@ -1459,17 +1406,6 @@ func Plot_PlotDigital_U8PtrV(label_id string, xs []*byte, ys []*byte, count int3 C.Plot_PlotDigital_U8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.ImPlotDigitalFlags(flags), C.int(offset), C.int(stride)) } -// Plot_PlotDigital_doublePtrV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -func Plot_PlotDigital_doublePtrV(label_id string, count int32, flags PlotDigitalFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotDigital_doublePtrV(label_idArg, C.int(count), C.ImPlotDigitalFlags(flags), C.int(offset), C.int(stride)) -} - // Plot_PlotDummyV parameter default value hint: // flags: 0 func Plot_PlotDummyV(label_id string, flags PlotDummyFlags) { @@ -2097,28 +2033,6 @@ func Plot_PlotErrorBars_U8PtrU8PtrU8PtrU8PtrV(label_id string, xs []*byte, ys [] C.Plot_PlotErrorBars_U8PtrU8PtrU8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), (*C.ImU8)(&negArg[0]), (*C.ImU8)(&posArg[0]), C.int(count), C.ImPlotErrorBarsFlags(flags), C.int(offset), C.int(stride)) } -// Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrIntV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -func Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrIntV(label_id string, count int32, flags PlotErrorBarsFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrIntV(label_idArg, C.int(count), C.ImPlotErrorBarsFlags(flags), C.int(offset), C.int(stride)) -} - -// Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrdoublePtrV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -func Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrdoublePtrV(label_id string, count int32, flags PlotErrorBarsFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrdoublePtrV(label_idArg, C.int(count), C.ImPlotErrorBarsFlags(flags), C.int(offset), C.int(stride)) -} - // Plot_PlotHeatmap_FloatPtrV parameter default value hint: // bounds_max: ImPlotPoint(1,1) // bounds_min: ImPlotPoint(0,0) @@ -2332,443 +2246,6 @@ func Plot_PlotHeatmap_U8PtrV(label_id string, values []*byte, rows int32, cols i C.Plot_PlotHeatmap_U8PtrV(label_idArg, (*C.ImU8)(&valuesArg[0]), C.int(rows), C.int(cols), C.double(scale_min), C.double(scale_max), label_fmtArg, bounds_min.toC(), bounds_max.toC(), C.ImPlotHeatmapFlags(flags)) } -// Plot_PlotHeatmap_doublePtrV parameter default value hint: -// bounds_max: ImPlotPoint(1,1) -// bounds_min: ImPlotPoint(0,0) -// flags: 0 -// label_fmt: "%.1f" -// scale_max: 0 -// scale_min: 0 -func Plot_PlotHeatmap_doublePtrV(label_id string, rows int32, cols int32, scale_min float64, scale_max float64, label_fmt string, bounds_min PlotPoint, bounds_max PlotPoint, flags PlotHeatmapFlags) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - label_fmtArg, label_fmtFin := wrapString(label_fmt) - defer label_fmtFin() - - C.Plot_PlotHeatmap_doublePtrV(label_idArg, C.int(rows), C.int(cols), C.double(scale_min), C.double(scale_max), label_fmtArg, bounds_min.toC(), bounds_max.toC(), C.ImPlotHeatmapFlags(flags)) -} - -// Plot_PlotHistogram2D_FloatPtrV parameter default value hint: -// flags: 0 -// range: ImPlotRect() -// x_bins: ImPlotBin_Sturges -// y_bins: ImPlotBin_Sturges -func Plot_PlotHistogram2D_FloatPtrV(label_id string, xs []float32, ys []float32, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - return float64(C.Plot_PlotHistogram2D_FloatPtrV(label_idArg, (*C.float)(&(xs[0])), (*C.float)(&(ys[0])), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram2D_S16PtrV parameter default value hint: -// flags: 0 -// range: ImPlotRect() -// x_bins: ImPlotBin_Sturges -// y_bins: ImPlotBin_Sturges -func Plot_PlotHistogram2D_S16PtrV(label_id string, xs []*int, ys []*int, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - xsArg := make([]C.ImS16, len(xs)) - for i, xsV := range xs { - xsArg[i] = C.ImS16(*xsV) - } - defer func() { - for i, xsV := range xsArg { - *xs[i] = int(xsV) - } - }() - - ysArg := make([]C.ImS16, len(ys)) - for i, ysV := range ys { - ysArg[i] = C.ImS16(*ysV) - } - defer func() { - for i, ysV := range ysArg { - *ys[i] = int(ysV) - } - }() - - return float64(C.Plot_PlotHistogram2D_S16PtrV(label_idArg, (*C.ImS16)(&xsArg[0]), (*C.ImS16)(&ysArg[0]), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram2D_S32PtrV parameter default value hint: -// flags: 0 -// range: ImPlotRect() -// x_bins: ImPlotBin_Sturges -// y_bins: ImPlotBin_Sturges -func Plot_PlotHistogram2D_S32PtrV(label_id string, xs []*int32, ys []*int32, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - xsArg := make([]C.ImS32, len(xs)) - for i, xsV := range xs { - xsArg[i] = C.ImS32(*xsV) - } - defer func() { - for i, xsV := range xsArg { - *xs[i] = int32(xsV) - } - }() - - ysArg := make([]C.ImS32, len(ys)) - for i, ysV := range ys { - ysArg[i] = C.ImS32(*ysV) - } - defer func() { - for i, ysV := range ysArg { - *ys[i] = int32(ysV) - } - }() - - return float64(C.Plot_PlotHistogram2D_S32PtrV(label_idArg, (*C.ImS32)(&xsArg[0]), (*C.ImS32)(&ysArg[0]), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram2D_S64PtrV parameter default value hint: -// flags: 0 -// range: ImPlotRect() -// x_bins: ImPlotBin_Sturges -// y_bins: ImPlotBin_Sturges -func Plot_PlotHistogram2D_S64PtrV(label_id string, xs []int64, ys []int64, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - return float64(C.Plot_PlotHistogram2D_S64PtrV(label_idArg, (*C.longlong)(&(xs[0])), (*C.longlong)(&(ys[0])), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram2D_S8PtrV parameter default value hint: -// flags: 0 -// range: ImPlotRect() -// x_bins: ImPlotBin_Sturges -// y_bins: ImPlotBin_Sturges -func Plot_PlotHistogram2D_S8PtrV(label_id string, xs []*int8, ys []*int8, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - xsArg := make([]C.ImS8, len(xs)) - for i, xsV := range xs { - xsArg[i] = C.ImS8(*xsV) - } - defer func() { - for i, xsV := range xsArg { - *xs[i] = int8(xsV) - } - }() - - ysArg := make([]C.ImS8, len(ys)) - for i, ysV := range ys { - ysArg[i] = C.ImS8(*ysV) - } - defer func() { - for i, ysV := range ysArg { - *ys[i] = int8(ysV) - } - }() - - return float64(C.Plot_PlotHistogram2D_S8PtrV(label_idArg, (*C.ImS8)(&xsArg[0]), (*C.ImS8)(&ysArg[0]), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram2D_U16PtrV parameter default value hint: -// flags: 0 -// range: ImPlotRect() -// x_bins: ImPlotBin_Sturges -// y_bins: ImPlotBin_Sturges -func Plot_PlotHistogram2D_U16PtrV(label_id string, xs []*uint16, ys []*uint16, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - xsArg := make([]C.ImU16, len(xs)) - for i, xsV := range xs { - xsArg[i] = C.ImU16(*xsV) - } - defer func() { - for i, xsV := range xsArg { - *xs[i] = uint16(xsV) - } - }() - - ysArg := make([]C.ImU16, len(ys)) - for i, ysV := range ys { - ysArg[i] = C.ImU16(*ysV) - } - defer func() { - for i, ysV := range ysArg { - *ys[i] = uint16(ysV) - } - }() - - return float64(C.Plot_PlotHistogram2D_U16PtrV(label_idArg, (*C.ImU16)(&xsArg[0]), (*C.ImU16)(&ysArg[0]), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram2D_U32PtrV parameter default value hint: -// flags: 0 -// range: ImPlotRect() -// x_bins: ImPlotBin_Sturges -// y_bins: ImPlotBin_Sturges -func Plot_PlotHistogram2D_U32PtrV(label_id string, xs []*uint32, ys []*uint32, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - xsArg := make([]C.ImU32, len(xs)) - for i, xsV := range xs { - xsArg[i] = C.ImU32(*xsV) - } - defer func() { - for i, xsV := range xsArg { - *xs[i] = uint32(xsV) - } - }() - - ysArg := make([]C.ImU32, len(ys)) - for i, ysV := range ys { - ysArg[i] = C.ImU32(*ysV) - } - defer func() { - for i, ysV := range ysArg { - *ys[i] = uint32(ysV) - } - }() - - return float64(C.Plot_PlotHistogram2D_U32PtrV(label_idArg, (*C.ImU32)(&xsArg[0]), (*C.ImU32)(&ysArg[0]), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram2D_U64PtrV parameter default value hint: -// flags: 0 -// range: ImPlotRect() -// x_bins: ImPlotBin_Sturges -// y_bins: ImPlotBin_Sturges -func Plot_PlotHistogram2D_U64PtrV(label_id string, xs []uint64, ys []uint64, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - return float64(C.Plot_PlotHistogram2D_U64PtrV(label_idArg, (*C.ulonglong)(&(xs[0])), (*C.ulonglong)(&(ys[0])), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram2D_U8PtrV parameter default value hint: -// flags: 0 -// range: ImPlotRect() -// x_bins: ImPlotBin_Sturges -// y_bins: ImPlotBin_Sturges -func Plot_PlotHistogram2D_U8PtrV(label_id string, xs []*byte, ys []*byte, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - xsArg := make([]C.ImU8, len(xs)) - for i, xsV := range xs { - xsArg[i] = C.ImU8(*xsV) - } - defer func() { - for i, xsV := range xsArg { - *xs[i] = byte(xsV) - } - }() - - ysArg := make([]C.ImU8, len(ys)) - for i, ysV := range ys { - ysArg[i] = C.ImU8(*ysV) - } - defer func() { - for i, ysV := range ysArg { - *ys[i] = byte(ysV) - } - }() - - return float64(C.Plot_PlotHistogram2D_U8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram2D_doublePtrV parameter default value hint: -// flags: 0 -// range: ImPlotRect() -// x_bins: ImPlotBin_Sturges -// y_bins: ImPlotBin_Sturges -func Plot_PlotHistogram2D_doublePtrV(label_id string, count int32, x_bins int32, y_bins int32, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - return float64(C.Plot_PlotHistogram2D_doublePtrV(label_idArg, C.int(count), C.int(x_bins), C.int(y_bins), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram_FloatPtrV parameter default value hint: -// bar_scale: 1.0 -// bins: ImPlotBin_Sturges -// flags: 0 -// range: ImPlotRange() -func Plot_PlotHistogram_FloatPtrV(label_id string, values []float32, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - return float64(C.Plot_PlotHistogram_FloatPtrV(label_idArg, (*C.float)(&(values[0])), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram_S16PtrV parameter default value hint: -// bar_scale: 1.0 -// bins: ImPlotBin_Sturges -// flags: 0 -// range: ImPlotRange() -func Plot_PlotHistogram_S16PtrV(label_id string, values []*int, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - valuesArg := make([]C.ImS16, len(values)) - for i, valuesV := range values { - valuesArg[i] = C.ImS16(*valuesV) - } - defer func() { - for i, valuesV := range valuesArg { - *values[i] = int(valuesV) - } - }() - - return float64(C.Plot_PlotHistogram_S16PtrV(label_idArg, (*C.ImS16)(&valuesArg[0]), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram_S32PtrV parameter default value hint: -// bar_scale: 1.0 -// bins: ImPlotBin_Sturges -// flags: 0 -// range: ImPlotRange() -func Plot_PlotHistogram_S32PtrV(label_id string, values []*int32, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - valuesArg := make([]C.ImS32, len(values)) - for i, valuesV := range values { - valuesArg[i] = C.ImS32(*valuesV) - } - defer func() { - for i, valuesV := range valuesArg { - *values[i] = int32(valuesV) - } - }() - - return float64(C.Plot_PlotHistogram_S32PtrV(label_idArg, (*C.ImS32)(&valuesArg[0]), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram_S64PtrV parameter default value hint: -// bar_scale: 1.0 -// bins: ImPlotBin_Sturges -// flags: 0 -// range: ImPlotRange() -func Plot_PlotHistogram_S64PtrV(label_id string, values []int64, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - return float64(C.Plot_PlotHistogram_S64PtrV(label_idArg, (*C.longlong)(&(values[0])), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram_S8PtrV parameter default value hint: -// bar_scale: 1.0 -// bins: ImPlotBin_Sturges -// flags: 0 -// range: ImPlotRange() -func Plot_PlotHistogram_S8PtrV(label_id string, values []*int8, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - valuesArg := make([]C.ImS8, len(values)) - for i, valuesV := range values { - valuesArg[i] = C.ImS8(*valuesV) - } - defer func() { - for i, valuesV := range valuesArg { - *values[i] = int8(valuesV) - } - }() - - return float64(C.Plot_PlotHistogram_S8PtrV(label_idArg, (*C.ImS8)(&valuesArg[0]), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram_U16PtrV parameter default value hint: -// bar_scale: 1.0 -// bins: ImPlotBin_Sturges -// flags: 0 -// range: ImPlotRange() -func Plot_PlotHistogram_U16PtrV(label_id string, values []*uint16, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - valuesArg := make([]C.ImU16, len(values)) - for i, valuesV := range values { - valuesArg[i] = C.ImU16(*valuesV) - } - defer func() { - for i, valuesV := range valuesArg { - *values[i] = uint16(valuesV) - } - }() - - return float64(C.Plot_PlotHistogram_U16PtrV(label_idArg, (*C.ImU16)(&valuesArg[0]), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram_U32PtrV parameter default value hint: -// bar_scale: 1.0 -// bins: ImPlotBin_Sturges -// flags: 0 -// range: ImPlotRange() -func Plot_PlotHistogram_U32PtrV(label_id string, values []*uint32, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - valuesArg := make([]C.ImU32, len(values)) - for i, valuesV := range values { - valuesArg[i] = C.ImU32(*valuesV) - } - defer func() { - for i, valuesV := range valuesArg { - *values[i] = uint32(valuesV) - } - }() - - return float64(C.Plot_PlotHistogram_U32PtrV(label_idArg, (*C.ImU32)(&valuesArg[0]), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram_U64PtrV parameter default value hint: -// bar_scale: 1.0 -// bins: ImPlotBin_Sturges -// flags: 0 -// range: ImPlotRange() -func Plot_PlotHistogram_U64PtrV(label_id string, values []uint64, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - return float64(C.Plot_PlotHistogram_U64PtrV(label_idArg, (*C.ulonglong)(&(values[0])), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram_U8PtrV parameter default value hint: -// bar_scale: 1.0 -// bins: ImPlotBin_Sturges -// flags: 0 -// range: ImPlotRange() -func Plot_PlotHistogram_U8PtrV(label_id string, values []*byte, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - valuesArg := make([]C.ImU8, len(values)) - for i, valuesV := range values { - valuesArg[i] = C.ImU8(*valuesV) - } - defer func() { - for i, valuesV := range valuesArg { - *values[i] = byte(valuesV) - } - }() - - return float64(C.Plot_PlotHistogram_U8PtrV(label_idArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) -} - -// Plot_PlotHistogram_doublePtrV parameter default value hint: -// bar_scale: 1.0 -// bins: ImPlotBin_Sturges -// flags: 0 -// range: ImPlotRange() -func Plot_PlotHistogram_doublePtrV(label_id string, count int32, bins int32, bar_scale float64, flags PlotHistogramFlags) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - return float64(C.Plot_PlotHistogram_doublePtrV(label_idArg, C.int(count), C.int(bins), C.double(bar_scale), C.ImPlotHistogramFlags(flags))) -} - // Plot_PlotImageV parameter default value hint: // flags: 0 // tint_col: ImVec4(1,1,1,1) @@ -2940,26 +2417,6 @@ func Plot_PlotInfLines_U8PtrV(label_id string, values []*byte, count int32, flag C.Plot_PlotInfLines_U8PtrV(label_idArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.ImPlotInfLinesFlags(flags), C.int(offset), C.int(stride)) } -// Plot_PlotInfLines_doublePtrV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -func Plot_PlotInfLines_doublePtrV(label_id string, count int32, flags PlotInfLinesFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotInfLines_doublePtrV(label_idArg, C.int(count), C.ImPlotInfLinesFlags(flags), C.int(offset), C.int(stride)) -} - -// Plot_PlotLineGV parameter default value hint: -// flags: 0 -func Plot_PlotLineGV(label_id string, data unsafe.Pointer, count int32, flags PlotLineFlags) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotLineGV(label_idArg, data, C.int(count), C.ImPlotLineFlags(flags)) -} - // Plot_PlotLine_FloatPtrFloatPtrV parameter default value hint: // flags: 0 // offset: 0 @@ -3356,30 +2813,6 @@ func Plot_PlotLine_U8PtrU8PtrV(label_id string, xs []*byte, ys []*byte, count in C.Plot_PlotLine_U8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.ImPlotLineFlags(flags), C.int(offset), C.int(stride)) } -// Plot_PlotLine_doublePtrIntV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -// xscale: 1 -// xstart: 0 -func Plot_PlotLine_doublePtrIntV(label_id string, count int32, xscale float64, xstart float64, flags PlotLineFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotLine_doublePtrIntV(label_idArg, C.int(count), C.double(xscale), C.double(xstart), C.ImPlotLineFlags(flags), C.int(offset), C.int(stride)) -} - -// Plot_PlotLine_doublePtrdoublePtrV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -func Plot_PlotLine_doublePtrdoublePtrV(label_id string, count int32, flags PlotLineFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotLine_doublePtrdoublePtrV(label_idArg, C.int(count), C.ImPlotLineFlags(flags), C.int(offset), C.int(stride)) -} - // Plot_PlotPieChart_FloatPtrV parameter default value hint: // angle0: 90 // flags: 0 @@ -3550,43 +2983,20 @@ func Plot_PlotPieChart_U8PtrV(label_ids []string, values []*byte, count int32, x label_idsArg, label_idsFin := wrapStringList(label_ids) defer label_idsFin() - valuesArg := make([]C.ImU8, len(values)) - for i, valuesV := range values { - valuesArg[i] = C.ImU8(*valuesV) - } - defer func() { - for i, valuesV := range valuesArg { - *values[i] = byte(valuesV) - } - }() - - label_fmtArg, label_fmtFin := wrapString(label_fmt) - defer label_fmtFin() - - C.Plot_PlotPieChart_U8PtrV(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) -} - -// Plot_PlotPieChart_doublePtrV parameter default value hint: -// angle0: 90 -// flags: 0 -// label_fmt: "%.1f" -func Plot_PlotPieChart_doublePtrV(label_ids []string, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { - label_idsArg, label_idsFin := wrapStringList(label_ids) - defer label_idsFin() + valuesArg := make([]C.ImU8, len(values)) + for i, valuesV := range values { + valuesArg[i] = C.ImU8(*valuesV) + } + defer func() { + for i, valuesV := range valuesArg { + *values[i] = byte(valuesV) + } + }() label_fmtArg, label_fmtFin := wrapString(label_fmt) defer label_fmtFin() - C.Plot_PlotPieChart_doublePtrV(label_idsArg, C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) -} - -// Plot_PlotScatterGV parameter default value hint: -// flags: 0 -func Plot_PlotScatterGV(label_id string, data unsafe.Pointer, count int32, flags PlotScatterFlags) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotScatterGV(label_idArg, data, C.int(count), C.ImPlotScatterFlags(flags)) + C.Plot_PlotPieChart_U8PtrV(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) } // Plot_PlotScatter_FloatPtrFloatPtrV parameter default value hint: @@ -3985,39 +3395,6 @@ func Plot_PlotScatter_U8PtrU8PtrV(label_id string, xs []*byte, ys []*byte, count C.Plot_PlotScatter_U8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.ImPlotScatterFlags(flags), C.int(offset), C.int(stride)) } -// Plot_PlotScatter_doublePtrIntV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -// xscale: 1 -// xstart: 0 -func Plot_PlotScatter_doublePtrIntV(label_id string, count int32, xscale float64, xstart float64, flags PlotScatterFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotScatter_doublePtrIntV(label_idArg, C.int(count), C.double(xscale), C.double(xstart), C.ImPlotScatterFlags(flags), C.int(offset), C.int(stride)) -} - -// Plot_PlotScatter_doublePtrdoublePtrV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -func Plot_PlotScatter_doublePtrdoublePtrV(label_id string, count int32, flags PlotScatterFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotScatter_doublePtrdoublePtrV(label_idArg, C.int(count), C.ImPlotScatterFlags(flags), C.int(offset), C.int(stride)) -} - -// Plot_PlotShadedGV parameter default value hint: -// flags: 0 -func Plot_PlotShadedGV(label_id string, data1 unsafe.Pointer, data2 unsafe.Pointer, count int32, flags PlotShadedFlags) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotShadedGV(label_idArg, data1, data2, C.int(count), C.ImPlotShadedFlags(flags)) -} - // Plot_PlotShaded_FloatPtrFloatPtrFloatPtrV parameter default value hint: // flags: 0 // offset: 0 @@ -4711,52 +4088,6 @@ func Plot_PlotShaded_U8PtrU8PtrU8PtrV(label_id string, xs []*byte, ys1 []*byte, C.Plot_PlotShaded_U8PtrU8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ys1Arg[0]), (*C.ImU8)(&ys2Arg[0]), C.int(count), C.ImPlotShadedFlags(flags), C.int(offset), C.int(stride)) } -// Plot_PlotShaded_doublePtrIntV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -// xscale: 1 -// xstart: 0 -// yref: 0 -func Plot_PlotShaded_doublePtrIntV(label_id string, count int32, yref float64, xscale float64, xstart float64, flags PlotShadedFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotShaded_doublePtrIntV(label_idArg, C.int(count), C.double(yref), C.double(xscale), C.double(xstart), C.ImPlotShadedFlags(flags), C.int(offset), C.int(stride)) -} - -// Plot_PlotShaded_doublePtrdoublePtrIntV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -// yref: 0 -func Plot_PlotShaded_doublePtrdoublePtrIntV(label_id string, count int32, yref float64, flags PlotShadedFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotShaded_doublePtrdoublePtrIntV(label_idArg, C.int(count), C.double(yref), C.ImPlotShadedFlags(flags), C.int(offset), C.int(stride)) -} - -// Plot_PlotShaded_doublePtrdoublePtrdoublePtrV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -func Plot_PlotShaded_doublePtrdoublePtrdoublePtrV(label_id string, count int32, flags PlotShadedFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotShaded_doublePtrdoublePtrdoublePtrV(label_idArg, C.int(count), C.ImPlotShadedFlags(flags), C.int(offset), C.int(stride)) -} - -// Plot_PlotStairsGV parameter default value hint: -// flags: 0 -func Plot_PlotStairsGV(label_id string, data unsafe.Pointer, count int32, flags PlotStairsFlags) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotStairsGV(label_idArg, data, C.int(count), C.ImPlotStairsFlags(flags)) -} - // Plot_PlotStairs_FloatPtrFloatPtrV parameter default value hint: // flags: 0 // offset: 0 @@ -5153,30 +4484,6 @@ func Plot_PlotStairs_U8PtrU8PtrV(label_id string, xs []*byte, ys []*byte, count C.Plot_PlotStairs_U8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.ImPlotStairsFlags(flags), C.int(offset), C.int(stride)) } -// Plot_PlotStairs_doublePtrIntV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -// xscale: 1 -// xstart: 0 -func Plot_PlotStairs_doublePtrIntV(label_id string, count int32, xscale float64, xstart float64, flags PlotStairsFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotStairs_doublePtrIntV(label_idArg, C.int(count), C.double(xscale), C.double(xstart), C.ImPlotStairsFlags(flags), C.int(offset), C.int(stride)) -} - -// Plot_PlotStairs_doublePtrdoublePtrV parameter default value hint: -// flags: 0 -// offset: 0 -// stride: sizeof(double) -func Plot_PlotStairs_doublePtrdoublePtrV(label_id string, count int32, flags PlotStairsFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotStairs_doublePtrdoublePtrV(label_idArg, C.int(count), C.ImPlotStairsFlags(flags), C.int(offset), C.int(stride)) -} - // Plot_PlotStems_FloatPtrFloatPtrV parameter default value hint: // flags: 0 // offset: 0 @@ -5591,32 +4898,6 @@ func Plot_PlotStems_U8PtrU8PtrV(label_id string, xs []*byte, ys []*byte, count i C.Plot_PlotStems_U8PtrU8PtrV(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.double(ref), C.ImPlotStemsFlags(flags), C.int(offset), C.int(stride)) } -// Plot_PlotStems_doublePtrIntV parameter default value hint: -// flags: 0 -// offset: 0 -// ref: 0 -// scale: 1 -// start: 0 -// stride: sizeof(double) -func Plot_PlotStems_doublePtrIntV(label_id string, count int32, ref float64, scale float64, start float64, flags PlotStemsFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotStems_doublePtrIntV(label_idArg, C.int(count), C.double(ref), C.double(scale), C.double(start), C.ImPlotStemsFlags(flags), C.int(offset), C.int(stride)) -} - -// Plot_PlotStems_doublePtrdoublePtrV parameter default value hint: -// flags: 0 -// offset: 0 -// ref: 0 -// stride: sizeof(double) -func Plot_PlotStems_doublePtrdoublePtrV(label_id string, count int32, ref float64, flags PlotStemsFlags, offset int32, stride int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotStems_doublePtrdoublePtrV(label_idArg, C.int(count), C.double(ref), C.ImPlotStemsFlags(flags), C.int(offset), C.int(stride)) -} - // Plot_PlotTextV parameter default value hint: // flags: 0 // pix_offset: ImVec2(0,0) @@ -5828,12 +5109,6 @@ func Plot_SetupAxisV(axis ImAxis, label string, flags PlotAxisFlags) { C.Plot_SetupAxisV(C.ImAxis(axis), labelArg, C.ImPlotAxisFlags(flags)) } -// Plot_SetupAxisFormat_PlotFormatterV parameter default value hint: -// data: ((void*)0) -func Plot_SetupAxisFormat_PlotFormatterV(axis ImAxis, data unsafe.Pointer) { - C.Plot_SetupAxisFormat_PlotFormatterV(C.ImAxis(axis), data) -} - func Plot_SetupAxisFormat_Str(axis ImAxis, fmt string) { fmtArg, fmtFin := wrapString(fmt) defer fmtFin() @@ -5865,12 +5140,6 @@ func Plot_SetupAxisScale_PlotScale(axis ImAxis, scale PlotScale) { C.Plot_SetupAxisScale_PlotScale(C.ImAxis(axis), C.ImPlotScale(scale)) } -// Plot_SetupAxisScale_PlotTransformV parameter default value hint: -// data: ((void*)0) -func Plot_SetupAxisScale_PlotTransformV(axis ImAxis, data unsafe.Pointer) { - C.Plot_SetupAxisScale_PlotTransformV(C.ImAxis(axis), data) -} - // Plot_SetupAxisTicks_doubleV parameter default value hint: // keep_default: false // labels: ((void*)0) @@ -5881,16 +5150,6 @@ func Plot_SetupAxisTicks_doubleV(axis ImAxis, v_min float64, v_max float64, n_ti C.Plot_SetupAxisTicks_doubleV(C.ImAxis(axis), C.double(v_min), C.double(v_max), C.int(n_ticks), labelsArg, C.bool(keep_default)) } -// Plot_SetupAxisTicks_doublePtrV parameter default value hint: -// keep_default: false -// labels: ((void*)0) -func Plot_SetupAxisTicks_doublePtrV(axis ImAxis, n_ticks int32, labels []string, keep_default bool) { - labelsArg, labelsFin := wrapStringList(labels) - defer labelsFin() - - C.Plot_SetupAxisTicks_doublePtrV(C.ImAxis(axis), C.int(n_ticks), labelsArg, C.bool(keep_default)) -} - func Plot_SetupAxisZoomConstraints(axis ImAxis, z_min float64, z_max float64) { C.Plot_SetupAxisZoomConstraints(C.ImAxis(axis), C.double(z_min), C.double(z_max)) } @@ -6331,20 +5590,6 @@ func Plot_PlotBarGroups_U8Ptr(label_ids []string, values []*byte, item_count int C.Plot_PlotBarGroups_U8Ptr(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(item_count), C.int(group_count)) } -func Plot_PlotBarGroups_doublePtr(label_ids []string, item_count int32, group_count int32) { - label_idsArg, label_idsFin := wrapStringList(label_ids) - defer label_idsFin() - - C.Plot_PlotBarGroups_doublePtr(label_idsArg, C.int(item_count), C.int(group_count)) -} - -func Plot_PlotBarsG(label_id string, data unsafe.Pointer, count int32, bar_size float64) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotBarsG(label_idArg, data, C.int(count), C.double(bar_size)) -} - func Plot_PlotBars_FloatPtrFloatPtr(label_id string, xs []float32, ys []float32, count int32, bar_size float64) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -6651,27 +5896,6 @@ func Plot_PlotBars_U8PtrU8Ptr(label_id string, xs []*byte, ys []*byte, count int C.Plot_PlotBars_U8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count), C.double(bar_size)) } -func Plot_PlotBars_doublePtrInt(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotBars_doublePtrInt(label_idArg, C.int(count)) -} - -func Plot_PlotBars_doublePtrdoublePtr(label_id string, count int32, bar_size float64) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotBars_doublePtrdoublePtr(label_idArg, C.int(count), C.double(bar_size)) -} - -func Plot_PlotDigitalG(label_id string, data unsafe.Pointer, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotDigitalG(label_idArg, data, C.int(count)) -} - func Plot_PlotDigital_FloatPtr(label_id string, xs []float32, ys []float32, count int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -6855,13 +6079,6 @@ func Plot_PlotDigital_U8Ptr(label_id string, xs []*byte, ys []*byte, count int32 C.Plot_PlotDigital_U8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count)) } -func Plot_PlotDigital_doublePtr(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotDigital_doublePtr(label_idArg, C.int(count)) -} - func Plot_PlotDummy(label_id string) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -7415,20 +6632,6 @@ func Plot_PlotErrorBars_U8PtrU8PtrU8PtrU8Ptr(label_id string, xs []*byte, ys []* C.Plot_PlotErrorBars_U8PtrU8PtrU8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), (*C.ImU8)(&negArg[0]), (*C.ImU8)(&posArg[0]), C.int(count)) } -func Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrInt(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrInt(label_idArg, C.int(count)) -} - -func Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrdoublePtr(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotErrorBars_doublePtrdoublePtrdoublePtrdoublePtr(label_idArg, C.int(count)) -} - func Plot_PlotHeatmap_FloatPtr(label_id string, values []float32, rows int32, cols int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -7552,13 +6755,6 @@ func Plot_PlotHeatmap_U8Ptr(label_id string, values []*byte, rows int32, cols in C.Plot_PlotHeatmap_U8Ptr(label_idArg, (*C.ImU8)(&valuesArg[0]), C.int(rows), C.int(cols)) } -func Plot_PlotHeatmap_doublePtr(label_id string, rows int32, cols int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotHeatmap_doublePtr(label_idArg, C.int(rows), C.int(cols)) -} - func Plot_PlotHistogram2D_FloatPtr(label_id string, xs []float32, ys []float32, count int32) float64 { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -7742,13 +6938,6 @@ func Plot_PlotHistogram2D_U8Ptr(label_id string, xs []*byte, ys []*byte, count i return float64(C.Plot_PlotHistogram2D_U8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count))) } -func Plot_PlotHistogram2D_doublePtr(label_id string, count int32) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - return float64(C.Plot_PlotHistogram2D_doublePtr(label_idArg, C.int(count))) -} - func Plot_PlotHistogram_FloatPtr(label_id string, values []float32, count int32) float64 { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -7872,13 +7061,6 @@ func Plot_PlotHistogram_U8Ptr(label_id string, values []*byte, count int32) floa return float64(C.Plot_PlotHistogram_U8Ptr(label_idArg, (*C.ImU8)(&valuesArg[0]), C.int(count))) } -func Plot_PlotHistogram_doublePtr(label_id string, count int32) float64 { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - return float64(C.Plot_PlotHistogram_doublePtr(label_idArg, C.int(count))) -} - func Plot_PlotImage(label_id string, user_texture_id TextureID, bounds_min PlotPoint, bounds_max PlotPoint) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -8009,20 +7191,6 @@ func Plot_PlotInfLines_U8Ptr(label_id string, values []*byte, count int32) { C.Plot_PlotInfLines_U8Ptr(label_idArg, (*C.ImU8)(&valuesArg[0]), C.int(count)) } -func Plot_PlotInfLines_doublePtr(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotInfLines_doublePtr(label_idArg, C.int(count)) -} - -func Plot_PlotLineG(label_id string, data unsafe.Pointer, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotLineG(label_idArg, data, C.int(count)) -} - func Plot_PlotLine_FloatPtrFloatPtr(label_id string, xs []float32, ys []float32, count int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -8329,20 +7497,6 @@ func Plot_PlotLine_U8PtrU8Ptr(label_id string, xs []*byte, ys []*byte, count int C.Plot_PlotLine_U8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count)) } -func Plot_PlotLine_doublePtrInt(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotLine_doublePtrInt(label_idArg, C.int(count)) -} - -func Plot_PlotLine_doublePtrdoublePtr(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotLine_doublePtrdoublePtr(label_idArg, C.int(count)) -} - func Plot_PlotPieChart_FloatPtr(label_ids []string, values []float32, count int32, x float64, y float64, radius float64) { label_idsArg, label_idsFin := wrapStringList(label_ids) defer label_idsFin() @@ -8466,20 +7620,6 @@ func Plot_PlotPieChart_U8Ptr(label_ids []string, values []*byte, count int32, x C.Plot_PlotPieChart_U8Ptr(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) } -func Plot_PlotPieChart_doublePtr(label_ids []string, count int32, x float64, y float64, radius float64) { - label_idsArg, label_idsFin := wrapStringList(label_ids) - defer label_idsFin() - - C.Plot_PlotPieChart_doublePtr(label_idsArg, C.int(count), C.double(x), C.double(y), C.double(radius)) -} - -func Plot_PlotScatterG(label_id string, data unsafe.Pointer, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotScatterG(label_idArg, data, C.int(count)) -} - func Plot_PlotScatter_FloatPtrFloatPtr(label_id string, xs []float32, ys []float32, count int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -8786,27 +7926,6 @@ func Plot_PlotScatter_U8PtrU8Ptr(label_id string, xs []*byte, ys []*byte, count C.Plot_PlotScatter_U8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count)) } -func Plot_PlotScatter_doublePtrInt(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotScatter_doublePtrInt(label_idArg, C.int(count)) -} - -func Plot_PlotScatter_doublePtrdoublePtr(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotScatter_doublePtrdoublePtr(label_idArg, C.int(count)) -} - -func Plot_PlotShadedG(label_id string, data1 unsafe.Pointer, data2 unsafe.Pointer, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotShadedG(label_idArg, data1, data2, C.int(count)) -} - func Plot_PlotShaded_FloatPtrFloatPtrFloatPtr(label_id string, xs []float32, ys1 []float32, ys2 []float32, count int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -9356,34 +8475,6 @@ func Plot_PlotShaded_U8PtrU8PtrU8Ptr(label_id string, xs []*byte, ys1 []*byte, y C.Plot_PlotShaded_U8PtrU8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ys1Arg[0]), (*C.ImU8)(&ys2Arg[0]), C.int(count)) } -func Plot_PlotShaded_doublePtrInt(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotShaded_doublePtrInt(label_idArg, C.int(count)) -} - -func Plot_PlotShaded_doublePtrdoublePtrInt(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotShaded_doublePtrdoublePtrInt(label_idArg, C.int(count)) -} - -func Plot_PlotShaded_doublePtrdoublePtrdoublePtr(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotShaded_doublePtrdoublePtrdoublePtr(label_idArg, C.int(count)) -} - -func Plot_PlotStairsG(label_id string, data unsafe.Pointer, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotStairsG(label_idArg, data, C.int(count)) -} - func Plot_PlotStairs_FloatPtrFloatPtr(label_id string, xs []float32, ys []float32, count int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -9690,20 +8781,6 @@ func Plot_PlotStairs_U8PtrU8Ptr(label_id string, xs []*byte, ys []*byte, count i C.Plot_PlotStairs_U8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count)) } -func Plot_PlotStairs_doublePtrInt(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotStairs_doublePtrInt(label_idArg, C.int(count)) -} - -func Plot_PlotStairs_doublePtrdoublePtr(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotStairs_doublePtrdoublePtr(label_idArg, C.int(count)) -} - func Plot_PlotStems_FloatPtrFloatPtr(label_id string, xs []float32, ys []float32, count int32) { label_idArg, label_idFin := wrapString(label_id) defer label_idFin() @@ -10010,20 +9087,6 @@ func Plot_PlotStems_U8PtrU8Ptr(label_id string, xs []*byte, ys []*byte, count in C.Plot_PlotStems_U8PtrU8Ptr(label_idArg, (*C.ImU8)(&xsArg[0]), (*C.ImU8)(&ysArg[0]), C.int(count)) } -func Plot_PlotStems_doublePtrInt(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotStems_doublePtrInt(label_idArg, C.int(count)) -} - -func Plot_PlotStems_doublePtrdoublePtr(label_id string, count int32) { - label_idArg, label_idFin := wrapString(label_id) - defer label_idFin() - - C.Plot_PlotStems_doublePtrdoublePtr(label_idArg, C.int(count)) -} - func Plot_PlotText(text string, x float64, y float64) { textArg, textFin := wrapString(text) defer textFin() @@ -10124,10 +9187,6 @@ func Plot_SetupAxisTicks_double(axis ImAxis, v_min float64, v_max float64, n_tic C.Plot_SetupAxisTicks_double(C.ImAxis(axis), C.double(v_min), C.double(v_max), C.int(n_ticks)) } -func Plot_SetupAxisTicks_doublePtr(axis ImAxis, n_ticks int32) { - C.Plot_SetupAxisTicks_doublePtr(C.ImAxis(axis), C.int(n_ticks)) -} - func Plot_SetupLegend(location PlotLocation) { C.Plot_SetupLegend(C.ImPlotLocation(location)) } diff --git a/cmd/codegen/gengo.go b/cmd/codegen/gengo.go index 4620d1f88..a91db67e8 100644 --- a/cmd/codegen/gengo.go +++ b/cmd/codegen/gengo.go @@ -219,6 +219,7 @@ import "unsafe" if !shouldGenerate { fmt.Printf("Unknown argument type \"%s\" in function %s\n", a.Type, f.FuncName) + break } }